mirror of https://github.com/hashicorp/packer
parent
10b648b282
commit
fcaf766569
@ -1,8 +1,11 @@
|
||||
```hcl
|
||||
# variables.pkr.hcl
|
||||
variable "foo" {
|
||||
type = string
|
||||
default = "the default value of the `foo` variable"
|
||||
type = string
|
||||
default = "the default value of the `foo` variable"
|
||||
description = "description of the `foo` variable"
|
||||
sensitive = false
|
||||
# When a variable is sensitive all string-values from that variable will be
|
||||
# obfuscated from Packer's output.
|
||||
}
|
||||
```
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
## A variable can be sensitive
|
||||
|
||||
When a variable is sensitive all string-values from that variable will be
|
||||
obfuscated from Packer's output :
|
||||
|
||||
```hcl
|
||||
# var-foo.pkr.hcl
|
||||
variable "foo" {
|
||||
sensitive = true
|
||||
default = {
|
||||
key = "SECR3TP4SSW0RD"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```shell-session
|
||||
$ packer inspect var-foo.pkr.hcl
|
||||
Packer Inspect: HCL2 mode
|
||||
|
||||
> input-variables:
|
||||
var.foo: "{\n \"key\" = \"<sensitive>\"\n }"
|
||||
...
|
||||
```
|
||||
Loading…
Reference in new issue