From 18bb11f7aab0de4505d67daa1790b504dd71905a Mon Sep 17 00:00:00 2001 From: Douglas Parsons Date: Sun, 21 May 2023 17:59:00 +0100 Subject: [PATCH] Allow computed/null values for `target` Validation occurs at plan time, this was breaking the ability to use a variable to determine the `target` field, as variables are computed (or null) at plan time. Fixes #114 --- vercel/validator_string_set_items_in.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vercel/validator_string_set_items_in.go b/vercel/validator_string_set_items_in.go index cec172c3..d794c6cc 100644 --- a/vercel/validator_string_set_items_in.go +++ b/vercel/validator_string_set_items_in.go @@ -45,6 +45,9 @@ func (v validatorStringSetItemsIn) ValidateSet(ctx context.Context, req validato for _, i := range req.ConfigValue.Elements() { var item types.String + if item.IsUnknown() || item.IsNull() { + continue + } diags := tfsdk.ValueAs(ctx, i, &item) resp.Diagnostics.Append(diags...) if diags.HasError() {