feat: Add converter for google_compute_image#9
Conversation
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
| "ancestors": [ | ||
| "projects/{{.Project.Number}}", | ||
| "organizations/{{.OrgID}}" | ||
| ], |
| "ancestors": [ | ||
| "projects/{{.Project.Number}}", | ||
| "organizations/{{.OrgID}}" | ||
| ], |
There was a problem hiding this comment.
This as well change to ancestry_path
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality.
| [ | ||
| { | ||
| "ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", | ||
| "assetType": "compute.googleapis.com/Disk", |
There was a problem hiding this comment.
| "assetType": "compute.googleapis.com/Disk", | |
| "asset_type": "compute.googleapis.com/Disk", |
| "type": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/diskTypes/pd-standard", | ||
| "zone": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a" | ||
| }, | ||
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", |
There was a problem hiding this comment.
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | |
| "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", |
| "zone": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a" | ||
| }, | ||
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||
| "discoveryName": "Disk", |
There was a problem hiding this comment.
| "discoveryName": "Disk", | |
| "discovery_name": "Disk", |
| }, | ||
| { | ||
| "ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", | ||
| "assetType": "compute.googleapis.com/Image", |
There was a problem hiding this comment.
| "assetType": "compute.googleapis.com/Image", | |
| "asset_type": "compute.googleapis.com/Image", |
| "us-central1" | ||
| ] | ||
| }, | ||
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", |
There was a problem hiding this comment.
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | |
| "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", |
| ] | ||
| }, | ||
| "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||
| "discoveryName": "Image", |
There was a problem hiding this comment.
| "discoveryName": "Image", | |
| "discovery_name": "Image", |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file.
| resource "google_compute_image" "gg-asset-42745-fa77" { | ||
| name = "gg-asset-42745-fa77" | ||
| project = "{{.Provider.project}}" | ||
| source_disk = google_compute_disk.gg-asset-42745-fa77.self_link |
There was a problem hiding this comment.
| source_disk = google_compute_disk.gg-asset-42745-fa77.self_link | |
| source_disk = "test-google-compute-disk-self-link" |
| resource "google_compute_disk" "gg-asset-42745-fa77" { | ||
| name = "gg-asset-source-disk-42745-fa77" | ||
| image = "debian-cloud/debian-11" | ||
| size = 20 | ||
| type = "pd-standard" | ||
| zone = "us-central1-a" | ||
| labels = { | ||
| "gg-asset-key-42745-fa77" = "gg-asset-value-42745-fa77" | ||
| } | ||
| } |
There was a problem hiding this comment.
| resource "google_compute_disk" "gg-asset-42745-fa77" { | |
| name = "gg-asset-source-disk-42745-fa77" | |
| image = "debian-cloud/debian-11" | |
| size = 20 | |
| type = "pd-standard" | |
| zone = "us-central1-a" | |
| labels = { | |
| "gg-asset-key-42745-fa77" = "gg-asset-value-42745-fa77" | |
| } | |
| } |
| ], | ||
| "name": "gg-asset-42745-fa77", | ||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", |
There was a problem hiding this comment.
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", | |
| "sourceDisk": "test-google-compute-disk-self-link", |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file, and to remove the `google_compute_disk` resource from the test case.
| resource "google_compute_image" "gg-asset-42745-fa77" { | ||
| name = "gg-asset-42745-fa77" | ||
| project = "{{.Provider.project}}" | ||
| source_disk = "test-google-compute-disk-self-link" |
There was a problem hiding this comment.
| source_disk = "test-google-compute-disk-self-link" | |
| source_disk = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014" |
| ], | ||
| "name": "gg-asset-42745-fa77", | ||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||
| "sourceDisk": "test-google-compute-disk-self-link", |
There was a problem hiding this comment.
| "sourceDisk": "test-google-compute-disk-self-link", | |
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014", |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file, remove the `google_compute_disk` resource from the test case, and update the hardcoded `source_disk` value.
| resource "google_compute_image" "gg-asset-42745-fa77" { | ||
| name = "gg-asset-42745-fa77" | ||
| project = "{{.Provider.project}}" | ||
| source_disk = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014" |
There was a problem hiding this comment.
| source_disk = "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014" | |
| source_disk = "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77" |
| ], | ||
| "name": "gg-asset-42745-fa77", | ||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014", |
There was a problem hiding this comment.
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20251014", | |
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file, remove the `google_compute_disk` resource from the test case, and update the hardcoded `source_disk` value.
| "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||
| "discovery_name": "Image", | ||
| "location": "us-central1", | ||
| "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Project.Number}}", |
There was a problem hiding this comment.
| "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Project.Number}}", | |
| "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", |
| "architecture": "X86_64", | ||
| "archiveSizeBytes": "744988672", | ||
| "creationTimestamp": "2025-10-31T13:32:56.760-07:00", |
There was a problem hiding this comment.
| "architecture": "X86_64", | |
| "archiveSizeBytes": "744988672", | |
| "creationTimestamp": "2025-10-31T13:32:56.760-07:00", |
| "archiveSizeBytes": "744988672", | ||
| "creationTimestamp": "2025-10-31T13:32:56.760-07:00", | ||
| "description": "Description for gg-asset-42745-fa77", | ||
| "diskSizeGb": "20", |
There was a problem hiding this comment.
| "diskSizeGb": "20", | |
| "diskSizeGb": 20, |
| "creationTimestamp": "2025-10-31T13:32:56.760-07:00", | ||
| "description": "Description for gg-asset-42745-fa77", | ||
| "diskSizeGb": "20", | ||
| "enableConfidentialCompute": false, |
There was a problem hiding this comment.
| "enableConfidentialCompute": false, |
| { | ||
| "type": "UEFI_COMPATIBLE" | ||
| }, | ||
| { | ||
| "type": "MULTI_IP_SUBNET" | ||
| }, | ||
| { | ||
| "type": "VIRTIO_SCSI_MULTIQUEUE" | ||
| }, | ||
| { | ||
| "type": "GVNIC" | ||
| } |
There was a problem hiding this comment.
| { | |
| "type": "UEFI_COMPATIBLE" | |
| }, | |
| { | |
| "type": "MULTI_IP_SUBNET" | |
| }, | |
| { | |
| "type": "VIRTIO_SCSI_MULTIQUEUE" | |
| }, | |
| { | |
| "type": "GVNIC" | |
| } | |
| { | |
| "type": "UEFI_COMPATIBLE" | |
| }, | |
| { | |
| "type": "MULTI_IP_SUBNET" | |
| } |
| "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-11-bullseye", | ||
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" |
There was a problem hiding this comment.
| "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-11-bullseye", | |
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" | |
| "projects/vm-options/global/licenses/enable-vmx" |
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" | ||
| ], | ||
| "name": "gg-asset-42745-fa77", | ||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", |
There was a problem hiding this comment.
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", |
| ], | ||
| "name": "gg-asset-42745-fa77", | ||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", |
There was a problem hiding this comment.
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", | |
| "sourceDisk": "projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", |
| "sourceDiskId": "1795891860089643546", | ||
| "sourceType": "RAW", | ||
| "status": "READY", |
There was a problem hiding this comment.
| "sourceDiskId": "1795891860089643546", | |
| "sourceType": "RAW", | |
| "status": "READY", |
| }, | ||
| "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||
| "discovery_name": "Image", | ||
| "location": "us-central1", |
There was a problem hiding this comment.
| "location": "us-central1", |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file, remove the `google_compute_disk` resource from the test case, and update the hardcoded `source_disk` value.
| "goog-terraform-provisioned": "true" | ||
| }, | ||
| "licenses": [ | ||
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" |
There was a problem hiding this comment.
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" | |
| "projects/vm-options/global/licenses/enable-vmx" |
Adds a Terraform Plan to CAI converter for the `google_compute_image` resource. This includes registering the pre-existing converter and adding a new test case to validate its functionality. This also addresses feedback from the pull request to use snake_case for JSON keys in the test file, remove the `google_compute_disk` resource from the test case, and update the hardcoded `source_disk` value.
This change adds a Terraform Plan to CAI converter for the
google_compute_imageresource. It registers the converter inmmv1/third_party/tgc/resource_converters.go.tmpland adds a new test case with both.tfand.jsonfiles.PR created automatically by Jules for task 16704852344800286332