terraform-provider-hcp
terraform-provider-hcp copied to clipboard
plugin crashes when using secret data tags
Terraform Version and Provider Version
Terraform version: 1.8.3
HCP provider version: 0.88.0
I'm on Fedora Linux x86 if it matters.
Affected Resource(s)
- At least
hcp_vault_secrets_secret
, but maybe others
Terraform Configuration Files
data "hcp_vault_secrets_secret" "bot_token" {
app_name = "non-tf-managed"
secret_name = "bot_token"
}
data "hcp_vault_secrets_secret" "bot_owner" {
app_name = "non-tf-managed"
secret_name = "bot_owner"
}
Panic Output
https://gist.github.com/skylerspaeth/9f2b66b6d47e041bf55d344c715a1c82
Steps to Reproduce
Not sure. At first only seemed to encounter the error when the secret contained only numbers. Then I would add a single alphabetical character and it would fix it. Then I would remove it and make it just a number and it would fail again. But now it's completely sporadic, so maybe it was a coincidence. It seems to work for 15 times or so, then fail for 10 or 15, then back to work. Not an exact pattern but my key take away is that if it works once it'll likely work a few more times, and if it fails, it'll likely fail a couple more times before working again.
-
terraform apply
orplan
FWIW:
I'm referencing the output of those data tags in the set_sensitive
values being passed to my helm_release resource like so:
data.hcp_vault_secrets_secret.bot_token.secret_value
Also these secrets aren't MANAGED by Terraform, but sometimes don't have any problem accessing their value via a data tag and so I don't think that's the issue.
Expected Behavior
100% of plans and applies DON'T give me a stack trace :slightly_smiling_face:
Actual Behavior
It opens the browser, sometimes it successfully does the HCP auth and returns to terminal, other times it doesn't, and just takes me to a localhost page that doesn't respond: http://localhost:8443/oidc/callback?code=...
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment