From 2e6a44d5ffbd74ec617a99022d0cb8e374e5375a Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 24 Mar 2017 11:31:14 -0400 Subject: [PATCH] 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. --- helper/schema/schema.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 9f103d1857..f62c4d1284 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -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) {