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

Outputs cannot be marked as sensitive #123

Closed EmmanuelOgiji closed 2 years ago

EmmanuelOgiji commented 2 years ago

terraform-k8s & Kubernetes Version

Image: hashicorp/terraform-k8s:1.1.0

Affected Resource(s)

Sensitive Outputs

Terraform Configuration Files

There seems to be no way to set outputs to have sensitive = true in the yaml and then propagate to the config map terraform configuration

i.e.

The following yaml snippet: outputs:

yields the following hcl terraform: output "DB_HOST" { value = module.operator.primary_host } output "DB_NAME" { value = module.operator.db_name } output "DB_USER" { value = module.operator.db_user } output "DB_PASSWORD" { value = module.operator.db_password }

Thus the sensitive output cannot be retrieved

Expected Behavior

The HCL should be rendered as output "DB_PASSWORD" { value = module.operator.db_password sensitive = true }

Thereafter, the output can be read

redeux commented 2 years ago

Hi @EmmanuelOgiji. This seems to be a duplicate of #107. I'm going to close this for consolidation. If you disagree that this is a duplicate please feel free to reopen it and provide additional context.