Files
Packer-Cn/datasource/http/test-fixtures/invalid_method.pkr.hcl
Henrik Gerdes 6c40bfb0cd feat: allow additional methods in http datasource
This adds support for additional http methods for the http datasource.
Fixes #13169

Signed-off-by: Henrik Gerdes <[email protected]>
2024-10-29 16:27:26 -04:00

27 lines
420 B
HCL

source "null" "example" {
communicator = "none"
}
data "http" "basic" {
url = "https://www.packer.io/"
method = "NONEEXISTING"
}
locals {
url = "${data.http.basic.url}"
body = "${data.http.basic.body}" != ""
}
build {
name = "mybuild"
sources = [
"source.null.example"
]
provisioner "shell-local" {
inline = [
"echo url is ${local.url}",
"echo body is ${local.body}"
]
}
}