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

     1  
     2  // starts resources to provision them.
     3  build {
     4      sources = [
     5          "source.amazon-ebs.ubuntu-1604",
     6          "source.virtualbox-iso.ubuntu-1204",
     7      ]
     8  
     9      provisioner "shell" {
    10          string   = coalesce(null, "", "string")
    11          int      = "${41 + 1}"
    12          int64    = "${42 + 1}"
    13          bool     = "true"
    14          trilean  = true
    15          duration = "${9 + 1}s"
    16          map_string_string = {
    17              a = "b"
    18              c = "d"
    19          }
    20          slice_string = [
    21              "a",
    22              "b",
    23              "c",
    24          ]
    25          slice_slice_string = [
    26              ["a","b"],
    27              ["c","d"]
    28          ]
    29  
    30          nested {
    31              string   = "string"
    32              int      = 42
    33              int64    = 43
    34              bool     = true
    35              trilean  = true
    36              duration = "10s"
    37              map_string_string = {
    38                  a = "b"
    39                  c = "d"
    40              }
    41              slice_string = [
    42                  "a",
    43                  "b",
    44                  "c",
    45              ]
    46              slice_slice_string = [
    47                  ["a","b"],
    48                  ["c","d"]
    49              ]
    50          }
    51  
    52          nested_slice {
    53          }
    54      }
    55  
    56      provisioner "file" {
    57          string   = "string"
    58          int      = 42
    59          int64    = 43
    60          bool     = true
    61          trilean  = true
    62          duration = "10s"
    63          map_string_string = {
    64              a = "b"
    65              c = "d"
    66          }
    67          slice_string = [
    68              "a",
    69              "b",
    70              "c",
    71          ]
    72          slice_slice_string = [
    73              ["a","b"],
    74              ["c","d"]
    75          ]
    76  
    77          nested {
    78              string   = "string"
    79              int      = 42
    80              int64    = 43
    81              bool     = true
    82              trilean  = true
    83              duration = "10s"
    84              map_string_string = {
    85                  a = "b"
    86                  c = "d"
    87              }
    88              slice_string = [
    89                  "a",
    90                  "b",
    91                  "c",
    92              ]
    93              slice_slice_string = [
    94                  ["a","b"],
    95                  ["c","d"]
    96              ]
    97          }
    98  
    99          nested_slice {
   100          }
   101      }
   102  
   103      post-processor "amazon-import" { 
   104          string   = "string"
   105          int      = 42
   106          int64    = 43
   107          bool     = true
   108          trilean  = true
   109          duration = "10s"
   110          map_string_string = {
   111              a = "b"
   112              c = "d"
   113          }
   114          slice_string = [
   115              "a",
   116              "b",
   117              "c",
   118          ]
   119          slice_slice_string = [
   120              ["a","b"],
   121              ["c","d"]
   122          ]
   123  
   124          nested {
   125              string   = "string"
   126              int      = 42
   127              int64    = 43
   128              bool     = true
   129              trilean  = true
   130              duration = "10s"
   131              map_string_string = {
   132                  a = "b"
   133                  c = "d"
   134              }
   135              slice_string = [
   136                  "a",
   137                  "b",
   138                  "c",
   139              ]
   140              slice_slice_string = [
   141                  ["a","b"],
   142                  ["c","d"]
   143              ]
   144          }
   145  
   146          nested_slice {
   147          }
   148      }
   149  }