2015-02-05 16:32:36 -06:00
|
|
|
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{
|
2015-02-10 01:32:28 -06:00
|
|
|
ProviderName: n,
|
|
|
|
Provider: &EvalGetProvider{Name: n},
|
|
|
|
Config: &EvalInterpolate{Config: config},
|
2015-02-05 16:32:36 -06:00
|
|
|
},
|
|
|
|
&EvalConfigProvider{
|
2015-02-10 01:32:28 -06:00
|
|
|
Provider: n,
|
2015-02-05 16:32:36 -06:00
|
|
|
Config: &EvalInterpolate{Config: config},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|