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")}"] } }