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

terraform plan shows consul token provided via variable being #50

Closed
amitsaha opened this issue Jun 8, 2018 · 1 comment
Closed

terraform plan shows consul token provided via variable being #50

amitsaha opened this issue Jun 8, 2018 · 1 comment

Comments

@amitsaha
Copy link

amitsaha commented Jun 8, 2018

Hello, details follows. Summary is that when using consul_keys resource, the token which is provided
via -var to terraform plan, it shows the token in plain text.

Terraform Version

$ terraform -v
Terraform v0.11.7
+ provider.consul v1.0.0

Affected Resource(s)

  • consul_keys

Terraform Configuration Files

variable "app1_version_token" {}           
                                           
resource "consul_keys" "app1_version" {    
  datacenter = "dc1"                       
  token = "${var.app1_version_token}"      
   key {                                   
    path  = "app1/version"                 
    value = "0.1"                          
  }                                        
}                                          

Debug Output

Not relevant

Panic Output

NA

Expected Behavior

Consul token marked "computed" or not shown at all.

Actual Behavior

consul_keys.app1_version: Creating...
  datacenter:             "" => "dc1"
  key.#:                  "" => "1"
  key.1209483366.default: "" => ""
  key.1209483366.delete:  "" => "false"
  key.1209483366.name:    "" => ""
  key.1209483366.path:    "" => "app1/version"
  key.1209483366.value:   "" => "0.1"
  token:                  "" => "cf0ed539-cb44-3a8b-17d0-f4dc03f47438"
  var.%:                  "" => "<computed>"

Steps to Reproduce

Run the following script:

#!/bin/bash
terraform_token="mysecret"
terraform apply -target=consul_keys.app1_version -var "app1_version_token=$terraform_token"

Important Factoids

References

remilapeyre pushed a commit to remilapeyre/terraform-provider-consul that referenced this issue Nov 10, 2018
@remilapeyre
Copy link
Contributor

Hi @amitsaha, this is indeed an issue, the attached PR should fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants