mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
reify the list values before validation
If the list was marked as computed, all values will be raw config values. Fetch the individual keys from the config to get any known values before validating.
This commit is contained in:
parent
99a12f5df3
commit
2e6a44d5ff
@ -1219,6 +1219,13 @@ func (m schemaMap) validateList(
|
||||
for i, raw := range raws {
|
||||
key := fmt.Sprintf("%s.%d", k, i)
|
||||
|
||||
// Reify the key value from the ResourceConfig.
|
||||
// If the list was computed we have all raw values, but some of these
|
||||
// may be known in the config, and aren't individually marked as Computed.
|
||||
if r, ok := c.Get(key); ok {
|
||||
raw = r
|
||||
}
|
||||
|
||||
var ws2 []string
|
||||
var es2 []error
|
||||
switch t := schema.Elem.(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user