-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vault_generic_secret fails to read secrets (unexpected EOF) #10999
Comments
After reading this piece of code, it seems that the correct way (it works) to request the value will be data "vault_generic_secret" "docker" {
path = "secret/docker/docker_registry_pwd"
}
output "secret" {
value = "${data.vault_generic_secret.docker.data["value"]}"
} Which is not something I understood from docs here. Anyway, maybe someone can clarify it in the docs or for me. |
Hello, |
@mperriere can you use the workaround I've put in a post above? Works fine for now. |
Hello, Here is the crash.log when executing "terraform plan": terraform version: 0.8.4 (but same issue with older 0.8.* versions) the tf file: The stored passwd is readable: Another issue is that even with "skip_tls_verify" the ca_cert_dir and ca_cert_file are mandatory (or documentation is not up to date). |
ok, i got it:
-> those 2 options are mutually exclusives, but mandatory. new terraform file with ca* removed: provider "vault" { tf plan -input=false |
I think this was resolved in |
checked with 0.8.5, it works now, thanks. |
Can the docs be updated before this gets closed? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.8.2
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
https://gist.github.com/IevgenKabanets/c16d2e5ef4520921ba05e5a79ee11079
Panic Output
https://gist.github.com/IevgenKabanets/c16d2e5ef4520921ba05e5a79ee11079
Expected Behavior
The secret should be read, as it's present in Vault and accessible with
curl
.Actual Behavior
Crashed with
* data.vault_generic_secret.docker: unexpected EOF
Steps to Reproduce
export VAULT_TOKEN=<root_token or any token>
terraform plan
orterraform apply
Important Factoids
This works fine
Also, the error is gone once I read full path to entry (secret/docker/docker_registry_pwd)
which seems to be wrong, as
vault_generic_secret
should return a map with possible keys/values.References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: