opentofu/terraform/evaltree_provider.go
2015-02-19 12:07:55 -08:00

24 lines
561 B
Go

package terraform
import (
"github.com/hashicorp/terraform/config"
)
// ProviderEvalTree returns the evaluation tree for initializing and
// configuring providers.
func ProviderEvalTree(n string, config *config.RawConfig) EvalNode {
return &EvalSequence{
Nodes: []EvalNode{
&EvalInitProvider{Name: n},
&EvalValidateProvider{
Provider: &EvalGetProvider{Name: n},
Config: &EvalInterpolate{Config: config},
},
&EvalConfigProvider{
Provider: &EvalGetProvider{Name: n},
Config: &EvalInterpolate{Config: config},
},
},
}
}