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

local_file should not prints sensitive information in the output if sensitive = true #18718

Closed
mtheus opened this issue Aug 21, 2018 · 2 comments

Comments

@mtheus
Copy link

mtheus commented Aug 21, 2018

Terraform Version

Terraform v0.11.8

Terraform Configuration Files

resource "local_file" "kubeconfig" {
    sensitive = true
    content  = "${data.terraform_remote_state.kubernetes.kubeconfig}"
    filename = ".kube/config"
}

Debug Output

Expected Behavior

Sensitive information does not seem to be in the output

Actual Behavior

data.terraform_remote_state.kubernetes: Refreshing state...
local_file.kubeconfig: Creating...
  content:  "" => "\n\napiVersion: v1\nclusters:\n- cluster:\n    server: https://**<SENSIVE>**.sk1.us-east-1.eks.amazonaws.com\n    certificate-authority-data: LS0tLS1C**<SENSIVE>**\n  name: kubernetes\ncontexts:\n- context:\n    cluster: kubernetes\n    user: aws\n  name: aws\ncurrent-context: aws\nkind: Config\npreferences: {}\nusers:\n- name: aws\n  user:\n    exec:\n      apiVersion: client.authentication.k8s.io/v1alpha1\n      command: aws-iam-authenticator\n      args:\n        - \"token\"\n        - \"-i\"\n        - \"latam\"\n"
  filename: "" => ".kube/config"
local_file.kubeconfig: Creation complete after 0s (ID: 73a74cc24de6ebfe8304a9b889415884fd819390)

Steps to Reproduce

  1. terraform init
  2. terraform apply

Complementary

Should apply in all components that print outputs

@mtheus mtheus changed the title local_file shoud not prints sensitive information in the output if sensitive = true local_file should not prints sensitive information in the output if sensitive = true Aug 21, 2018
@ghost ghost closed this as completed Aug 22, 2018
@ghost
Copy link

ghost commented Aug 22, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-local#17 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-local#17.

@ghost
Copy link

ghost commented Apr 2, 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.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 2, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants