expand early return comment

This commit is contained in:
Ben Drucker 2020-12-06 09:36:53 -08:00
parent eacf8b5c55
commit 186eff96b8
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ func (n *NodeApplyableProvider) ValidateProvider(ctx EvalContext, provider provi
configBody := buildProviderConfig(ctx, n.Addr, n.ProviderConfig())
// if provider config is empty, return early
// if a provider config is empty (only an alias), return early and don't continue
// validation. validate doesn't need to fully configure the provider itself, so
// skipping a provider with an implied configuration won't prevent other validation from completing.
emptySchema := &configschema.Block{}
_, _, evalDiags := ctx.EvaluateBlock(configBody, emptySchema, nil, EvalDataForNoInstanceKey)
if !evalDiags.HasErrors() {