Skip to content

Compute disk write only attributes #14145

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

malhotrasagar2212
Copy link

@malhotrasagar2212 malhotrasagar2212 commented May 29, 2025

compute: added raw_key_wo, rsa_encrypted_key and new_keys_wo fields in resource_google_compute_disk resource

compute: added raw_key_woandnew_keys_wofields inresource_google_region_compute_disk resource

And resolved the previous 404 error that arose due to adding these write only fields.

See Write release notes for guidance.


Copy link

google-cla bot commented May 29, 2025

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.

@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 740 insertions(+), 91 deletions(-))
google-beta provider: Diff ( 10 files changed, 760 insertions(+), 94 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 66 insertions(+), 2 deletions(-))

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field disk_encryption_key.raw_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference
  • Field disk_encryption_key.raw_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_region_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference
  • Field disk_encryption_key.rsa_encrypted_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Missing test report

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

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

resource "google_compute_disk" "primary" {
  description = # value needed
  disk_encryption_key {
    rsa_encrypted_key_wo         = # value needed
    rsa_encrypted_key_wo_version = # value needed
  }
  interface = # value needed
  source_image_encryption_key {
    kms_key_self_link       = # value needed
    kms_key_service_account = # value needed
    raw_key                 = # value needed
  }
  source_snapshot_encryption_key {
    kms_key_self_link       = # value needed
    kms_key_service_account = # value needed
    raw_key                 = # value needed
  }
}

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_compute_disk
    • Expected Document Path: /website/docs/r/compute_disk.html.markdown
    • Fields: [disk_encryption_key.raw_key_wo disk_encryption_key.raw_key_wo_version disk_encryption_key.rsa_encrypted_key_wo disk_encryption_key.rsa_encrypted_key_wo_version]
  • google_compute_region_disk
    • Expected Document Path: /website/docs/r/compute_region_disk.html.markdown
    • Fields: [disk_encryption_key.raw_key_wo disk_encryption_key.raw_key_wo_version]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1213
Passed tests: 1121
Skipped tests: 83
Affected tests: 9

Click here to see the affected service packages
  • compute
#### Action taken
Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeDisk_architecture
  • TestAccComputeDisk_diskBasicWoExample
  • TestAccComputeDisk_encryption
  • TestAccComputeDisk_featuresUpdated
  • TestAccComputeDisk_update_wo
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update
  • TestAccComputeRegionDisk_diskEncryptionKeyWoUpdated
  • TestAccComputeRegionDisk_regionDiskDiskEncryptionKeyWoExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeDisk_diskBasicWoExample [Debug log]
TestAccComputeDisk_update_wo [Debug log]
TestAccComputeRegionDisk_diskEncryptionKeyWoUpdated [Debug log]
TestAccComputeRegionDisk_regionDiskDiskEncryptionKeyWoExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccComputeDisk_architecture [Error message] [Debug log]
TestAccComputeDisk_encryption [Error message] [Debug log]
TestAccComputeDisk_featuresUpdated [Error message] [Debug log]
TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample [Error message] [Debug log]
TestAccComputeFirewallPolicyWithRules_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 10 files changed, 732 insertions(+), 90 deletions(-))
google-beta provider: Diff ( 10 files changed, 752 insertions(+), 93 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 66 insertions(+), 2 deletions(-))

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field disk_encryption_key.raw_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference
  • Field disk_encryption_key.raw_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_region_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference
  • Field disk_encryption_key.rsa_encrypted_key_wo_version added as optional with a default value and force new on pre-existing resource google_compute_disk. This can be allowed if there is a confirmed API-level default that matches the schema default - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Missing test report

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

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

resource "google_compute_disk" "primary" {
  description = # value needed
  disk_encryption_key {
    rsa_encrypted_key_wo         = # value needed
    rsa_encrypted_key_wo_version = # value needed
  }
  interface = # value needed
  source_image_encryption_key {
    kms_key_self_link       = # value needed
    kms_key_service_account = # value needed
    raw_key                 = # value needed
  }
  source_snapshot_encryption_key {
    kms_key_self_link       = # value needed
    kms_key_service_account = # value needed
    raw_key                 = # value needed
  }
}

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_compute_disk
    • Expected Document Path: /website/docs/r/compute_disk.html.markdown
    • Fields: [disk_encryption_key.raw_key_wo disk_encryption_key.raw_key_wo_version disk_encryption_key.rsa_encrypted_key_wo disk_encryption_key.rsa_encrypted_key_wo_version]
  • google_compute_region_disk
    • Expected Document Path: /website/docs/r/compute_region_disk.html.markdown
    • Fields: [disk_encryption_key.raw_key_wo disk_encryption_key.raw_key_wo_version]

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1213
Passed tests: 1125
Skipped tests: 83
Affected tests: 5

Click here to see the affected service packages
  • compute
#### Action taken
Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeDisk_architecture
  • TestAccComputeDisk_attributionLabelOnCreation
  • TestAccComputeDisk_update
  • TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample
  • TestAccComputeFirewallPolicyWithRules_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeDisk_architecture [Debug log]
TestAccComputeDisk_attributionLabelOnCreation [Debug log]
TestAccComputeDisk_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccComputeFirewallPolicyWithRules_computeFirewallPolicyWithRulesFullExample [Error message] [Debug log]
TestAccComputeFirewallPolicyWithRules_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

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.

2 participants