diff --git a/terraform/transform_provider.go b/terraform/transform_provider.go index 56dddd512..fb8857c96 100644 --- a/terraform/transform_provider.go +++ b/terraform/transform_provider.go @@ -394,59 +394,6 @@ func (n *graphNodeCloseProvider) DotNode(name string, opts *GraphDotOpts) *dot.N }) } -// GraphNodeFlattenable impl. -func (n *graphNodeCloseProvider) Flatten(p []string) (dag.Vertex, error) { - return &graphNodeCloseProviderFlat{ - graphNodeCloseProvider: n, - PathValue: p, - }, nil -} - -// Same as graphNodeCloseProvider, but for flattening -type graphNodeCloseProviderFlat struct { - *graphNodeCloseProvider - - PathValue []string -} - -func (n *graphNodeCloseProviderFlat) Name() string { - return fmt.Sprintf( - "%s.%s", modulePrefixStr(n.PathValue), n.graphNodeCloseProvider.Name()) -} - -func (n *graphNodeCloseProviderFlat) Path() []string { - return n.PathValue -} - -func (n *graphNodeCloseProviderFlat) ProviderName() string { - return fmt.Sprintf( - "%s.%s", modulePrefixStr(n.PathValue), - n.graphNodeCloseProvider.CloseProviderName()) -} - -// GraphNodeDependable impl. -func (n *graphNodeCloseProviderFlat) DependableName() []string { - return []string{n.Name()} -} - -func (n *graphNodeCloseProviderFlat) DependentOn() []string { - var result []string - - // If we're in a module, then depend on our parent's provider - if len(n.PathValue) > 1 { - prefix := modulePrefixStr(n.PathValue[:len(n.PathValue)-1]) - if prefix != "" { - prefix += "." - } - - result = append(result, fmt.Sprintf( - "%s%s", - prefix, n.graphNodeCloseProvider.Name())) - } - - return result -} - type graphNodeMissingProvider struct { ProviderNameValue string } diff --git a/terraform/transform_provisioner.go b/terraform/transform_provisioner.go index a1107a121..a99fe48b0 100644 --- a/terraform/transform_provisioner.go +++ b/terraform/transform_provisioner.go @@ -171,36 +171,6 @@ func (n *graphNodeCloseProvisioner) CloseProvisionerName() string { return n.ProvisionerNameValue } -// GraphNodeFlattenable impl. -func (n *graphNodeCloseProvisioner) Flatten(p []string) (dag.Vertex, error) { - return &graphNodeCloseProvisionerFlat{ - graphNodeCloseProvisioner: n, - PathValue: p, - }, nil -} - -// Same as graphNodeCloseProvisioner, but for flattening -type graphNodeCloseProvisionerFlat struct { - *graphNodeCloseProvisioner - - PathValue []string -} - -func (n *graphNodeCloseProvisionerFlat) Name() string { - return fmt.Sprintf( - "%s.%s", modulePrefixStr(n.PathValue), n.graphNodeCloseProvisioner.Name()) -} - -func (n *graphNodeCloseProvisionerFlat) Path() []string { - return n.PathValue -} - -func (n *graphNodeCloseProvisionerFlat) ProvisionerName() string { - return fmt.Sprintf( - "%s.%s", modulePrefixStr(n.PathValue), - n.graphNodeCloseProvisioner.CloseProvisionerName()) -} - type graphNodeMissingProvisioner struct { ProvisionerNameValue string }