Skip to content

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
edg4rgarci4:add-snp-svsm-capable-guest-os-feature
Open

compute: add SNP_SVSM_CAPABLE and SEV_LIVE_MIGRATABLE_V2 to guest_os_features enum#16763
edg4rgarci4 wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
edg4rgarci4:add-snp-svsm-capable-guest-os-feature

Conversation

@edg4rgarci4
Copy link

@edg4rgarci4 edg4rgarci4 commented Mar 19, 2026

Description

Add SNP_SVSM_CAPABLE to the guest_os_features type enum for google_compute_image and google_compute_region_disk.

Also adds SEV_LIVE_MIGRATABLE_V2 to google_compute_region_disk, which was already present in google_compute_image but missing from RegionDisk.

Problem

The GCP Compute API already returns SNP_SVSM_CAPABLE as a guest_os_features type on newer images (e.g. Ubuntu 24.04-based custom images), but the provider's ValidateEnum rejects the value. This causes:

  • terraform plan -generate-config-out to produce configs the provider then rejects
  • terraform import to fail validation
  • Existing images with this feature to show as force-replacement (destroy + recreate) because the feature is silently dropped from state

Fix

One-line addition to the enum_values list in each affected YAML file:

  • mmv1/products/compute/Image.yaml — adds SNP_SVSM_CAPABLE
  • mmv1/products/compute/RegionDisk.yaml — adds SNP_SVSM_CAPABLE and SEV_LIVE_MIGRATABLE_V2

Note: google_compute_disk (Disk.yaml) uses type: String with no enum validation for this field, so it already accepts any value and needs no change.

References

compute: added `SNP_SVSM_CAPABLE` to `guest_os_features` enum for `google_compute_image` and `google_compute_region_disk` resources
compute: added `SEV_LIVE_MIGRATABLE_V2` to `guest_os_features` enum for `google_compute_region_disk` resource

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Mar 19, 2026
@google-cla
Copy link

google-cla bot commented Mar 19, 2026

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.

@github-actions
Copy link

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.

@github-actions github-actions bot requested a review from c2thorn March 19, 2026 03:48
…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
@edg4rgarci4 edg4rgarci4 force-pushed the add-snp-svsm-capable-guest-os-feature branch from 0595c22 to d876cd5 Compare March 19, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants