This website requires JavaScript.
Explore
Help
Sign In
IntenseWebs
/
opentofu
Watch
3
Star
0
Fork
0
You've already forked opentofu
mirror of
https://github.com/opentofu/opentofu.git
synced
2025-02-25 18:45:20 -06:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
7fd6f97899
opentofu
/
terraform
/
test-fixtures
/
import-provider-module
/
main.tf
11 lines
120 B
Terraform
Raw
Normal View
History
Unescape
Escape
terraform: import graph should setup parent refs to providers Fixes #11212 The import graph builder was missing the transform to setup links to parent providers, so provider inheritance didn't work properly. This adds that. This also removes the `PruneProviderTransform` since that has no value in this graph since we'll never add an unused provider.
2017-01-24 17:36:45 -06:00
provider
"
aws
"
{
foo
=
"
bar
"
}
use the inherited provider configs in the graph Use the configured providers directly, rather than looking for inherited provider configuration during graph evaluation. First remove the provider config cache, and the associated SetProviderConfig and ParentProviderConfig methods on the eval context. Every provider must be configured, so there's no need to look for configuration from other provider instances. The config.ProviderConfig struct now has a Scope field which stores the proper path for the interpolation scope. To get this metadata to the interpolator, we add an EvalInterpolatProvider node which can carry the ProviderConfig, and an InterpolateProvider context method to carry the ProviderConfig.Scope into the InterplationScope. Some of the tests could be adjusted to account for the new inheritance behavior, and some were simply no longer valid and will be removed. The remaining tests have questions on how they should work in practice. This mostly concerns orphaned modules where there is no longer a way to obtain a provider. In some cases we may require that a minimal provider config be present to handle the destroy process, but we need further testing. All disabled code was commented out in this commit to record any additional comments. The following commit will be a cleanup pass.
2017-10-13 09:11:10 -05:00
module
"
child
"
{
source
=
"
./child
"
providers
{
"
aws
"
=
"
aws
"
}
}
Reference in New Issue
Copy Permalink