2020-03-19 08:57:22 -04:00
|
|
|
|
|
|
|
variable "fruit" {
|
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2020-03-19 10:30:34 -04:00
|
|
|
locals {
|
|
|
|
fruit = var.fruit
|
|
|
|
}
|
|
|
|
|
2020-03-19 08:57:22 -04:00
|
|
|
source "null" "builder" {
|
|
|
|
communicator = "none"
|
|
|
|
}
|
|
|
|
|
|
|
|
build {
|
|
|
|
sources = [
|
|
|
|
"source.null.builder",
|
|
|
|
]
|
|
|
|
|
|
|
|
provisioner "shell-local" {
|
2020-03-19 10:30:34 -04:00
|
|
|
inline = ["echo ${local.fruit} > ${local.fruit}.txt"]
|
2020-03-19 08:57:22 -04:00
|
|
|
}
|
|
|
|
}
|