Commit Graph

46 Commits

Author SHA1 Message Date
Anthony Scalisi 198e1a5186 remove various typos 2015-09-11 11:56:20 -07:00
Sam Boyer b82bd0c280 Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
Mitchell Hashimoto 19b33326be terraform: don't include variables in destroy node requirements 2015-05-06 20:13:19 -07:00
Paul Hinze 64f0897c82 core: avoid diff mismatch on NewRemoved fields during -/+
fixes #1508

In a DESTROY/CREATE scenario, the plan diff will be run against the
state of the old instance, while the apply diff will be run against an
empty state (because the state is cleared when the destroy node does its
thing.)

For complex attributes, this can result in keys that seem to disappear
between the two diffs, when in reality everything is working just fine.

Same() needs to take into account this scenario by analyzing NewRemoved
and treating as "Same" a diff that does indeed have that key removed.
2015-04-14 17:23:30 -05:00
Paul Hinze d168cc1bd1 terraform: add reason to diff mismatch error
Helps with debugging those pesky "diffs did not match" errors.
2015-04-13 09:31:09 -05:00
Mitchell Hashimoto 10a216d85e terraform: nil diffs should not be written to the diff 2015-02-19 12:08:02 -08:00
Sander van Harmelen d24ab685d0 Adding a small fix to the Same() func
This is a little tricky, but when a diff contains a computed list or
set that can only be interpolated after the apply command has created
the dependant resources, it could turn out that the result is actually
the same as the existing state which would remove the key from the diff
2014-12-16 13:58:31 +01:00
Sander van Harmelen 83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Armon Dadgar d8ecb32a7c terraform: test module is marked for destroy 2014-11-24 15:50:15 -08:00
Armon Dadgar d5fd4dabe8 terraform: Mark modules for destroy 2014-11-24 14:15:24 -08:00
Mitchell Hashimoto ab6741f6fc terraform: require the prefix match with a "." in Diff.Instances 2014-10-10 13:46:44 -07:00
Mitchell Hashimoto 75e79da9c3 terraform: modify Same to return true if list is computed 2014-10-09 20:52:38 -07:00
Mitchell Hashimoto 4fe0c4ada4 terraform: don't use Meta node anymore 2014-10-01 18:06:25 -07:00
Mitchell Hashimoto 8c17062638 command: plan shows module-level, can control depth 2014-09-24 22:54:51 -07:00
Mitchell Hashimoto a12f785211 terraform: add some helpers to ModuleDiff and InstanceDiff for UX 2014-09-24 17:51:45 -07:00
Mitchell Hashimoto 672bf58337 command: compiles, tests don't pass yet 2014-09-24 14:37:24 -07:00
Mitchell Hashimoto b1a583e3de terraform: plan with modules work 2014-09-23 14:15:40 -07:00
Mitchell Hashimoto bc67e7c443 terraform: diff is split down into modules 2014-09-23 11:43:21 -07:00
Mitchell Hashimoto 29603f36d2 terraform: remove Read/WriteDiff, we don't use it 2014-09-23 11:15:05 -07:00
Mitchell Hashimoto 06c862a379 terraform: tainted things all work 2014-09-19 22:47:53 -06:00
Mitchell Hashimoto 9b2b3a963f ResourceDiff => InstanceDiff 2014-09-17 16:33:24 -07:00
Mitchell Hashimoto 7564a0a21c terraform: set state properly when tainted 2014-07-26 21:03:07 -07:00
Mitchell Hashimoto 7221e01110 terraform: unit test Same function on ResourceDiff 2014-07-22 19:39:48 -07:00
Mitchell Hashimoto d5e3d5a196 terraform: validate diffs are the same 2014-07-22 19:33:09 -07:00
Mitchell Hashimoto 96e09440d4 helper/diff: mark removed keys as removed 2014-07-09 09:51:36 -07:00
Mitchell Hashimoto 251790f05a terraform: add ID to diff implicitly 2014-07-08 16:58:31 -07:00
Mitchell Hashimoto fb843ea5bf terraform: Added NewExtra field for providers to fill in data 2014-07-01 11:23:40 -07:00
Mitchell Hashimoto ff79fa9c9f terraform: tests for ResourceDiff.Empty 2014-06-30 20:56:25 -07:00
Mitchell Hashimoto 4147500fcc terraform: diff is not empty if it has to destroy 2014-06-25 22:10:25 -07:00
Mitchell Hashimoto 1d9d33c8a0 terraform: destroy orphans 2014-06-25 21:58:33 -07:00
Mitchell Hashimoto 9c024994b7 terraform: diff has Destroy flag 2014-06-24 12:54:05 -07:00
Mitchell Hashimoto 175b720ab1 diff: mark diff properly with input/output 2014-06-23 12:49:30 -07:00
Mitchell Hashimoto 686b563428 terraform: build a plan 2014-06-20 11:03:33 -07:00
Mitchell Hashimoto 1449d8a510 terraform: Diff.Empty 2014-06-19 14:57:36 -07:00
Mitchell Hashimoto 3b3ea2944c terraform: comments 2014-06-18 20:46:46 -07:00
Mitchell Hashimoto 333ad153d0 terraform: add a format byte to the diff file so we can iterate maybe 2014-06-18 20:46:13 -07:00
Mitchell Hashimoto e5b82931ff terraform: read/write diff to binary format 2014-06-18 20:34:39 -07:00
Mitchell Hashimoto f032ce6c1b terraform: ResourceDiff tests 2014-06-17 18:10:38 -07:00
Mitchell Hashimoto 997724dc57 terraform: know whether create or update resource 2014-06-10 11:37:04 -07:00
Mitchell Hashimoto 469d20afe3 terraform: note which attributes require a new resource 2014-06-10 11:33:59 -07:00
Mitchell Hashimoto fac68b0c09 terraform: match key lengths up in a diff 2014-06-10 11:30:54 -07:00
Mitchell Hashimoto 36a99b5920 terraform: alphabetize attributes in diff 2014-06-10 11:27:17 -07:00
Mitchell Hashimoto 32afc6dc70 terraform: Diff.String 2014-06-10 11:22:32 -07:00
Mitchell Hashimoto 7c6920bba1 terraform: diff/state work better together, merge 2014-06-05 06:57:06 -07:00
Mitchell Hashimoto e904fca3da terraform: Diff! 2014-06-05 02:32:10 -07:00
Mitchell Hashimoto 1b5dfa043b terraform: some files laying out an API 2014-05-28 13:56:43 -07:00