opentofu/terraform/node_provider.go
James Bardin a14fd0344c WIP reference providers by full name
This turned out to be a big messy commit, since the way providers are
referenced is tightly coupled throughout the code. That starts to unify
how providers are referenced, using the format output node Name method.

Add a new field to the internal resource data types called
ResolvedProvider. This is set by a new setter method SetProvider when a
resource is connected to a provider during graph creation. This allows
us to later lookup the provider instance a resource is connected to,
without requiring it to have the same module path.

The InitProvider context method now takes 2 arguments, one if the
provider type and the second is the full name of the provider. While the
provider type could still be parsed from the full name, this makes it
more explicit and, and changes to the name format won't effect this
code.
2017-11-02 15:00:06 -04:00

12 lines
270 B
Go

package terraform
// NodeApplyableProvider represents a provider during an apply.
type NodeApplyableProvider struct {
*NodeAbstractProvider
}
// GraphNodeEvalable
func (n *NodeApplyableProvider) EvalTree() EvalNode {
return ProviderEvalTree(n, n.ProviderConfig())
}