Skip to content

Commit

Permalink
Merge pull request #291 from Juniper/bug/287
Browse files Browse the repository at this point in the history
Make sure configlet generators are not unknown before trying to read them
  • Loading branch information
chrismarget-j authored Aug 17, 2023
2 parents c68a655 + 182ee32 commit 7f94ea3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apstra/resource_configlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ func (o *resourceConfiglet) ValidateConfig(ctx context.Context, req resource.Val
return
}

// Delay Validation until the involved attributes have a known value.
if config.Generators.IsUnknown() {
return
}

// extract generators from config
var generators []design.ConfigletGenerator
resp.Diagnostics.Append(config.Generators.ElementsAs(ctx, &generators, false)...)
Expand Down

0 comments on commit 7f94ea3

Please sign in to comment.