I\'m trying to create a service account secret in order to populate a secret with the token:
resource \"kubernetes_service_account\" \"k8s-api-token\" { metada
The solution is to use a lookup:
K8S_API = ${lookup(data.kubernetes_secret.k8s-api-token-data.data, "token","")}
Source: http://blog.crashtest-security.com/resource-does-not-have-attribute