Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Retry Write on kv-v2 config #1955

Merged
merged 4 commits into from
Jul 26, 2023

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Jul 25, 2023

TFVP fails to create a KV secret backed when Vault is upgrading from kv-v1 to kv-v2 storage. The upgrade process is done async, so the provider should be able to retry the original request whenever the error is encountered.

This PR adds support for retrying create/update operations on the vault_kv_secret_backend_v2 resource.

Example error:

"Error: error writing config data to kv_2/config, err=Error making API request.\n\nNamespace: foo\nURL: PUT https://localhost:8200/v1/kv_2/config\nCode: 400. Errors:\n\n* Waiting for the primary to upgrade from non-versioned to versioned data. This backend will be unavailable for a brief period and will resume service when the primary is finished."

@benashz benashz requested a review from vinay-gopalan July 26, 2023 15:53
@benashz benashz marked this pull request as ready for review July 26, 2023 15:53
Copy link
Contributor

@vinay-gopalan vinay-gopalan left a comment

Choose a reason for hiding this comment

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

LGTM, had one question

@benashz benashz merged commit 96cc49e into main Jul 26, 2023
@benashz benashz deleted the VAULT-18467/retry-kv-secret-backend-v2-creation branch July 26, 2023 19:15
@benashz benashz added this to the 3.19.0 milestone Jul 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants