Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Outputs cannot be marked as sensitive #123

Closed
EmmanuelOgiji opened this issue Feb 9, 2022 · 1 comment
Closed

Outputs cannot be marked as sensitive #123

EmmanuelOgiji opened this issue Feb 9, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@EmmanuelOgiji
Copy link

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

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:
- key: DB_HOST
moduleOutputName: primary_host
- key: DB_NAME
moduleOutputName: db_name
- key: DB_USER
moduleOutputName: db_user
- key: DB_PASSWORD
moduleOutputName: db_password
sensitive: true

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

@EmmanuelOgiji EmmanuelOgiji added the bug Something isn't working label Feb 9, 2022
@redeux
Copy link
Contributor

redeux commented Feb 11, 2022

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.

@redeux redeux closed this as completed Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants