Megan Marsh 0993c976fa
hcl2_upgrade escaped quotes fix (#10794)
* clean up extra quoting that can cause text template failures. when everyone else abandons you, regex will always be there.

* LINTING
2021-03-22 10:56:30 +01:00

32 lines
716 B
HCL

variable "conf" {
type = string
default = "${env("ONE")}-${env("ANOTHER")}-${env("BACKTICKED")}"
}
variable "manyspaces" {
type = string
default = "${env("ASDFASDF")}"
}
variable "nospaces" {
type = string
default = "${env("SOMETHING")}"
}
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
# The "legacy_isotime" function has been provided for backwards compatability, but we recommend switching to the timestamp and formatdate functions.
source "null" "autogenerated_1" {
communicator = "none"
}
build {
sources = ["source.null.autogenerated_1"]
provisioner "shell-local" {
inline = ["echo ${var.conf}-${local.timestamp}-${legacy_isotime("01-02-2006")}"]
}
}