diff --git a/command/jsonconfig/config.go b/command/jsonconfig/config.go index d021a8b1f..8575bd25c 100644 --- a/command/jsonconfig/config.go +++ b/command/jsonconfig/config.go @@ -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 diff --git a/command/testdata/show-json/sensitive-values/output.json b/command/testdata/show-json/sensitive-values/output.json index 7f67bc1fa..b694fee75 100644 --- a/command/testdata/show-json/sensitive-values/output.json +++ b/command/testdata/show-json/sensitive-values/output.json @@ -106,7 +106,8 @@ ], "variables": { "test_var": { - "default": "boop" + "default": "boop", + "sensitive": true } } }