terraform-provider-vault icon indicating copy to clipboard operation
terraform-provider-vault copied to clipboard

Serialize data_json as well as data on read of kvv1

Open joey-squid opened this issue 1 year ago • 2 comments

Description

When reading a kvv1 secret, this PR updates both data_json and data (previously this was just data). This catches any discrepancies and drifts.

Note that this may cause diffs to appear where they didn't before. This is because the diffs were always there but ignored by default.

Closes #2143

Checklist

  • [x] 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=TestAccKVSecret'
Test and changelog
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -run=TestAccKVSecret -timeout 30m ./...
?   	github.com/hashicorp/terraform-provider-vault	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/cmd/coverage	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/cmd/generate	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/helper	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/internal/consts	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/internal/identity/group	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/internal/identity/mfa	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/internal/pki	[no test files]
ok  	github.com/hashicorp/terraform-provider-vault/codegen	(cached) [no tests to run]
ok  	github.com/hashicorp/terraform-provider-vault/internal/identity/entity	(cached) [no tests to run]
?   	github.com/hashicorp/terraform-provider-vault/internal/sync	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/schema	[no test files]
ok  	github.com/hashicorp/terraform-provider-vault/internal/provider	(cached) [no tests to run]
ok  	github.com/hashicorp/terraform-provider-vault/testutil	(cached) [no tests to run]
ok  	github.com/hashicorp/terraform-provider-vault/util	(cached) [no tests to run]
ok  	github.com/hashicorp/terraform-provider-vault/vault	4.236s

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

joey-squid avatar Feb 15 '24 18:02 joey-squid

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Feb 15 '24 18:02 hashicorp-cla

Not sure how to run tests against other versions of Vault. (I'm also not sure my change is even correct, but that's a different story :) )

joey-squid avatar Feb 15 '24 18:02 joey-squid

Superseded by https://github.com/hashicorp/terraform-provider-vault/pull/2207

fairclothjm avatar Mar 25 '24 20:03 fairclothjm