549aede792
Back when we first introduced provider versioning in Terraform 0.10, we did the provider version resolution in terraform.NewContext because we weren't sure yet how exactly our versioning model was going to play out (whether different versions could be selected per provider configuration, for example) and because we were building around the limitations of our existing filesystem-based plugin discovery model. However, the new installer codepath is new able to do all of the selections up front during installation, so we don't need such a heavy inversion of control abstraction to get this done: the command package can select the exact provider versions and pass their factories directly to terraform.NewContext as a simple static map. The result of this commit is that CLI commands other than "init" are now able to consume the local cache directory and selections produced by the installation process in "terraform init", passing all of the selected providers down to the terraform.NewContext function for use in implementing the main operations. This commit is just enough to get the providers passing into the terraform.Context. There's still plenty more to do here, including to repair all of the tests this change has additionally broken. |
||
---|---|---|
.. | ||
error.go | ||
grpc_test_provider.go | ||
id.go | ||
id_test.go | ||
map.go | ||
map_test.go | ||
resource.go | ||
state.go | ||
state_shim.go | ||
state_shim_test.go | ||
state_test.go | ||
testing.go | ||
testing_config.go | ||
testing_import_state.go | ||
testing_import_state_test.go | ||
testing_test.go | ||
wait.go | ||
wait_test.go |