Commit Graph

1716 Commits

Author SHA1 Message Date
Mitchell Hashimoto
af61d566c2
terraform: passing test for destroy edge for module only
Just adding passing tests as a sanity check for a bug.
2017-02-07 19:12:03 -08:00
Mitchell Hashimoto
ac3d67e40f
terraform: remove old logging line 2017-02-07 16:28:01 -08:00
Mitchell Hashimoto
7192c1a9a1 Merge pull request #11732 from hashicorp/b-diff-map-removal
terraform: ignore RequiresNew for collection removal in diff.Same
2017-02-07 12:58:15 -08:00
Mitchell Hashimoto
e7aa1fd48d Merge pull request #11733 from hashicorp/b-disable-shadow
terraform: default shadow to false
2017-02-07 12:57:46 -08:00
Mitchell Hashimoto
ac934cf003
terraform: add one more forgotten ordering assertion 2017-02-07 12:01:27 -08:00
Mitchell Hashimoto
a765740827
terraform: CBD destroy nodes should not advertise themselves as normal 2017-02-07 11:49:50 -08:00
Mitchell Hashimoto
44233441c2
terraform: CBD edge should ignore "index" 2017-02-07 10:53:12 -08:00
Mitchell Hashimoto
864c79396d
terraform: default shadow to false
To avoid chasing down issues like #11635 I'm proposing we disable the
shadow graph for end users now that we have merged in all the new
graphs. I've kept it around and default-on for tests so that we can use
it to test new features as we build them. I think it'll still have value
going forward but I don't want to hold us for making it work 100% with
all of Terraform at all times.

I propose backporting this to 0-8-stable, too.
2017-02-06 18:02:32 -08:00
Mitchell Hashimoto
fe32f7b189
terraform: ignore RequiresNew for collection removal in diff.Same
Fixes #11349

I tracked this bug back to the early 0.7 days so this has been around a
really long time. I wanted to confirm that this wasn't introduced by any
new graph changes and it appears to predate all of that. I couldn't find
a single 0.7.x release where this worked, and I didn't want to go back
to 0.6.x since it was pre-vendoring.

The test case shows the logic the best, but the basic idea is: for
collections that go to zero elements, the "RequiresNew" sameness check
should be ignored, since the new diff can choose to not have that at all
in the diff.
2017-02-06 17:46:48 -08:00
Mitchell Hashimoto
ebb129f051
terraform: data source on refresh should just delete from state
This was caught by an acceptance test. We've now added a unit test. When
refreshing, an orphan (no config) data source should just be deleted.
2017-02-03 20:58:03 +01:00
Mitchell Hashimoto
1777f53a4b Merge pull request #11660 from hashicorp/f-graph-deps
terraform: remove ConnectDependents and related interfaces
2017-02-03 14:52:07 +01:00
Mitchell Hashimoto
755cef98b0
terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
James Bardin
9acb86a182 Merge pull request #11187 from hashicorp/jbardin/state-locking
State Locking initial implementations
2017-02-01 14:35:55 -05:00
Mitchell Hashimoto
068b2b2dec
terraform: add Meta field to diffs
This adds a Meta field (similar to InstanceState.Meta) to InstanceDiff.

This allows providers to store arbitrary k/v data as part of a diff and
have it persist through to the Apply. This will be used by helper/schema
for timeout storage being done by @catsby.

The type here is `map[string]interface{}`. A couple notes:

  * **Not using `string`**: The Meta field of InstanceState is a string
    value. We've learned that forcing things to strings is bad. Let's
    just allow types.

  * **Primitives only**: Even though it is type `interface{}`, it must
    be able to cleanly pass the go-plugin RPC barrier as well as be
    encoded to a file as Gob. Given these constraints, the value must
    only comprise of primitive types and collections. No structs,
    functions, channels, etc.
2017-01-31 11:50:37 -08:00
James Bardin
f20485550a Check for no state from the io.Reader
Read state would assume that having a reader meant there should be a
valid state. Check for an empty file and return ErrNoState to
differentiate a bad file from an empty one.
2017-01-30 17:16:57 -05:00
Mitchell Hashimoto
61881d2795 Merge pull request #10934 from hashicorp/f-provisioner-stop
core: stoppable provisioners, helper/schema for provisioners
2017-01-30 12:53:15 -08:00
Mitchell Hashimoto
3e771a674c
terraform: acquire stopCh outside goroutine to ensure in lock 2017-01-30 08:49:07 -08:00
Mitchell Hashimoto
195d34424e Merge pull request #11482 from hashicorp/f-computed-count
core: allow non-computed data source values in "count"
2017-01-30 08:44:27 -08:00
Mitchell Hashimoto
00232f0994
terraform: acquireRun during test to avoid special case logic 2017-01-30 08:41:38 -08:00
Mitchell Hashimoto
5b42781117
terraform: defer unlock of lock in Stop to enure it always unlocks 2017-01-30 08:35:10 -08:00
Mitchell Hashimoto
9183be4c83
update master version to 0.9.0-dev 2017-01-29 18:46:18 -08:00
Mitchell Hashimoto
cf46e1c3e0
terraform: don't validate computed values in validate
This disables the computed value check for `count` during the validation
pass. This enables partial support for #3888 or #1497: as long as the
value is non-computed during the plan, complex values will work in
counts.

