mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-24 11:02:03 -04:00
command/jsonconfig: Add variable sensitive flag
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -106,7 +106,8 @@
|
||||
],
|
||||
"variables": {
|
||||
"test_var": {
|
||||
"default": "boop"
|
||||
"default": "boop",
|
||||
"sensitive": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user