command/jsonconfig: Add variable sensitive flag

This commit is contained in:
Alisdair McDiarmid 2021-03-26 13:49:35 -04:00
parent e27aacebf9
commit 63613ca1b0
2 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,7 @@ type variables map[string]*variable
type variable struct {
Default json.RawMessage `json:"default,omitempty"`
Description string `json:"description,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
}
// 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{
Default: defaultValJSON,
Description: v.Description,
Sensitive: v.Sensitive,
}
}
module.Variables = vars

View File

@ -106,7 +106,8 @@
],
"variables": {
"test_var": {
"default": "boop"
"default": "boop",
"sensitive": true
}
}
}