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 construction of metadata path in KV V2 resource #1722

Merged
merged 7 commits into from
Feb 16, 2023

Conversation

vinay-gopalan
Copy link
Contributor

@vinay-gopalan vinay-gopalan commented Jan 10, 2023

In v3.12.0 we enabled support for adding metadata to KV V2 secrets. This introduced a regression due to incorrect construction of the metadata path while reading metadata from Vault. This PR fixes the construction of the metadata path, and also ensures that the fields name and mount are now being set on imports. The PR also adds an updated test to cover the use-cases that would reproduce this bug.

Fixes #1719

=== RUN   TestAccKVSecretV2
--- PASS: TestAccKVSecretV2 (4.73s)
PASS

@vinay-gopalan vinay-gopalan added this to the 3.12.1 milestone Jan 10, 2023
Copy link
Contributor

@benashz benashz left a comment

Choose a reason for hiding this comment

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

Seems good. I had a few questions/suggestions that probably need to be looked at.

vault/resource_kv_secret_v2.go Outdated Show resolved Hide resolved
vault/resource_kv_secret_v2_test.go Outdated Show resolved Hide resolved
vault/resource_kv_secret_v2_test.go Show resolved Hide resolved
@vinay-gopalan vinay-gopalan modified the milestones: 3.12.1, 3.13.0 Feb 14, 2023
@github-actions github-actions bot added size/M and removed size/S labels Feb 14, 2023
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.

bug: metadata functionality has broken kv_secret_v2 resource
3 participants