From d16ab6f3616bffbc76fc74c73617bcd6a3dec551 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 21 Oct 2024 06:07:01 +0000 Subject: [PATCH] fix: skip validating unknown versions list --- internal/provider/template_resource.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/provider/template_resource.go b/internal/provider/template_resource.go index a23f408..6c3acbb 100644 --- a/internal/provider/template_resource.go +++ b/internal/provider/template_resource.go @@ -888,6 +888,10 @@ func (a *activeVersionValidator) MarkdownDescription(context.Context) string { // ValidateList implements validator.List. func (a *activeVersionValidator) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse) { + if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() { + return + } + var data []TemplateVersion resp.Diagnostics.Append(req.ConfigValue.ElementsAs(ctx, &data, false)...) if resp.Diagnostics.HasError() {