opentofu/terraform/node_provider_disabled.go
James Bardin 482ae66e18 minor cleanup
Remove unused variables, sync.Once, and init in BuiltinEvalContext.
Replace some shim calls.
GraphNodeAttachProvider doesn't need to be a NodeModuleInstance.
2020-03-12 14:54:47 -04:00

28 lines
787 B
Go

package terraform
import (
"fmt"
"github.com/hashicorp/terraform/dag"
)
// NodeDisabledProvider represents a provider that is disabled. A disabled
// provider does nothing. It exists to properly set inheritance information
// for child providers.
type NodeDisabledProvider struct {
*NodeAbstractProvider
}
var (
_ GraphNodeModulePath = (*NodeDisabledProvider)(nil)
_ RemovableIfNotTargeted = (*NodeDisabledProvider)(nil)
_ GraphNodeReferencer = (*NodeDisabledProvider)(nil)
_ GraphNodeProvider = (*NodeDisabledProvider)(nil)
_ GraphNodeAttachProvider = (*NodeDisabledProvider)(nil)
_ dag.GraphNodeDotter = (*NodeDisabledProvider)(nil)
)
func (n *NodeDisabledProvider) Name() string {
return fmt.Sprintf("%s (disabled)", n.NodeAbstractProvider.Name())
}