Creation of a secrets leads to an unreadable data output.
Opened this issue · 2 comments
Terraform Version
v0.11.8
Affected Resource(s)
Please list the resources as a list, for example:
- kubernetes_secret
Debug Output
2018/08/30 16:22:19 [ERROR] root: eval: *terraform.EvalOpFilter, err: At column 39, line 1: map "kubernetes_secret.deploy_secret.data" does not have homogenous types. found TypeString and then TypeMap in: ${kubernetes_secret.deploy_secret.data["ca.crt"]}
Expected Behavior
Instead of crashing the secrets should be parsed and the data map should contains 3 entry as described in the kubernetes api.
data."ca.crt"
data."token"
data."namespace"
Actual Behavior
After creating a secret for a service account with the provider, I have an issue in accessing the value. The data should be parsed as a Map[String]
but instead they are unreadable. The first value of the the data field is a compound name ca.crt
and thus is interpreted as a Map[]
This make the data unusable by Terraform in later stage of the deployment.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- define a simple servivce account secret
- use the
kubernetes_secret.deploy_secret.data
anywhere in the value.
Important Factoids
This seems to be linked to the way kubernetes describe the "data" part of the secret.
Hi @ghost
Could you provide an example Terraform config that triggers this bug?
Make sure you remove any sensitive secrets before posting.
Thanks
Closing stale issue.