packer/hcl2template/testdata/build/variables.pkr.hcl
Wilken Rivera 4a0fbd911a
Add support for variable interpolation to hcp_packer_registry and build blocks. (#11421)
* Add variable interpolation support to hcp_packer_registry block

* Add tests for variable interpolation in hcp_packer_registry block

* Add variable interpolation support to the build block (#11425)

* Add simple test to build command
2021-12-01 11:35:51 +01:00

21 lines
320 B
HCL

variable "name" {
type = string
default = "build-name"
}
local "description" {
expression = "This is the description for ${var.name}."
}
build {
name = var.name
description = local.description
sources = [
"source.virtualbox-iso.ubuntu-1204"
]
}
source "virtualbox-iso" "ubuntu-1204" {
}