-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add converter for google_compute_image #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
2ab7eb1
d8a5116
694ae5f
4640132
87b9c7f
a2ac4f9
e805130
452364d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||||||||||||||||||||||||||||||||||
| [ | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", | ||||||||||||||||||||||||||||||||||||||
| "asset_type": "compute.googleapis.com/Image", | ||||||||||||||||||||||||||||||||||||||
| "name": "//compute.googleapis.com/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
| "resource": { | ||||||||||||||||||||||||||||||||||||||
| "data": { | ||||||||||||||||||||||||||||||||||||||
| "architecture": "X86_64", | ||||||||||||||||||||||||||||||||||||||
| "archiveSizeBytes": "744988672", | ||||||||||||||||||||||||||||||||||||||
| "creationTimestamp": "2025-10-31T13:32:56.760-07:00", | ||||||||||||||||||||||||||||||||||||||
| "description": "Description for gg-asset-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
| "diskSizeGb": "20", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "enableConfidentialCompute": false, | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "family": "gg-asset-family-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
| "guestOsFeatures": [ | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "type": "UEFI_COMPATIBLE" | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "type": "MULTI_IP_SUBNET" | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "type": "VIRTIO_SCSI_MULTIQUEUE" | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "type": "GVNIC" | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+17
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||
| "id": "8576338055767040535", | ||||||||||||||||||||||||||||||||||||||
| "labelFingerprint": "chixLqmyz58=", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "labels": { | ||||||||||||||||||||||||||||||||||||||
| "gg-asset-label-42745-fa77": "gg-asset-value-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
| "goog-terraform-provisioned": "true" | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| "licenseCodes": [ | ||||||||||||||||||||||||||||||||||||||
| "3853522013536123851", | ||||||||||||||||||||||||||||||||||||||
| "1002001" | ||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "licenses": [ | ||||||||||||||||||||||||||||||||||||||
| "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" | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||
| "name": "gg-asset-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
| "selfLink": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/global/images/gg-asset-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "sourceDisk": "https://www.googleapis.com/compute/v1/projects/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "sourceDiskId": "1795891860089643546", | ||||||||||||||||||||||||||||||||||||||
| "sourceType": "RAW", | ||||||||||||||||||||||||||||||||||||||
| "status": "READY", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "storageLocations": [ | ||||||||||||||||||||||||||||||||||||||
| "us-central1" | ||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||||||||||||||||||||||||||||||||||||||
| "discovery_name": "Image", | ||||||||||||||||||||||||||||||||||||||
| "location": "us-central1", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "parent": "//cloudresourcemanager.googleapis.com/projects/{{.Project.Number}}", | ||||||||||||||||||||||||||||||||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||||||||||||
| "version": "v1" | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| "updateTime": "2025-10-31T20:34:04.087302Z" | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| terraform { | ||
| required_providers { | ||
| google = { | ||
| source = "hashicorp/google" | ||
| version = ">= 4.51.0" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| provider "google" { | ||
| project = "{{.Provider.project}}" | ||
| } | ||
|
|
||
| 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/{{.Provider.project}}/zones/us-central1-a/disks/gg-asset-source-disk-42745-fa77" | ||
| family = "gg-asset-family-42745-fa77" | ||
| description = "Description for gg-asset-42745-fa77" | ||
| labels = { | ||
| "gg-asset-label-42745-fa77" = "gg-asset-value-42745-fa77" | ||
| } | ||
| licenses = [ | ||
| "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" | ||
| ] | ||
| guest_os_features { | ||
| type = "UEFI_COMPATIBLE" | ||
| } | ||
| guest_os_features { | ||
| type = "MULTI_IP_SUBNET" | ||
| } | ||
| storage_locations = [ | ||
| "us-central1", | ||
| ] | ||
| disk_size_gb = 20 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.