Commit Graph

18 Commits

Author SHA1 Message Date
Martin Atkins 44bc7519a6 terraform: More wiring in of new provider types
This doesn't actually work yet, but it builds and then panics in a pretty
satisfying way.
2018-10-16 19:12:54 -07:00
Martin Atkins a3403f2766 terraform: Ugly huge change to weave in new State and Plan types
Due to how often the state and plan types are referenced throughout
Terraform, there isn't a great way to switch them out gradually. As a
consequence, this huge commit gets us from the old world to a _compilable_
new world, but still has a large number of known test failures due to
key functionality being stubbed out.

The stubs here are for anything that interacts with providers, since we
now need to do the follow-up work to similarly replace the old
terraform.ResourceProvider interface with its replacement in the new
"providers" package. That work, along with work to fix the remaining
failing tests, will follow in subsequent commits.

The aim here was to replace all references to terraform.State and its
downstream types with states.State, terraform.Plan with plans.Plan,
state.State with statemgr.State, and switch to the new implementations of
the state and plan file formats. However, due to the number of times those
types are used, this also ended up affecting numerous other parts of core
such as terraform.Hook, the backend.Backend interface, and most of the CLI
commands.

Just as with 5861dbf3fc49b19587a31816eb06f511ab861bb4 before, I apologize
in advance to the person who inevitably just found this huge commit while
spelunking through the commit history.
2018-10-16 19:11:09 -07:00
Mitchell Hashimoto f40fdde708
terraform: PostProvision hook gets the error from the provision step 2017-01-20 20:21:12 -08:00
Mitchell Hashimoto b005a83143
terraform: deposed should trigger PostApply hook
Fixes #6327

Deposed instances weren't calling PostApply which was causing the counts
for what happened during `apply` to be wrong. This was a simple fix to
ensure we call that hook.
2016-10-30 15:24:20 -07:00
James Bardin 5802f76eaa Make all terraform package tests pass under -race
This isn't a pretty refactor, but fixes the race issues in this package
for now.

Fix race on RawConfig.Config()

fix command package races
2016-07-29 16:12:21 -04:00
Mitchell Hashimoto b728f8c018
terraform: import state ID should be sent to hook 2016-05-11 13:02:35 -07:00
Mitchell Hashimoto 95b87f5012
terraform: hook methods for pre/post import state 2016-05-11 13:02:34 -07:00
Mitchell Hashimoto 429711b938 terraform: PostStateUpdate hook and EvalUpdateStateHook 2015-02-23 19:09:48 -08:00
Mitchell Hashimoto 76f5f1057e terraform: no longer require uiOutput, do it auto in Hook 2014-10-04 16:24:07 -07:00
Mitchell Hashimoto 1835a03842 terraform: hook parameter is an InstanceInfo 2014-09-25 10:40:44 -07:00
Mitchell Hashimoto 9b2b3a963f ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
Mitchell Hashimoto 0a6c675fba terraform: update hooks to use InstanceState 2014-09-17 15:00:19 -07:00
Mitchell Hashimoto 78c32ac196 terraform: hooks around provisioners 2014-07-27 09:00:34 -07:00
Mitchell Hashimoto 3276ae313f terraform: PostApply should get error result from Apply 2014-07-17 15:38:50 -07:00
Mitchell Hashimoto 5a84a24d12 terraform: pre/post apply hook 2014-06-26 22:09:16 -07:00
Mitchell Hashimoto ae6b85e11b terraform: diff hooks 2014-06-26 17:17:10 -07:00
Mitchell Hashimoto 01319e1dc9 Ui hook 2014-06-26 17:05:21 -07:00
Mitchell Hashimoto 501f926eba terraform: initial hook impl 2014-06-26 16:52:15 -07:00