Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide sensitive outputs in terraform show #26740

Merged
merged 1 commit into from
Oct 28, 2020
Merged

Conversation

pselle
Copy link
Contributor

@pselle pselle commented Oct 28, 2020

terraform show -json is intended to be the means to view all values in state, but previously, terraform show would still show outputs that were designated as sensitive. This adjusts that behavior.

Before:

$ terraform show 
# random_pet.bar:
resource "random_pet" "bar" {
    id        = "cat-quick-sunbird"
    length    = 2
    prefix    = (sensitive)
    separator = "-"
}


Outputs:

out = "cat"

After:

$ terraform show 
# random_pet.bar:
resource "random_pet" "bar" {
    id        = "cat-quick-sunbird"
    length    = 2
    prefix    = (sensitive)
    separator = "-"
}


Outputs:

out = (sensitive value)

@pselle pselle added the 0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Oct 28, 2020
@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #26740 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
command/format/state.go 49.68% <100.00%> (+0.95%) ⬆️
dag/marshal.go 53.42% <0.00%> (-1.37%) ⬇️
terraform/evaluate.go 53.11% <0.00%> (+0.41%) ⬆️
terraform/node_resource_plan.go 97.19% <0.00%> (+1.86%) ⬆️

@pselle pselle requested a review from a team October 28, 2020 19:58
@ghost
Copy link

ghost commented Nov 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants