github.com/hashicorp/packer@v1.14.3/datasource/http/test-fixtures/invalid_method.pkr.hcl (about)

     1  source "null" "example" {
     2    communicator = "none"
     3  }
     4  
     5  data "http" "basic" {
     6    url = "https://www.packer.io/"
     7    method = "NONEEXISTING"
     8  }
     9  
    10  locals {
    11    url = "${data.http.basic.url}"
    12    body = "${data.http.basic.body}" != ""
    13  }
    14  
    15  build {
    16    name = "mybuild"
    17    sources = [
    18      "source.null.example"
    19    ]
    20    provisioner "shell-local" {
    21      inline = [
    22        "echo url is ${local.url}",
    23        "echo body is ${local.body}"
    24      ]
    25    }
    26  }