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

Add retry for google_kms_crypto_key_version #3255

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

c2thorn
Copy link
Member

@c2thorn c2thorn commented Mar 16, 2020

Fixes hashicorp/terraform-provider-google#5895

Release Note Template for Downstream PRs (will be copied)

kms: Fixed an issue in `google_kms_crypto_key_version` where `public_key` would return empty after apply

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 20 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 20 insertions(+), 1 deletion(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 20 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 20 insertions(+), 1 deletion(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@c2thorn c2thorn requested a review from emilymye March 16, 2020 22:36
@@ -105,7 +105,16 @@ func dataSourceGoogleKmsCryptoKeyVersionRead(d *schema.ResourceData, meta interf
return err
}
log.Printf("[DEBUG] Getting public key of CryptoKeyVersion: %#v", url)
res, _ = sendRequest(config, "GET", cryptoKeyId.KeyRingId.Project, url, nil)

err = retryTimeDuration(func() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

you should be able to specify the error retry pred and timeout using sendRequestWithTimeout instead, and you won't need this retryTimeDuration

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 17 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 2 files changed, 17 insertions(+), 1 deletion(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))

@c2thorn c2thorn requested a review from emilymye March 18, 2020 23:04
@c2thorn c2thorn changed the title Add retryTimeDuration for google_kms_crypto_key_version Add retry for google_kms_crypto_key_version Mar 20, 2020
@c2thorn c2thorn merged commit c3cfda2 into GoogleCloudPlatform:master Mar 23, 2020
@c2thorn c2thorn deleted the public-key-retry branch March 23, 2020 18:10
nathkn pushed a commit to nathkn/magic-modules that referenced this pull request May 18, 2020
* Add retryTimeDuration for crypto key versions

* Change to sendRequestWithTimeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_kms_crypto_key_version public_key returns 400
4 participants