The 2 secrets get created, but there is a perpetual diff in secret "test_2" because of the word "data" in the secret path. The provider attempts to delete and recreate the secret every plan/apply. The logic in the provider seems to be confusing the word "data" in the secret path, with the data prefix that KV v2 secrets have.
Terraform Core Version
1.6.5
Terraform Vault Provider Version
3.23.0
Vault Server Version
1.15.3
Affected Resource(s)
vault_kv_secret_v2
Expected Behavior
Given the following terraform code, you would expect a secret backend and 2 secrets to be created.
Actual Behavior
The 2 secrets get created, but there is a perpetual diff in secret "test_2" because of the word "data" in the secret path. The provider attempts to delete and recreate the secret every plan/apply. The logic in the provider seems to be confusing the word "data" in the secret path, with the data prefix that KV v2 secrets have.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
None.
Steps to Reproduce
./vault server -dev -dev-listen-address="0.0.0.0:8200"
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None