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

KMS: add plural data source for resource_google_kms_key_ring #2475

Conversation

modular-magician
Copy link
Collaborator

This PR adds a new plural data source google_kms_key_rings.

Note:

  • It's necessary to explicitly add the id field to the schema for each individual key ring. Similar behavior also appears here: Add plural data source google_kms_crypto_keys magic-modules#11053
  • One attribute is missing which is the createTime. Only reason why this wasn't ended in this PR is due the attribute not being included in resource_google_kms_key_ring.go

Running locally:

└─(16:10:49 on main ✹ ✭)──> envchain GCLOUD make testacc TEST=./google/services/kms TESTARGS='-run TestAccDataSourceGoogleKmsKeyRings_basic'                                                     2 ↵ ──(Wed,Jun26)─┘
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/kms -v -run TestAccDataSourceGoogleKmsKeyRings_basic -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceGoogleKmsKeyRings_basic
2024/06/26 16:11:06 [INFO] Authenticating using configured Google JSON 'credentials'...
2024/06/26 16:11:06 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2024/06/26 16:11:06 [INFO] Authenticating using configured Google JSON 'credentials'...
2024/06/26 16:11:06 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2024/06/26 16:11:06 [DEBUG] Waiting for state to become: [success]
2024/06/26 16:11:06 [INFO] Terraform is using this identity: mauricio-alvarezleon@hc-terraform-testing.iam.gserviceaccount.com
2024/06/26 16:11:06 [INFO] Instantiating Google Cloud KMS client for path https://cloudkms.googleapis.com/
2024/06/26 16:11:06 [DEBUG] Retry Transport: starting RoundTrip retry loop
2024/06/26 16:11:06 [DEBUG] Retry Transport: request attempt 0
2024/06/26 16:11:07 [DEBUG] Retry Transport: Stopping retries, last request was successful
2024/06/26 16:11:07 [DEBUG] Retry Transport: Returning after 1 attempts
2024/06/26 16:11:07 [DEBUG] Retry Transport: starting RoundTrip retry loop
2024/06/26 16:11:07 [DEBUG] Retry Transport: request attempt 0
2024/06/26 16:11:07 [DEBUG] Retry Transport: Stopping retries, last request was successful
2024/06/26 16:11:07 [DEBUG] Retry Transport: Returning after 1 attempts
--- PASS: TestAccDataSourceGoogleKmsKeyRings_basic (25.72s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/kms      26.964s

Release Note Template for Downstream PRs (will be copied)

`google_kms_key_rings`

Derived from GoogleCloudPlatform/magic-modules#11061

…061)

Co-authored-by: Sarah French <[email protected]>

[upstream:b03e72f5f5f54fcfed067ed3e4fc8afa51a8f9e1]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner June 28, 2024 22:01
@modular-magician modular-magician requested review from ScottSuarez and removed request for a team June 28, 2024 22:01
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@modular-magician modular-magician merged commit 6ec9163 into GoogleCloudPlatform:main Jun 28, 2024
5 of 6 checks passed
@modular-magician modular-magician deleted the downstream-pr-b03e72f5f5f54fcfed067ed3e4fc8afa51a8f9e1 branch November 18, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant