mirror of https://github.com/hashicorp/packer
When packer validate is invoked, it does not try to evaluate the datasources before attempting to decide if the template is valid. In many cases, this works, but sometimes it will fail as the value is unknown by the validation code. Since the validation code for all the elements of a Packer template is left to be implemented by plugins, we cannot rely on checking for unknown values everywhere, especially since the unknown references are replaced automatically by a value of the right type for the configuration expected. So, in order for such configurations to be validable, we add an extra option to packer validate, that will let users evaluate the datasources from a template.pull/12123/head
parent
4af0619721
commit
bb2384c56a
@ -0,0 +1,17 @@
|
||||
data "null" "dep" {
|
||||
input = "upload"
|
||||
}
|
||||
|
||||
source "null" "test" {
|
||||
communicator = "none"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["sources.null.test"]
|
||||
|
||||
provisioner "file" {
|
||||
source = "test-fixtures/hcl/force.pkr.hcl"
|
||||
destination = "dest"
|
||||
direction = "${data.null.dep.output}"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue