Skip to content
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

Unblock EXTERNAL/EXTERNAL_VPC Cloud KMS key creation. #9931

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

tdbhacks
Copy link
Member

@tdbhacks tdbhacks commented Feb 6, 2024

The external_protection_level_options field had been nested within the attestation field by accident. See hashicorp/terraform-provider-google#15004 for more information about this change..

NOTE: this is the initial deprecation notice, and we are just adding a duplicate set of fields outside of attestation. When the old field is eventually removed, it should not break any CUJs because the current state of things does not allow for successful key creation (malformed requests would be rejected by the server). The old, deprecated field will be removed in the next release.

Release Note Template for Downstream PRs (will be copied)

kms: added top-level `external_protection_level_options` field in `google_kms_crypto_key_version` resource
kms: `attestation.external_protection_level_options` has been deprecated in favor of `external_protection_level_options` in `google_kms_crypto_key_version` 
kms: added `crypto_key_backend` field to `google_kms_crypto_key` resource

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

@trodge, 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
Copy link
Collaborator

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

Breaking Change(s) Detected

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

  • Field attestation.cert_chains.cavium_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_card_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_partition_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains MinItems went from 0 to 0 on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.external_protection_level_options.ekm_connection_key_path within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options.external_key_uri within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options within resource google_kms_crypto_key_version was either removed or renamed - 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.

Diff report

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

Terraform GA: Diff ( 3 files changed, 165 insertions(+), 52 deletions(-))
Terraform Beta: Diff ( 3 files changed, 165 insertions(+), 52 deletions(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))

Missing test report

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

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

resource "google_kms_crypto_key_version" "primary" {
  external_protection_level_options {
    ekm_connection_key_path = # value needed
    external_key_uri        = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 26
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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:

Breaking Change(s) Detected

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

  • Field attestation.cert_chains.cavium_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_card_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_partition_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains MinItems went from 0 to 0 on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.external_protection_level_options.ekm_connection_key_path within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options.external_key_uri within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options within resource google_kms_crypto_key_version was either removed or renamed - 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.

Diff report

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

Terraform GA: Diff ( 3 files changed, 171 insertions(+), 52 deletions(-))
Terraform Beta: Diff ( 3 files changed, 171 insertions(+), 52 deletions(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))

Missing test report

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

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

resource "google_kms_crypto_key_version" "primary" {
  external_protection_level_options {
    ekm_connection_key_path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 26
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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:

Breaking Change(s) Detected

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

  • Field attestation.cert_chains.cavium_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_card_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_partition_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains MinItems went from 0 to 0 on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.external_protection_level_options.ekm_connection_key_path within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options.external_key_uri within resource google_kms_crypto_key_version was either removed or renamed - reference
  • Field attestation.external_protection_level_options within resource google_kms_crypto_key_version was either removed or renamed - 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.

Diff report

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

Terraform GA: Diff ( 3 files changed, 172 insertions(+), 52 deletions(-))
Terraform Beta: Diff ( 3 files changed, 172 insertions(+), 52 deletions(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))

Missing test report

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

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

resource "google_kms_crypto_key_version" "primary" {
  external_protection_level_options {
    ekm_connection_key_path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 26
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@tdbhacks
Copy link
Member Author

tdbhacks commented Feb 8, 2024

Note to reviewer: following internal discussions, this PR will need to be reworked a bit. I will let you know when it's ready for review.

@tdbhacks
Copy link
Member Author

Reworked this PR, looking for /gcbrun to see if the test works now, as well as an initial review!

@trodge
Copy link
Contributor

trodge commented Feb 23, 2024

/gcbrun

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

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

  • Field attestation.cert_chains.cavium_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_card_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains.google_partition_certs became Computed only on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains MinItems went from 0 to 0 on google_kms_crypto_key_version - reference
  • Field attestation.cert_chains became Computed only on google_kms_crypto_key_version - 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.

Diff report

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

Terraform GA: Diff ( 3 files changed, 210 insertions(+), 27 deletions(-))
Terraform Beta: Diff ( 3 files changed, 210 insertions(+), 27 deletions(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))

Missing test report

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

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

resource "google_kms_crypto_key_version" "primary" {
  external_protection_level_options {
    ekm_connection_key_path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests: 26
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@tdbhacks
Copy link
Member Author

Updated to undo remaining breaking changes, which will be done in a follow up PR. Looking for /gcbrun again

@tdbhacks
Copy link
Member Author

tdbhacks commented Mar 5, 2024

@trodge mind /gcbrun -ing again? Thanks!

@trodge
Copy link
Contributor

trodge commented Mar 7, 2024

/gcbrun

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

Terraform GA: Diff ( 3 files changed, 190 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 190 insertions(+), 1 deletion(-))
TF Conversion: Diff ( 1 file changed, 40 insertions(+))

Missing test report

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

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

resource "google_kms_crypto_key_version" "primary" {
  external_protection_level_options {
    ekm_connection_key_path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 32
Passed tests: 28
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptions[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@c2thorn
Copy link
Member

c2thorn commented Mar 7, 2024

@trodge You can assign me to this if you want, it's similar to another PR that I reviewed.

@c2thorn
Copy link
Member

c2thorn commented Mar 7, 2024

/gcbrun

@github-actions github-actions bot requested a review from c2thorn March 26, 2024 19:20
@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 ( 5 files changed, 382 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 382 insertions(+), 1 deletion(-))
terraform-google-conversion: Diff ( 2 files changed, 50 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 33
Passed tests: 29
Skipped tests: 3
Affected tests: 1

Click here to see the affected service packages
  • kms

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptionsVpc

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccKmsCryptoKeyVersion_externalProtectionLevelOptionsVpc[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

* Add cryptoKeyBackend field to KMS CryptoKey.
* Add top-level external_protection_level_options to CryptoKeyVersion.
* Add custom pre_update code for KMS CryptoKeyVersion
* Run EXTERNAL_VPC acceptance test only in nightly/GA builds
@tdbhacks
Copy link
Member Author

I just squashed all commits, now waiting for a successful VCR run before I add the tag to only run the VPC test in nightly/GA builds

@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 ( 5 files changed, 382 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 382 insertions(+), 1 deletion(-))
terraform-google-conversion: Diff ( 2 files changed, 50 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 33
Passed tests: 30
Skipped tests: 3
Affected tests: 0

Click here to see the affected service packages
  • kms

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@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 ( 5 files changed, 388 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 388 insertions(+), 1 deletion(-))
terraform-google-conversion: Diff ( 2 files changed, 50 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 33
Passed tests: 29
Skipped tests: 4
Affected tests: 0

Click here to see the affected service packages
  • kms

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@tdbhacks
Copy link
Member Author

Alright, looks like the test was skipped correctly! @c2thorn ready for the final review, I've updated the PR title and description but let me know if you'd like me to tweak something. Thanks!

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, confirmed test logs stored on internal ticket for other EKM tests.
I'll check the nightly tomorrow to see how it goes with the permissions.

@c2thorn c2thorn merged commit a1e15b7 into GoogleCloudPlatform:main Mar 27, 2024
13 checks passed
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Mar 27, 2024
pjotrekk pushed a commit to pjotrekk/magic-modules that referenced this pull request Apr 2, 2024
cmfeng pushed a commit to cmfeng/cmfeng-magic-modules that referenced this pull request Apr 5, 2024
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Apr 9, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request Apr 19, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
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.

5 participants