**Notably, this allows data source values to be present in counts!**

The "count" value can be disabled during validation safely because we
can treat it as if any field that uses `count.index` is computed for
validation. We then validate a single instance (as if `count = 1`) just
to make sure all required fields are set.
2017-01-27 21:15:43 -08:00
Mitchell Hashimoto
0ba3fcdc63
terraform: test static var being passed into grandchild for count 2017-01-27 20:38:07 -08:00
Mitchell Hashimoto
2162d6cf3d
terraform: test a basic static var count passed into a module 2017-01-27 20:32:55 -08:00
Mitchell Hashimoto
dd6d025dbb
terraform: commmit generated file 2017-01-27 20:31:29 -08:00
Mitchell Hashimoto
2beb62c92b
terraform: remove flatten, forever 2017-01-26 21:03:27 -08:00
Mitchell Hashimoto
6d731b3b46
terraform: new provisioner node 2017-01-26 21:02:55 -08:00
Mitchell Hashimoto
e89d738679
terraform: provider transform is converted to new graph world view 2017-01-26 20:58:22 -08:00
Mitchell Hashimoto
91c9c6032f
terraform: remove the old resource node 2017-01-26 20:48:05 -08:00
Mitchell Hashimoto
d59725e9fd
terraform: convert StateDeps to use new structs 2017-01-26 20:47:20 -08:00
Mitchell Hashimoto
c1e4bd7b72
terraform: remove graph config node file 2017-01-26 20:16:06 -08:00
Mitchell Hashimoto
348cfa0ed7
terraform: remove graph annotations 2017-01-26 20:13:42 -08:00
Mitchell Hashimoto
a561934f61
terraform: keep pruning out lines 2017-01-26 20:12:01 -08:00
Mitchell Hashimoto
6c266d6ce3
terraform: prune down the resource node struct quite a bit 2017-01-26 20:08:55 -08:00
Mitchell Hashimoto
a6bab455cc
terraform: remove node module file 2017-01-26 20:05:42 -08:00
Mitchell Hashimoto
37294d5ad2
terraform: remove old variable node 2017-01-26 20:04:39 -08:00
Mitchell Hashimoto
513ff88859
terraform: remove GraphConfigNodeType 2017-01-26 20:03:29 -08:00
Mitchell Hashimoto
31c813fa51
terraform: remove GraphNodeModule 2017-01-26 20:01:39 -08:00
Mitchell Hashimoto
3a97cf2df9
terraform: goodbye GraphNodeConfigProvider 2017-01-26 19:59:25 -08:00
Mitchell Hashimoto
0039f70d06
terraform: remove config transformer old 2017-01-26 19:57:46 -08:00
Mitchell Hashimoto
9086e996d6
terraform: convert all tests to use the new config transformer 2017-01-26 19:56:16 -08:00
Mitchell Hashimoto
efc79d431e
terraform: more dead code removal 2017-01-26 19:47:02 -08:00
Mitchell Hashimoto
522a28ab95
terraform: convert root transform test to use new config transform 2017-01-26 19:40:46 -08:00
Mitchell Hashimoto
83e093a73e
terraform: delete destroy interfaces 2017-01-26 19:39:24 -08:00
Mitchell Hashimoto
d820d186e1
terraform: remove old resource count transformer 2017-01-26 19:37:47 -08:00
Mitchell Hashimoto
4e4d51e6ba
terraform: remove old orphan transform 2017-01-26 19:36:02 -08:00
Mitchell Hashimoto
9426b71a5f
terraform: remove noop transformer 2017-01-26 19:32:49 -08:00
Mitchell Hashimoto
e8eb0bd92f
terraform: delete proxy transformer 2017-01-26 19:31:32 -08:00
Mitchell Hashimoto
ca0550e7eb
terraform: delete old module destroy transform 2017-01-26 19:30:27 -08:00
Mitchell Hashimoto
13e27c8b8f
terraform: delete old unused transforms 2017-01-26 19:29:15 -08:00