command/jsonconfig: Add variable sensitive flag
This commit is contained in:
parent
e27aacebf9
commit
63613ca1b0
|
@ -59,6 +59,7 @@ type variables map[string]*variable
|
||||||
type variable struct {
|
type variable struct {
|
||||||
Default json.RawMessage `json:"default,omitempty"`
|
Default json.RawMessage `json:"default,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
|
Sensitive bool `json:"sensitive,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource is the representation of a resource in the config
|
// Resource is the representation of a resource in the config
|
||||||
|
@ -263,6 +264,7 @@ func marshalModule(c *configs.Config, schemas *terraform.Schemas, addr string) (
|
||||||
vars[k] = &variable{
|
vars[k] = &variable{
|
||||||
Default: defaultValJSON,
|
Default: defaultValJSON,
|
||||||
Description: v.Description,
|
Description: v.Description,
|
||||||
|
Sensitive: v.Sensitive,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.Variables = vars
|
module.Variables = vars
|
||||||
|
|
|
@ -106,7 +106,8 @@
|
||||||
],
|
],
|
||||||
"variables": {
|
"variables": {
|
||||||
"test_var": {
|
"test_var": {
|
||||||
"default": "boop"
|
"default": "boop",
|
||||||
|
"sensitive": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue