github.com/hashicorp/terraform-plugin-sdk@v1.17.2/terraform/node_provider_disabled.go (about)

     1  package terraform
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/hashicorp/terraform-plugin-sdk/internal/dag"
     7  )
     8  
     9  // NodeDisabledProvider represents a provider that is disabled. A disabled
    10  // provider does nothing. It exists to properly set inheritance information
    11  // for child providers.
    12  type NodeDisabledProvider struct {
    13  	*NodeAbstractProvider
    14  }
    15  
    16  var (
    17  	_ GraphNodeSubPath        = (*NodeDisabledProvider)(nil)
    18  	_ RemovableIfNotTargeted  = (*NodeDisabledProvider)(nil)
    19  	_ GraphNodeReferencer     = (*NodeDisabledProvider)(nil)
    20  	_ GraphNodeProvider       = (*NodeDisabledProvider)(nil)
    21  	_ GraphNodeAttachProvider = (*NodeDisabledProvider)(nil)
    22  	_ dag.GraphNodeDotter     = (*NodeDisabledProvider)(nil)
    23  )
    24  
    25  func (n *NodeDisabledProvider) Name() string {
    26  	return fmt.Sprintf("%s (disabled)", n.NodeAbstractProvider.Name())
    27  }