compute: add SNP_SVSM_CAPABLE and SEV_LIVE_MIGRATABLE_V2 to guest_os_features enum#16763
Open
edg4rgarci4 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Open
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @c2thorn, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
…features enum Add `SNP_SVSM_CAPABLE` to the `guest_os_features` enum for `google_compute_image` and `google_compute_region_disk`. The GCP Compute API already returns `SNP_SVSM_CAPABLE` on newer images (e.g. Ubuntu 24.04 based), but the provider's ValidateEnum rejects it, causing plan failures on import and force-replacement of existing images. Also adds `SEV_LIVE_MIGRATABLE_V2` to RegionDisk.yaml which was already present in Image.yaml but missing from RegionDisk. Fixes validation errors like: expected guest_os_features.0.type to be one of [...], got SNP_SVSM_CAPABLE
0595c22 to
d876cd5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
SNP_SVSM_CAPABLEto theguest_os_featurestype enum forgoogle_compute_imageandgoogle_compute_region_disk.Also adds
SEV_LIVE_MIGRATABLE_V2togoogle_compute_region_disk, which was already present ingoogle_compute_imagebut missing from RegionDisk.Problem
The GCP Compute API already returns
SNP_SVSM_CAPABLEas aguest_os_featurestype on newer images (e.g. Ubuntu 24.04-based custom images), but the provider'sValidateEnumrejects the value. This causes:terraform plan -generate-config-outto produce configs the provider then rejectsterraform importto fail validationFix
One-line addition to the
enum_valueslist in each affected YAML file:mmv1/products/compute/Image.yaml— addsSNP_SVSM_CAPABLEmmv1/products/compute/RegionDisk.yaml— addsSNP_SVSM_CAPABLEandSEV_LIVE_MIGRATABLE_V2Note:
google_compute_disk(Disk.yaml) usestype: Stringwith no enum validation for this field, so it already accepts any value and needs no change.References