mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
482ae66e18
Remove unused variables, sync.Once, and init in BuiltinEvalContext. Replace some shim calls. GraphNodeAttachProvider doesn't need to be a NodeModuleInstance.
28 lines
787 B
Go
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())
|
|
}
|