Paul Hinze
52c4bfbe98
core: fix deadlock when dependable node replaced with non-dependable one
...
In #2884 , Terraform would hang on graphs with an orphaned resource
depended on an orphaned module.
This is because orphan module nodes (which are dependable) were getting
expanded (replaced) with GraphNodeBasicSubgraph nodes (which are _not_
dependable).
The old `graph.Replace()` code resulted in GraphNodeBasicSubgraph being
entered into the lookaside table, even though it is not dependable.
This resulted in an untraversable edge in the graph, so the graph would
hang and wait forever.
Now, we remove entries from the lookaside table when a dependable node
is being replaced with a non-dependable node. This means we lose an
edge, but we can move forward. It's ~probably~ never correct to be
replacing depenable nodes with non-dependable ones, but this tweak
seemed preferable to tossing a panic in there.
2015-08-10 15:50:36 -05:00
Mitchell Hashimoto
8f58367680
terraform: missing providers need to do dependencies
2015-05-01 18:08:06 -07:00
Mitchell Hashimoto
c207beda36
terraform: set variables in the proper location
2015-05-01 16:29:19 -07:00
Mitchell Hashimoto
f2e7f505d4
terraform: subpath context setting
2015-05-01 14:19:32 -07:00
Mitchell Hashimoto
7e838dfae2
terraform: Graph should overrride Remove to clear lookaside
2015-05-01 11:20:57 -07:00
Mitchell Hashimoto
e089e34c89
terraform: graph walk should handle eval errors properly
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
863b9a4f45
terraform: filter eval nodes on operation
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
d847b2b672
terraform: provider config inheritance in modules
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
cf5f26bd9a
terraform: walk static subgraphs
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
b8bc3dc19b
terraform: provider should be cached by path
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
cd609172e1
terraform: new dag.WalkFunc API
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
28a23a45f4
terraform: dynamic subgraph expansion for count
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
58347617e8
terraform: trying this graphwalker thing
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
012d68923c
terraform: Eval
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
e1d3f308a6
terraform: untainted resource depends on tainted resource if it exists
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
8bf725e746
terraform: GraphNodeDependent
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
cb4e364aca
terraform: more tests
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
4f8152c28a
terraform: the orphan transform uses the graph path
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
3820aea513
terraform: make adding config nodes a transformer
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
c18825800b
terraform: rename graph to graph_old*.go
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
659f0db8cf
terraform: Graph => GraphOld
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
dc036a0dd0
terraform: fix bug with crash with no providers [GH-786]
2015-01-16 09:56:51 -08:00
Sander van Harmelen
528167513b
Looking at issue #639 this seems to be the root cause
...
After fixing this part, there also needs to be made a change to the
example given or the schema of aws_elb.
2014-12-15 23:38:46 +01:00
Armon Dadgar
afef564108
terraform: Handle module depedency inversion
2014-11-24 14:38:06 -08:00
Armon Dadgar
9c6280f64b
terraform: encode module dependencies
2014-11-21 16:44:20 -08:00
Armon Dadgar
ec1c026b80
terraform: initialize and attach module state
2014-11-21 16:41:48 -08:00
Armon Dadgar
6e1ef1c634
terraform: restore dependencies for orphan modules
2014-11-21 16:14:57 -08:00
Armon Dadgar
01db1ff8bd
terraform: diff handler in expansion avoids duplicate destroy
2014-11-18 15:38:40 -08:00
Armon Dadgar
507b75449f
terraform: Move diff handling during dynamic expansion
2014-11-18 15:10:18 -08:00
Armon Dadgar
a2ba45edf5
terraform: Simplify sub-graph finalization
2014-11-17 15:50:26 -08:00
Mitchell Hashimoto
686871310d
terraform: input properly sends on only set input
2014-10-18 14:54:42 -07:00
Mitchell Hashimoto
0a5e06d62c
terraform: merge interpolated inherited provider configurations [GH-418]
2014-10-18 13:58:01 -07:00
Mitchell Hashimoto
b2d674b431
terraform: don't add tainted resources to expanded graph [GH-412]
...
The tainted resources are separate elements in the graph.
2014-10-18 11:13:36 -07:00
Mitchell Hashimoto
06889b8fc7
terraform: make sure taint destroys happen first for counts
2014-10-12 09:50:36 -07:00
Mitchell Hashimoto
ac7e494697
terraform: remove an inaccurate TODO
2014-10-12 09:19:38 -07:00
Mitchell Hashimoto
f74a27d75f
terraform: provisioner dependencies are reflected in graph
2014-10-12 09:15:26 -07:00
Mitchell Hashimoto
d4d58ae44b
terraform: turn resource expand into graph
2014-10-12 08:57:08 -07:00
Mitchell Hashimoto
129e4fc453
terraform: fix crash if depends_on used when state has orphans
2014-10-11 13:20:11 -07:00
Mitchell Hashimoto
6c96e0f6ac
terraform: nil out the Diff on a resource when expanding
...
This fixes a bug where the Destroy diff was being kept around for
nodes that shouldn't be destroyed. We added a test to verify this
doesn't happen.
2014-10-09 23:15:42 -07:00
Mitchell Hashimoto
ea18b62e8f
terraform: count.index
2014-10-02 22:02:59 -07:00
Mitchell Hashimoto
581d1dee8c
terraform: remove jank computed check for count
2014-10-02 16:32:11 -07:00
Mitchell Hashimoto
53d05cb81f
terraform: counts can't be computed
2014-10-02 16:21:17 -07:00
Mitchell Hashimoto
039531e9ca
terraform: dependencies in the graph from count properly show up
2014-10-02 13:54:04 -07:00
Mitchell Hashimoto
0f087141e3
terraform: properly discover count orphans
2014-10-02 13:12:53 -07:00
Mitchell Hashimoto
3b89a7bdc7
terraform: more tests passing
2014-10-02 11:48:00 -07:00
Mitchell Hashimoto
fb1c224e12
terraform: expand resource nodes at walk time
2014-10-02 10:42:58 -07:00
Mitchell Hashimoto
fecb68f117
terraform: remove meta nodes
2014-10-01 18:08:52 -07:00
Mitchell Hashimoto
4fe0c4ada4
terraform: don't use Meta node anymore
2014-10-01 18:06:25 -07:00
Armon Dadgar
1977a53574
terraform: Deterministric and correct ordering for deposed nodes
2014-09-30 11:37:49 -07:00
Armon Dadgar
4fe05428b3
terraform: Avoid having multiple primaries
2014-09-29 15:20:03 -07:00