mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-20 15:01:40 -04:00
This adds support for additional http methods for the http datasource. Fixes #13169 Signed-off-by: Henrik Gerdes <[email protected]>
27 lines
420 B
HCL
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}"
|
|
]
|
|
}
|
|
}
|