-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Context
After introducing AnyExpression
as part of #174 we forgot to also update certain parts of the core schema which involve complex type constraints, such as provisioner blocks:
terraform-schema/internal/schema/0.12/provisioners.go
Lines 118 to 125 in 664a8e0
"inline": { | |
IsOptional: true, | |
Constraint: schema.List{ | |
Elem: schema.AnyExpression{OfType: cty.String}, | |
}, | |
Description: lang.Markdown("A list of command strings. They are executed in the order they are provided." + | |
" This cannot be provided with `script` or `scripts`."), | |
}, |
This means that currently we don't allow interpolation in various places, e.g.
Proposal
Go through all places where we use schema.List
, schema.Set
, schema.Tuple
, schema.Map
and schema.Object
and check if they need updating to schema.OneOf{}
variation, such as
terraform-schema/schema/convert_json_test.go
Lines 191 to 196 in 664a8e0
Constraint: schema.OneOf{ | |
schema.AnyExpression{OfType: cty.List(cty.String), SkipLiteralComplexTypes: true}, | |
schema.List{ | |
Elem: schema.AnyExpression{OfType: cty.String}, | |
}, | |
}, |