terraform-provider-vault
terraform-provider-vault copied to clipboard
fix: Check-and-Set parameter
I'm newbie in Go. I encountered an error when setting cas_required: true
Error: error writing to Vault: Error making API request.
URL: PUT http://10.0.0.106:8200/v1/secret/data/roman/foo
Code: 400. Errors:
* check-and-set parameter required for this call
After reviewing the documentation Check-and-Set and KV Secrets Engine - Version 2 , I tried to fix it
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
Relates OR Closes #0000
Release note for CHANGELOG:
Fixed resource vault_generic_secret fail when cas_required is true
Output from acceptance testing:
$ TESTARGS="--run TestResourceGenericSecret" make testacc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./...) -v --run TestResourceGenericSecret -timeout 120m
? 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]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/codegen (cached) [no tests to run]
? github.com/hashicorp/terraform-provider-vault/generated [no test files]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation (cached) [no tests to run]
? github.com/hashicorp/terraform-provider-vault/schema [no test files]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vault/util (cached) [no tests to run]
=== RUN TestResourceGenericSecret
--- PASS: TestResourceGenericSecret (0.36s)
=== RUN TestResourceGenericSecret_deleted
--- PASS: TestResourceGenericSecret_deleted (0.36s)
PASS
ok github.com/hashicorp/terraform-provider-vault/vault (cached)
...