mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
core: Don't crash EvalValidateProvisioner if no connection block present
This commit is contained in:
parent
5b1b564663
commit
509c6557dd
@ -189,6 +189,11 @@ func (n *EvalValidateProvisioner) validateConnConfig(ctx EvalContext, config *co
|
|||||||
|
|
||||||
var diags tfdiags.Diagnostics
|
var diags tfdiags.Diagnostics
|
||||||
|
|
||||||
|
if config == nil || config.Config == nil {
|
||||||
|
// No block to validate
|
||||||
|
return diags
|
||||||
|
}
|
||||||
|
|
||||||
// We evaluate here just by evaluating the block and returning any
|
// We evaluate here just by evaluating the block and returning any
|
||||||
// diagnostics we get, since evaluation alone is enough to check for
|
// diagnostics we get, since evaluation alone is enough to check for
|
||||||
// extraneous arguments and incorrectly-typed arguments.
|
// extraneous arguments and incorrectly-typed arguments.
|
||||||
|
Loading…
Reference in New Issue
Block a user