hashicorp / terraform-k8s

Terraform Cloud Operator for Kubernetes
https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator?in=terraform/kubernetes
Mozilla Public License 2.0
455 stars 71 forks source link

Adding support for variable value from secretKeyRef #137

Closed jtyr closed 2 years ago

jtyr commented 2 years ago

Community Note


This PR is adding support for fromValue.secretKeyRef for the Workspace resource. This allows to read a variable value from the specified secret key. This PR needs to be rebase after PR #133 is merged as it shares the GetSecretData method.

Usage in the Workspace resource:

...
spec:
  variables:
    - key: sensitive
      sensitive: true
      # This is the new feature
      valueFrom:
        secretKeyRef:
          name: test
          key: foo

Release note for CHANGELOG:

Added support for secretKeyRef for variables