How to use a token created in a secret in another resource?

后端 未结 1 2015
小鲜肉
小鲜肉 2021-01-29 00:08

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         


        
相关标签:
1条回答
  • 2021-01-29 00:43

    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

    0 讨论(0)
提交回复
热议问题