mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-29 10:21:01 -06:00
24 lines
561 B
Go
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},
|
|
},
|
|
},
|
|
}
|
|
}
|