mirror of https://github.com/hashicorp/terraform
If provisioner configuration or connection info includes sensitive values, we need to unmark them before calling the provisioner. Failing to do so causes serialization to error. Unlike resources, we do not need to capture marked paths here, so we just discard the marks.pull/26611/head
parent
31033001a8
commit
9c580335e3
@ -0,0 +1,18 @@
|
||||
variable "password" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
resource "aws_instance" "foo" {
|
||||
connection {
|
||||
host = "localhost"
|
||||
type = "telnet"
|
||||
user = "superuser"
|
||||
port = 2222
|
||||
password = var.password
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
command = "echo ${var.password} > secrets"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue