Skip to content

add is_missing_in_cai attribute to encryption key fields in compute#17548

Open
harshulsoni wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
harshulsoni:cai_snapshot_key
Open

add is_missing_in_cai attribute to encryption key fields in compute#17548
harshulsoni wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
harshulsoni:cai_snapshot_key

Conversation

@harshulsoni
Copy link
Copy Markdown
Contributor

@harshulsoni harshulsoni commented May 13, 2026

Add is_missing_in_cai attribute to encryption key fields in compute. This prevents the user-provided raw encryption key to be exported to Google Cloud Asset Inventory (CAI) during Terraform's CAI export process. CAI is frequently used, and exporting encryption keys into asset inventory pipelines defeats the purpose of Customer Suppled Encryption Keys (CSEK).

compute: add is_missing_in_cai attribute to encryption key fields in compute resources

@github-actions github-actions Bot requested a review from zli82016 May 13, 2026 22:52
@github-actions
Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@zli82016, 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.

@modular-magician

This comment was marked as outdated.

@zli82016
Copy link
Copy Markdown
Member

@harshulsoni , can you share more context for this PR? Thanks.

@melinath
Copy link
Copy Markdown
Member

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit a2f10dc:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 5 insertions(+)
google-beta provider View Diff 2 files changed, 6 insertions(+)
terraform-google-conversion View Diff 4 files changed, 11 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_machine_image (33 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_machine_image" "primary" {
  machine_image_encryption_key {
    raw_key = # value needed
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
1447 1318 93 36
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 36 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeAutoscaler_autoscalerBasicExample
  • TestAccComputeAutoscaler_autoscalerSingleInstanceExample
  • TestAccComputeAutoscaler_multicondition
  • TestAccComputeAutoscaler_scaleDownControl
  • TestAccComputeAutoscaler_scaleInControl
  • TestAccComputeAutoscaler_scaleInControlFixed
  • TestAccComputeAutoscaler_scalingSchedule
  • TestAccComputeAutoscaler_update
  • TestAccComputeForwardingRule_forwardingRuleBasicExample
  • TestAccComputeForwardingRule_forwardingRulePscTargetUpdateRecreate
  • TestAccComputeForwardingRule_ip
  • TestAccComputeForwardingRule_networkTier
  • TestAccComputeForwardingRule_serviceDirectoryRegistrations
  • TestAccComputeForwardingRule_update
  • TestAccComputeInstanceFromTemplate_DiskForceAttach
  • TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
  • TestAccComputeRegionAutoscaler_scaleDownControl
  • TestAccComputeRegionAutoscaler_scaleInControl
  • TestAccComputeRegionAutoscaler_scalingSchedule
  • TestAccComputeRegionAutoscaler_update
  • TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
  • TestAccComputeTargetPool_update
  • TestAccComputeTargetPool_withSecurityPolicy
  • TestAccDataSourceGoogleComputeInstanceGroupManager
  • TestAccDataSourceGoogleComputeRegionInstanceGroupManager
  • TestAccDataSourceGoogleForwardingRule
  • TestAccDataSourceGoogleForwardingRules
  • TestAccInstanceGroupManager_autoHealingPolicies
  • TestAccInstanceGroupManager_basic
  • TestAccInstanceGroupManager_self_link_unique
  • TestAccInstanceGroupManager_stateful
  • TestAccInstanceGroupManager_update
  • TestAccInstanceGroupManager_waitForStatus
  • TestAccRegionInstanceGroupManager_autoHealingPolicies
  • TestAccRegionInstanceGroupManager_basic
  • TestAccRegionInstanceGroupManager_update

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeAutoscaler_autoscalerBasicExample
✅ Log TestAccComputeAutoscaler_autoscalerSingleInstanceExample
✅ Log TestAccComputeAutoscaler_multicondition
✅ Log TestAccComputeAutoscaler_scaleDownControl
✅ Log TestAccComputeAutoscaler_scaleInControl
✅ Log TestAccComputeAutoscaler_scaleInControlFixed
✅ Log TestAccComputeAutoscaler_scalingSchedule
✅ Log TestAccComputeAutoscaler_update
✅ Log TestAccComputeForwardingRule_forwardingRuleBasicExample
✅ Log TestAccComputeForwardingRule_forwardingRulePscTargetUpdateRecreate
✅ Log TestAccComputeForwardingRule_networkTier
✅ Log TestAccComputeForwardingRule_serviceDirectoryRegistrations
✅ Log TestAccComputeForwardingRule_update
✅ Log TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
✅ Log TestAccComputeRegionAutoscaler_scaleDownControl
✅ Log TestAccComputeRegionAutoscaler_scaleInControl
✅ Log TestAccComputeRegionAutoscaler_scalingSchedule
✅ Log TestAccComputeRegionAutoscaler_update
✅ Log TestAccComputeTargetPool_update
✅ Log TestAccDataSourceGoogleComputeInstanceGroupManager
✅ Log TestAccDataSourceGoogleComputeRegionInstanceGroupManager
✅ Log TestAccDataSourceGoogleForwardingRule
✅ Log TestAccDataSourceGoogleForwardingRules
✅ Log TestAccInstanceGroupManager_autoHealingPolicies
✅ Log TestAccInstanceGroupManager_basic
✅ Log TestAccInstanceGroupManager_self_link_unique
✅ Log TestAccInstanceGroupManager_stateful
✅ Log TestAccInstanceGroupManager_update
✅ Log TestAccInstanceGroupManager_waitForStatus
✅ Log TestAccRegionInstanceGroupManager_autoHealingPolicies
✅ Log TestAccRegionInstanceGroupManager_basic
✅ Log TestAccRegionInstanceGroupManager_update
❌ Error · Log - TestAccComputeForwardingRule_ip
❌ Error · Log - TestAccComputeInstanceFromTemplate_DiskForceAttach
❌ Error · Log - TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
❌ Error · Log - TestAccComputeTargetPool_withSecurityPolicy

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the build log or the debug logs folder for detailed results.

@harshulsoni, @zli82016 VCR tests complete for a2f10dc!

@harshulsoni
Copy link
Copy Markdown
Contributor Author

@zli82016 this is for an internal bug b/510911000. Updated the PR description to give more details.

@github-actions
Copy link
Copy Markdown

@zli82016 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants