Skip to content

secret/kvv2: fix drift detection when disable_read is enabled - #2039

Merged
fairclothjm merged 3 commits into
mainfrom
VAULT-13021/kvv2/disable-read
Oct 9, 2023
Merged

secret/kvv2: fix drift detection when disable_read is enabled#2039
fairclothjm merged 3 commits into
mainfrom
VAULT-13021/kvv2/disable-read

Conversation

@fairclothjm

@fairclothjm fairclothjm commented Oct 5, 2023

Copy link
Copy Markdown
Collaborator

Description

This PR fixes a bug with disable_read for the kvv2 secrets resource. When disable_read is true we remove the computed data keys from the diff. Otherwise, we will report drift because they were never set but the provider expects them to be because they are computed fields.

Closes #1668

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

@github-actions github-actions Bot added the size/M label Oct 5, 2023
@fairclothjm
fairclothjm requested a review from a team October 5, 2023 15:36
@fairclothjm
fairclothjm force-pushed the VAULT-13021/kvv2/disable-read branch from f189c9a to 524681d Compare October 9, 2023 14:38
@fairclothjm fairclothjm added this to the 3.21.0 milestone Oct 9, 2023
@fairclothjm
fairclothjm force-pushed the VAULT-13021/kvv2/disable-read branch from 524681d to 49af495 Compare October 9, 2023 19:13

@vinay-gopalan vinay-gopalan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM and manual testing also passes 😄 Thanks for working on this!

@fairclothjm
fairclothjm force-pushed the VAULT-13021/kvv2/disable-read branch from 49af495 to 6460721 Compare October 9, 2023 20:11
@fairclothjm
fairclothjm merged commit f8375be into main Oct 9, 2023
@fairclothjm
fairclothjm deleted the VAULT-13021/kvv2/disable-read branch October 9, 2023 20:11
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.

disable_read argument does not work with vault_kv_secret_v2

2 participants