mirror of https://github.com/hashicorp/packer
hcl2template: only iterate on known HCP datasource (#11883)
When we try to validate a build that contains references to hcp_packer_image, the data is not fetched, and the value is therefore unknown. However, during the decoding phase for the build blocks, we attempt to fetch the ancestry information for the current build, from the information previously fetched from HCP. Since we're validating, there's no way this is set, and attempting to cast without checking causes Packer to crash on the conversion. To avoid this, we only attempt this conversion if the value is known. Closes #11870pull/11888/head
parent
9f28ced11c
commit
6794c6053a
Loading…
Reference in new issue