mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 16:31:10 -06:00
d4285dd27f
This is a little awkward since we need to instantiate the providers much earlier than before. To avoid a lot of reshuffling here we just spin each one up and then immediately shut it down again, letting our existing init functionality during the graph walk still do the main initialization.
20 lines
526 B
Go
20 lines
526 B
Go
package terraform
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/addrs"
|
|
"github.com/hashicorp/terraform/configs"
|
|
)
|
|
|
|
// GraphNodeAttachProvider is an interface that must be implemented by nodes
|
|
// that want provider configurations attached.
|
|
type GraphNodeAttachProvider interface {
|
|
// Must be implemented to determine the path for the configuration
|
|
GraphNodeSubPath
|
|
|
|
// ProviderName with no module prefix. Example: "aws".
|
|
ProviderAddr() addrs.AbsProviderConfig
|
|
|
|
// Sets the configuration
|
|
AttachProvider(*configs.Provider)
|
|
}
|