2020-05-26 15:29:47 +02:00
|
|
|
```hcl
|
|
|
|
# locals.pkr.hcl
|
|
|
|
locals {
|
2020-06-02 11:57:32 +02:00
|
|
|
# locals can be bare values like:
|
2020-05-26 15:29:47 +02:00
|
|
|
wee = local.baz
|
2020-06-02 16:33:32 +02:00
|
|
|
# locals can also be set with other variables :
|
|
|
|
baz = "Foo is '${var.foo}' but not '${local.wee}'"
|
2020-05-26 15:29:47 +02:00
|
|
|
}
|
2021-01-26 01:21:44 -08:00
|
|
|
|
|
|
|
# Use the singular local block if you need to mark a local as sensitive
|
|
|
|
local "mylocal" {
|
|
|
|
expression = "${var.secret_api_key}"
|
|
|
|
sensitive = true
|
|
|
|
}
|
2020-07-13 06:33:16 -04:00
|
|
|
```
|