mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-11 00:22:32 -06:00
fd775f0fe3
Signed-off-by: ollevche <ollevche@gmail.com> Signed-off-by: Christian Mesh <christianmesh1@gmail.com> Signed-off-by: Ronny Orot <ronny.orot@gmail.com> Signed-off-by: Martin Atkins <mart@degeneration.co.uk> Co-authored-by: ollevche <ollevche@gmail.com> Co-authored-by: Ronny Orot <ronny.orot@gmail.com> Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
28 lines
813 B
Go
28 lines
813 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package tofu
|
|
|
|
import (
|
|
"github.com/opentofu/opentofu/internal/addrs"
|
|
"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, addrs.NoKey)
|
|
return diags.Append(err)
|
|
}
|