Hi,
We’ve just updated to packer 1.7.0, and took the opportunity to migrate our JSON templates to HCL using packer hcl2_upgrade
.
The upgrade went smoothly.
Unfortunately our build now breaks with this error:
Error: Variables not allowed
It appears that this is no longer allowed:
variable "template" {
type = string
default = "${var.policy_name}-${var.release_version}-${var.os}-${var.os_version}-${var.os_arch}"
}
It also appears an approach we used in Terraform made its way into the Packer JSON, but now this use of local
too is verboten:
variable "version" {
type = string
default = "${local.timestamp}"
}
Obviously we can revert to JSON, but in case the fix is painless we’d rather switch now.
Appreciate any hints or tips.
Kind regards