github.com/hashicorp/packer@v1.14.3/hcl2template/testdata/build/variables.pkr.hcl (about)

     1  variable "name" {
     2    type    = string
     3    default = "build-name"
     4  }
     5  
     6  local "description" {
     7    expression = "This is the description for ${var.name}."
     8  }
     9  
    10  build {
    11    name        = var.name
    12    description = local.description
    13  
    14    sources = [
    15      "source.virtualbox-iso.ubuntu-1204"
    16    ]
    17  }
    18  
    19  source "virtualbox-iso" "ubuntu-1204" {
    20  }
    21