github.com/trawler/terraform@v0.10.8-0.20171106022149-4b1c7a1d9b48/terraform/node_provider_disabled.go (about) 1 package terraform 2 3 import ( 4 "fmt" 5 ) 6 7 // NodeDisabledProvider represents a provider that is disabled. A disabled 8 // provider does nothing. It exists to properly set inheritance information 9 // for child providers. 10 type NodeDisabledProvider struct { 11 *NodeAbstractProvider 12 } 13 14 func (n *NodeDisabledProvider) Name() string { 15 return fmt.Sprintf("%s (disabled)", n.NodeAbstractProvider.Name()) 16 } 17 18 // GraphNodeEvalable 19 func (n *NodeDisabledProvider) EvalTree() EvalNode { 20 var resourceConfig *ResourceConfig 21 return &EvalSequence{ 22 Nodes: []EvalNode{ 23 &EvalInterpolateProvider{ 24 Config: n.ProviderConfig(), 25 Output: &resourceConfig, 26 }, 27 &EvalBuildProviderConfig{ 28 Provider: n.ProviderName(), 29 Config: &resourceConfig, 30 Output: &resourceConfig, 31 }, 32 }, 33 } 34 }