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

Fix KV incorrect metadata path for prefixed mounts #1781

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

vinay-gopalan
Copy link
Contributor

@vinay-gopalan vinay-gopalan commented Mar 1, 2023

In v3.13.0, we aimed to incorporate a fix for the construction of the metadata path for KV V2 secrets (#1722). Unfortunately, this introduced a regression for customers that had prefixed mounts (mounts that were prefixed with a string and contained a /, for example cloud-metadata/kvv2-mount). This PR includes a fix that correctly parses mount and secret names from the ID path using regexes.

A test has been modified to also test for prefixed mounts. This test fails without the addition of the fixes in this PR.

Fixes #1770 #1780

$ make testacc TESTARGS='-v -run TestAccKVSecretV2'
=== RUN   TestAccKVSecretV2
--- PASS: TestAccKVSecretV2 (5.46s)
PASS

@vinay-gopalan vinay-gopalan requested review from a team and fairclothjm March 1, 2023 21:38
@github-actions github-actions bot added the size/M label Mar 1, 2023
@vinay-gopalan vinay-gopalan added this to the 3.14.0 milestone Mar 1, 2023
vault/resource_kv_secret_v2.go Show resolved Hide resolved
@mouellet
Copy link

mouellet commented Mar 9, 2023

When can we expect a release with this fix? Without it, risk of ending up with a corrupted state is pretty high!

@vinay-gopalan vinay-gopalan modified the milestones: 3.13.1, 3.14.0 Mar 14, 2023
@vinay-gopalan
Copy link
Contributor Author

Apologies for the delay. We had to move some things around in the release to incorporate some features that needed to be added after Vault 1.13 was released. The fix for this issue has been released as part of TFVP v3.14.0. We appreciate your patience, and please let us know if you see this issue again! 🙏🏼

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.

vault_kv_secret_v2 incorrect metadata path
4 participants