mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
23 lines
669 B
Go
23 lines
669 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package tofu
|
|
|
|
import "github.com/opentofu/opentofu/internal/tfdiags"
|
|
|
|
// NodeEvalableProvider represents a provider during an "eval" walk.
|
|
// This special provider node type just initializes a provider and
|
|
// fetches its schema, without configuring it or otherwise interacting
|
|
// with it.
|
|
type NodeEvalableProvider struct {
|
|
*NodeAbstractProvider
|
|
}
|
|
|
|
var _ GraphNodeExecutable = (*NodeEvalableProvider)(nil)
|
|
|
|
// GraphNodeExecutable
|
|
func (n *NodeEvalableProvider) Execute(ctx EvalContext, op walkOperation) (diags tfdiags.Diagnostics) {
|
|
_, err := ctx.InitProvider(n.Addr)
|
|
return diags.Append(err)
|
|
}
|