6 "github.com/hashicorp/terraform/addrs"
7 "github.com/hashicorp/terraform/config"
10 // NodeProvisioner represents a provider that has no associated operations.
11 // It registers all the common interfaces across operations for providers.
12 type NodeProvisioner struct {
14 PathValue addrs.ModuleInstance
16 // The fields below will be automatically set using the Attach
17 // interfaces if you're running those transforms, but also be explicitly
18 // set if you already have that information.
20 Config *config.ProviderConfig
24 _ GraphNodeSubPath = (*NodeProvisioner)(nil)
25 _ GraphNodeProvisioner = (*NodeProvisioner)(nil)
26 _ GraphNodeEvalable = (*NodeProvisioner)(nil)
29 func (n *NodeProvisioner) Name() string {
30 result := fmt.Sprintf("provisioner.%s", n.NameValue)
31 if len(n.PathValue) > 0 {
32 result = fmt.Sprintf("%s.%s", n.PathValue.String(), result)
39 func (n *NodeProvisioner) Path() addrs.ModuleInstance {
43 // GraphNodeProvisioner
44 func (n *NodeProvisioner) ProvisionerName() string {
48 // GraphNodeEvalable impl.
49 func (n *NodeProvisioner) EvalTree() EvalNode {
50 return &EvalInitProvisioner{Name: n.NameValue}