Mitchell Hashimoto
3f9dafc5f6
Merge pull request #1033 from hashicorp/f-self
...
core: Self Variables
2015-02-23 15:19:48 -08:00
Mitchell Hashimoto
330364f668
terraform: State.IsEmpty
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
6cd5c894e8
terraform: State.IsRemote
2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
dd7bc5db0c
terraform: more self tests
2015-02-23 15:02:26 -08:00
Mitchell Hashimoto
0e59acc2c9
terraform: enable self vars
2015-02-23 14:56:02 -08:00
Mitchell Hashimoto
022967acdb
terraform: module inputs/vars can be non-strings [GH-819]
2015-02-23 13:50:53 -08:00
Mitchell Hashimoto
8a9c8a882e
Merge pull request #1019 from hashicorp/f-state-equality
...
terraform: State.Equal to check for state equality
2015-02-23 13:47:47 -08:00
Mitchell Hashimoto
709c40026c
terraform: remove debug println
2015-02-23 13:45:45 -08:00
Mitchell Hashimoto
39d2bf4629
terraform: cache provider configuration with the provider name
...
/cc @sethvargo
This was causing a race with whichever provider was configured first
would "win" the configuration slot. We need to make sure to append the
unique provider name to the end of the key.
Note: this doesn't have tests. We don't test this yet. :(
2015-02-20 15:48:06 -08:00
Mitchell Hashimoto
40ee70d5c9
terraform: Input should only be called on providers once
...
/cc @sethvargo
Prior to this commit, we'd only persist the result of calling Input if
any input was given (len(result) > 0). The result was that every module
would also repeat asking for input even if there was no input to be
asked for.
This commit makes it so that if no input was received, we still set a
sentinel so that modules don't re-ask.
2015-02-20 15:35:57 -08:00
Mitchell Hashimoto
b041f48e56
terraform: State.Equal
2015-02-20 13:39:49 -08:00
Mitchell Hashimoto
85e2bef179
terraform: provisioners should be cached with the provisioner name
2015-02-20 10:50:36 -08:00
Mitchell Hashimoto
ab414de0ab
terraform: test case for destroying with a count [GH-527]
2015-02-20 10:02:52 -08:00
Mitchell Hashimoto
c2593f6ada
terraform: re-enable dot-graphs
2015-02-19 23:00:29 -08:00
Mitchell Hashimoto
4b6f258f1f
terraform: only depose state if we're doing the destroy side
2015-02-19 12:08:34 -08:00
Mitchell Hashimoto
fa222a44c3
terraform: limit parallelism
2015-02-19 12:08:34 -08:00
Mitchell Hashimoto
0175d1babc
terraform: updated comment
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
10e96ad72d
terraform: provisioner config is properly interpolated
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
ae68cf1705
terraform: slightly better validation error messages
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
459ad04d71
terraform: provider cache should append the provider name to it
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
ad595cf254
terraform: test case for cycle of CBD depending on non-CBD
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
e68ea0d38f
terraform: only keep the destroy if we decreased counts
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
1ed37f0b7f
terraform: change DiffId to DiffInclude to allow smarter logic
...
This lets us check for orphans properly.
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
4789f16796
terraform: tainted destroy nodes
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
991611857a
terraform: remove requirement that DestroyNode return the SAME node
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
9c14315336
terraform: don't prune if there are known tainted resources
2015-02-19 12:08:33 -08:00
Mitchell Hashimoto
8d2ed22e97
terraform: prune destroy nodes for resources not in diff
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
8db6f722d2
terraform: CBD edge transpositions must happen atomically
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
c47440ddd6
terraform: remove evaltype, unused
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
b52881d232
terraform: clean up EvalNodes
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
af1778cd5e
terraform: goodbye graph.go
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
b1e5b32322
terraform: Graph returns *Graph for now
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
7552abed8b
terraform: fix Refresh func signature
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
7ccba588ac
terraform: gofmt -w -r 'Context2 -> Context' terraform/
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
e37c187228
terraform: goodbye context.go (old)
2015-02-19 12:08:32 -08:00
Mitchell Hashimoto
14b5942453
terraform: all input tests pass
2015-02-19 12:08:08 -08:00
Mitchell Hashimoto
7c78a3749e
terraform: provider input
2015-02-19 12:08:08 -08:00
Mitchell Hashimoto
f3714f1efc
terraform: start Input
2015-02-19 12:08:08 -08:00
Mitchell Hashimoto
7b305d1f41
terraform: forgot the docs :(
2015-02-19 12:08:08 -08:00
Mitchell Hashimoto
960ba73f1d
terraform: last apply test
2015-02-19 12:08:08 -08:00
Mitchell Hashimoto
1c713878b0
terraform: fix outputs on destroy
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
bd0c3b12cb
terraform: more tests passing
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
c8091aa338
terraform: fix more create-before-destroy state juggling
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
33cad6d207
terraform: fix create before destroy edge case with partial state
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
f7f1f17b49
terraform: create before destroy
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
119d5a09cf
terraform: fix some diff comparison
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
b8ebcc85d7
terraform: partial state works properly
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
5f8d1b86d5
terraform: more passing tests
2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
6bb3cb8f2f
terraform: a lot more passing tests
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
742b45886a
terraform: destroy nodes work properly
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
c3df003624
terraform: more passing tests
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
e2abf17c9c
terraform: provisioners should only be run on first create
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
c70cc682ea
terraform: resource provisioner self references are not put in the graph
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
edfb11ff1d
terraform: more passing tests
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
79746cb35d
terraform: state must not be nil for apply
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
b8e5690565
terraform: eval post hook, eerrors
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
819aed67d4
terraform: provisioners
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
f8871917f5
terraform: update tests
2015-02-19 12:08:06 -08:00
Mitchell Hashimoto
10e82375f2
terraform: early exit and cancellation
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
d0c77d268a
terraform: more tests passing
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
843cfbe8ad
terraform: tainted apply
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
a3e4b3e966
terraform: more apply tests
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
691db58478
terraform: apply for orphans
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
abc68a89a8
terraform: use the proper diff for apply time
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
aea6b0a7e1
terraform: compare bad diffs for apply
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
d72ceb597d
terraform: more tests
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
9b7d1509fc
terraform: outputs in apply
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
a614f6105a
terraform: apply starting
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
93f3050dbd
terraform: make things more linear
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
67e7aeeea0
terraform: PLAN IS DONE
...
http://i.imgur.com/fiw5hXx.gif
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
f85baf6e26
terraform: more tests
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
ef32656a65
terraform: set the diff up properly with tainted resources
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
e82affdf5c
terraform: more plan tests
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
ec6ce69e90
terraform: destroy module plan
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
e185769271
terraform: plan destroy
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
00f4245572
terraform: count increase from one tests
2015-02-19 12:08:04 -08:00
Mitchell Hashimoto
8fc75ebb28
terraform: get proper state representation of expanded resources
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
4ccb12508a
terraform: decreasing counts works
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
d7dc0291f5
terraform: put destroy nodes into the graph
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
4caab6870b
terraform: more passing plan tests
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
354a35afb0
terraform: properly interpolate variable counts
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
4c3ea016b9
terraform: non-multi count resource is still index 0
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
14aee00bf0
terraform: setup proper count.index value for interpolation
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
cbbe9cb588
terraform: state prune prunes computed variables
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
8365d39d26
terraform: fix more plan tests
2015-02-19 12:08:03 -08:00
Mitchell Hashimoto
a2d278b284
terraform: more passing tests
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
10a216d85e
terraform: nil diffs should not be written to the diff
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
32e714c41d
terraform: computed outputs
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
de6827b3ed
terraform: calculate outputs and store it into the state
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
84cf7f1179
terraform: outputs show up in the graph
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
fb3a67a6d7
terraform: more passing plan tests
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
d9118007ea
terraform: fix some failing tess
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
baf26e9c92
terraform: validation eval nodes should filter on walkValidate
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
4089d33dea
terraform: provider merging should be parent OVER child
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
e089e34c89
terraform: graph walk should handle eval errors properly
2015-02-19 12:08:02 -08:00
Mitchell Hashimoto
99eab4fd13
terraform: more passing plan tests
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
2b917054da
terraform: orphan transform should work if state is nil
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
e45308fa6d
terraform: module orphans are properly expanded and planned for destroy
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
ce37165c06
terraform: orphan transform was not picking up modules without parent in
...
state
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
57eae5f9a8
terraform: fix formatting of node name with index -1
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
f7bed9a2f9
terraform: more tests
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
daf66357f6
terraform: fix tests
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
10dee0dce8
terraform: more passing tests
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
23d097ee53
terraform: module inputs are passed through to subgraphs
2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
5595229430
terraform: uncomments more passing tests
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
aae2d4c780
terraform: starting up the plans
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
a78fe784b8
terraform: REFRESH IS DONE
...
https://dl.dropboxusercontent.com/u/46819/gifs/america.gif
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
2680b6bed4
terraform: refresh tainted resources
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
e5e4ac7548
terraform: deep copy the state when refreshing
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
cb80118674
terraform: so many tests passing
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
379c37dd06
terraform: refresh hooks
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
5ba52ceac4
terraform: another test
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
a616c362de
terraform: more tests
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
1e962b868d
terraform: Refresh, Read/Write state
2015-02-19 12:08:00 -08:00
Mitchell Hashimoto
2b8fd18fa8
terraform: stateId for resource
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
98eb9a1f19
terraform: fix some count validation
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
863b9a4f45
terraform: filter eval nodes on operation
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
bde5fa36e9
terraform: fix failing tests
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
3db22d0de0
terraform: move more tests
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
220c2be571
terraform: convert more tests
2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
23bb182732
terraform: more tests
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
533d63dda3
terraform: more tests
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
d94c4392eb
terraform: validate provisioners
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
ea42deb66c
terraform: provisioner transforms
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
31f6b7474d
terraform: more tests
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
9cd877a59c
terraform: validate resource names
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
8552bb18cf
terraform: more tests
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
0ab813fe1c
terraform: comments, and better
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
b8bc3dc19b
terraform: provider should be cached by path
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
a41ec59510
terraform: move more tests
2015-02-19 12:07:58 -08:00
Mitchell Hashimoto
584eac9e92
terraform: EvalValidateCount
2015-02-19 12:07:57 -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
ffe9ccacf0
terraform: convert more tests
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
cae6deb351
terraform: more tests
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
e2a3f78c08
terraform: expand modules in our builder
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
4692f9809f
terraform: module nodes expand
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
e5fd7c9e84
terraform: ExpandTransform
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
4d205ebcf6
terraform: GraphVertexTransformers
2015-02-19 12:07:57 -08:00
Mitchell Hashimoto
81856f99ba
terraform: better comments
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
58347617e8
terraform: trying this graphwalker thing
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
10264a7def
terraform: nicer errors by using multierror properly
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
d0786d20dd
terraform: more passing tests
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
de3d9fb9d9
terraform: evaluation interpolater connect
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
3908b6319a
terraform: pulling out everything into Interpolater
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
76ce6e45f7
terraform: extract interpolation to its own struct
...
This is not really improving the way we do interpolation so much as its
just shuffling bits around. I don't want to refactor interpolation in
this branch so I needed to make the current way reusable so that I can
reuse it in the new Context.
2015-02-19 12:07:56 -08:00
Mitchell Hashimoto
57ad9e2502
terraform: provider configuration validation
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
f9f18122ed
terraform: basic provider validation!
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
c308405b53
terraform: validation in progress
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
d9a964f44c
terraform: validate almost done
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
012d68923c
terraform: Eval
2015-02-19 12:07:55 -08:00
Mitchell Hashimoto
9f70c6fad5
terraform: rename context
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
a8364dd0fc
terraform: more eval stuff
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
3f0eb528de
terraform: all eval nodes tested
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
c2df70e499
terraform: complete more nodes
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
ac92c67cba
terraform: some tests for the eval nodes
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
128c07e504
terraform: start eval stuff, untested
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
a73f939ee9
terraform: initial GraphBuilder impl
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
02bedd6850
terraform: transformers operate on root structures
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
96a2d3e116
terraform: PruneProviderTransfomer
2015-02-19 12:07:54 -08:00
Mitchell Hashimoto
254689389a
terraform: missing provider transform
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
c0695b0657
terraform: tests that some other graph nodes implement the interfaces
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
01ec680019
terraform: ProviderTransform to map resources to providers by dep
2015-02-19 12:07:53 -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
d2f3dc8d1f
terraform: add a tODO in there, I can't think of a use case yet
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
8bf725e746
terraform: GraphNodeDependent
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
8dc4c56b2e
terraform: tainted transformer
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
6d46b02fa5
terraform: test orphan-to-orphan dependencies
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
98683b44b8
terraform: move resource orphan deps out of loop
2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
7025c48165
terraform: module orphan dependencies
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
922bdc92db
terraform: module orphans
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
e08dc05f54
terraform: State.ModuleOrphans
2015-02-19 12:07:52 -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
6eb379fa75
terraform: start the transforms, adding orphans
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
21e4501edb
terraform: start implementing interfaces for semantic checks
2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
9f70cddadf
terraform: error if config graph is missing dependencies
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
9d593cdece
terraform: use new dag API
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
87f4c3aae1
dag: rename to this
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
012dcca7d5
terraform: config graph respects depends_on
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
eb1a1fa7c9
terraform: put modules into the config graph
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
0f8c0eb981
terraform: config graph has providers
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
6b00633ed1
terraform: start Graph2 to make logical config graph
2015-02-19 12:07:51 -08:00
Mitchell Hashimoto
659a77c6ae
helper/schema: validate subresources more effectively
2015-02-18 09:41:55 -08:00
Mitchell Hashimoto
c2f3f0594d
terraform: sort dependencies of resource state [GH-928]
2015-02-17 11:47:53 -08:00
Emil Hessman
6d9c4ea78f
terraform: fix ContextPlan test failure on Windows
...
The attributes in the diff are %#v-formatted. This means that all `\`
characters in the Windows paths are escaped with a `\`. We need to
escape the `\` characters in cwd, module, and root before doing any
comparison work.
Fixes the following test failure on Windows:
--- FAIL: TestContextPlan_pathVar (0.00s)
context_test.go:3833: bad:
DIFF:
CREATE: aws_instance.foo
cwd: "" => "C:\\Users\\ceh\\src\\github.com\\hashicorp\\terraform\\terraform/barpath"
module: "" => "C:\\Users\\ceh\\src\\github.com\\hashicorp\\terraform\\terraform\\test-fixtures\\plan-path-var/foopath"
root: "" => "C:\\Users\\ceh\\src\\github.com\\hashicorp\\terraform\\terraform\\test-fixtures\\plan-path-var/barpath"
type: "" => "aws_instance"
STATE:
<no state>
expected:
DIFF:
CREATE: aws_instance.foo
cwd: "" => "C:\Users\ceh\src\github.com\hashicorp\terraform\terraform/barpath"
module: "" => "C:\Users\ceh\src\github.com\hashicorp\terraform\terraform\test-fixtures\plan-path-var/foopath"
root: "" => "C:\Users\ceh\src\github.com\hashicorp\terraform\terraform\test-fixtures\plan-path-var/barpath"
type: "" => "aws_instance"
STATE:
<no state>
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/terraform 0.050s
2015-02-04 18:26:42 +01:00
Mitchell Hashimoto
dc036a0dd0
terraform: fix bug with crash with no providers [GH-786]
2015-01-16 09:56:51 -08:00
Mitchell Hashimoto
2abeb2d9ac
config: use new API
2015-01-14 22:03:15 -08:00
Mitchell Hashimoto
d3c0543bf3
Merge pull request #797 from hashicorp/f-stronger-types
...
Force variables to be typed (internally)
2015-01-14 15:30:38 -08:00
Mitchell Hashimoto
8ae14f06b3
config: variables must be typed
2015-01-14 10:40:43 -08:00
Emil Hessman
071d872dc2
terraform: acceptance test for validation error
...
Add an acceptance test where terraform plan should error due
to validation errors.
2015-01-13 06:59:12 +01:00
Mitchell Hashimoto
1429ac6a7f
terraform: return unknown variable value if nil
2014-12-16 18:43:18 -08:00
Mitchell Hashimoto
71918efd96
terraform: Add more tests for cases we felt weren't well covered
2014-12-16 15:59:26 -08:00
Sander van Harmelen
8347569396
Adding a test for the change in PR #681
...
Should have already done that together with that PR…
2014-12-16 19:15:07 +01:00
Mitchell Hashimoto
ef60ac5b8c
terraform: update comment
2014-12-16 08:24:21 -08:00