Commit Graph

302 Commits

Author SHA1 Message Date
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
4ccb12508a terraform: decreasing counts works 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
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
fb3a67a6d7 terraform: more passing plan tests 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
99eab4fd13 terraform: more passing plan tests 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
f7bed9a2f9 terraform: more 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
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
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
d94c4392eb terraform: validate provisioners 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
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
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
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
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
9f70c6fad5 terraform: rename context 2015-02-19 12:07:54 -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
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
71918efd96 terraform: Add more tests for cases we felt weren't well covered 2014-12-16 15:59:26 -08:00
Mitchell Hashimoto
e5f07567c6 terraform: module input to another module doesn't error [GH-659] 2014-12-16 08:23:19 -08:00
Luke Amdor
6dcb7166d1 fix destroy so incoming module vars get set 2014-12-05 17:18:45 -06:00
Luke Amdor
60022978a6 adding context test for module multi-vars 2014-11-28 13:16:33 -06:00
Armon Dadgar
a5d444b8e3 terraform: fix module output handling. Fixes #474 2014-11-24 19:18:52 -08:00
Armon Dadgar
5b025c89f9 terraform: guard output types. Fixes #593 2014-11-24 16:49:38 -08:00
Armon Dadgar
e29e364c89 terraform: Testing duplicate delete issue 2014-11-18 15:38:54 -08:00
Mitchell Hashimoto
22f09b487b terraform: refresh ignores variables with no values [GH-478] 2014-10-20 23:08:17 -07:00
Mitchell Hashimoto
0908e8f42c terraform: don't fail refresh if output doesn't exist [GH-483] 2014-10-20 18:45:52 -07:00
Mitchell Hashimoto
686871310d terraform: input properly sends on only set input 2014-10-18 14:54:42 -07:00
Mitchell Hashimoto
dc3178e06a terraform: failling test case for a bug 2014-10-18 14:36:34 -07:00
Mitchell Hashimoto
914cb1d44c terraform: test for variables in provider configs 2014-10-18 14:13:14 -07:00
Mitchell Hashimoto
0a5e06d62c terraform: merge interpolated inherited provider configurations [GH-418] 2014-10-18 13:58:01 -07:00
Mitchell Hashimoto
f03ab178bf terraform: don't execute provisioners on destroy 2014-10-18 11:37:26 -07:00
Mitchell Hashimoto
990b814188 terraform: set count to 1 while validating [GH-442] 2014-10-17 18:18:28 -07:00
Mitchell Hashimoto
f626c5df96 terraform: validation works with count if default [GH-442] 2014-10-17 18:06:54 -07:00
Mitchell Hashimoto
bf7c40d115 terraform: test case for variable count 2014-10-17 18:03:30 -07:00
Mitchell Hashimoto
35352a2746 terraform: some more test cases for sanity 2014-10-16 23:20:46 -07:00
Mitchell Hashimoto
82bf4f485b terraform: taint resources who error on create with provisioners
[GH-434]
2014-10-16 23:19:07 -07:00
Mitchell Hashimoto
de4c922c9c terraform: validation with unknown variables works [GH-432] 2014-10-16 15:54:56 -07:00
Mitchell Hashimoto
f59e89ccb8 terraform: add count tainted apply test 2014-10-12 09:41:27 -07:00
Mitchell Hashimoto
ecafcfa682 terraform: don't validate tainted resources 2014-10-11 16:02:07 -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
36f4a644b6 terraform: warn if the name has special characters 2014-10-08 15:59:50 -07:00
Mitchell Hashimoto
8b5c120ecf terraform: add InputMode to determine what is asked for 2014-10-08 10:18:45 -07:00
Mitchell Hashimoto
d714c6f2f1 terraform: test path variables 2014-10-07 20:09:30 -07:00
Mitchell Hashimoto
94f43ff145 terraform: fix crash if outputs with no state [GH-358] 2014-10-03 15:57:43 -07:00
Mitchell Hashimoto
88ac1b030a terraform: another test for count index 2014-10-02 22:07:23 -07:00
Mitchell Hashimoto
ea18b62e8f terraform: count.index 2014-10-02 22:02:59 -07:00
Mitchell Hashimoto
66c58788fe terraform: test count = 1 variable access 2014-10-02 17:24:22 -07:00
Mitchell Hashimoto
221e40a3a9 terraform: test count == zero 2014-10-02 17:18:40 -07:00
Mitchell Hashimoto
e4ba737392 terraform: validate count is non-negative 2014-10-02 17:14:25 -07:00
Mitchell Hashimoto
53d05cb81f terraform: counts can't be computed 2014-10-02 16:21:17 -07:00
Mitchell Hashimoto
ced4125037 teraform: test that count can be a variable 2014-10-02 15:47:00 -07:00
Armon Dadgar
1977a53574 terraform: Deterministric and correct ordering for deposed nodes 2014-09-30 11:37:49 -07:00
Armon Dadgar
5207e1d268 terraform: test ordering when using create before with depedencies 2014-09-29 17:00:45 -07:00
Armon Dadgar
9a6c8490a0 terraform: Updating tests for modules 2014-09-29 15:27:56 -07:00
Armon Dadgar
bce9b664d8 terraform: test happy path create-before-destroy 2014-09-29 15:20:04 -07:00
Armon Dadgar
465f3f2676 terraform: test create-before-destroy with failed destroy 2014-09-29 15:20:03 -07:00
Armon Dadgar
59b7cb171a terraform: Testing failed apply with create_before_destroy 2014-09-29 15:20:03 -07:00
Armon Dadgar
f248ae3aee terraform: test provising fail create-before-destroy 2014-09-29 15:20:03 -07:00
Mitchell Hashimoto
133a28e363 terraform: prefix the Id for configuring providers 2014-09-29 10:36:49 -07:00
Mitchell Hashimoto
2791badf01 terraform: ask for input for providers 2014-09-29 09:13:15 -07:00
Mitchell Hashimoto
fd70e5e7bf terraform: Input() asks for variable inputs 2014-09-28 23:37:36 -07:00
Mitchell Hashimoto
3941dbac5d fmt 2014-09-28 11:51:49 -07:00
Mitchell Hashimoto
4b3473e522 terraform: fix compilation from merge 2014-09-26 10:10:08 -07:00
Mitchell Hashimoto
0d1867c0b3 Merge branch 'f-module-apply'
Conflicts:
	terraform/context.go
2014-09-26 10:08:35 -07:00
Mitchell Hashimoto
77b1c7daa0 terraform: destroy plans work with modules 2014-09-25 20:44:34 -07:00
Mitchell Hashimoto
c88614c585 terraform: providers inherit properly for validation 2014-09-24 21:38:23 -07:00
Mitchell Hashimoto
2d07f79c5a terraform: validation validates the submodules 2014-09-24 19:31:30 -07:00
Mitchell Hashimoto
7a636551be terraform: test for child module provider default 2014-09-24 14:04:54 -07:00
Mitchell Hashimoto
1f1563c95b terraform: provider inheritence is functional 2014-09-24 13:58:07 -07:00
Mitchell Hashimoto
8dbc7e0ccb terraform: change the graph a bit to better support providers with
modules

This doesn't cause inheritence to work yet. That is coming
2014-09-24 13:31:35 -07:00
Mitchell Hashimoto
86a4a6c7c8 terraform: test apply with modules 2014-09-23 17:13:50 -07:00
Mitchell Hashimoto
e8dfcdbe7b terraform: computed input variables work to modules 2014-09-23 17:05:44 -07:00
Mitchell Hashimoto
68b38b4904 terraform: test case for cascading input variables (variable to
variable)
2014-09-23 16:55:19 -07:00
Mitchell Hashimoto
9e871d5617 terraform: variables to modules work 2014-09-23 16:49:38 -07:00
Mitchell Hashimoto
a3b668bf7d terraform: module w/ computed output works 2014-09-23 16:27:38 -07:00
Mitchell Hashimoto
bfa4e1d7d0 terraform: module output variables are functional 2014-09-23 16:07:41 -07:00
Mitchell Hashimoto
1b5d0ed0bb terraform: outputs should be properly calculated for modules now 2014-09-23 15:46:20 -07:00
Mitchell Hashimoto
6b2781d77c terraform: module orphans 2014-09-23 14:57:17 -07:00
Mitchell Hashimoto
b1a583e3de terraform: plan with modules work 2014-09-23 14:15:40 -07:00
Mitchell Hashimoto
8dcc4528fc terraform: basic sub-module walks work
Lots broken still, but its a start.
2014-09-23 13:47:20 -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
a6f792b3aa terraform: update graph to build subgraphs for modules 2014-09-22 16:48:18 -07:00
Mitchell Hashimoto
a32833af2c terraform: Graph, Context, Plan all speak modules 2014-09-22 15:37:29 -07:00
Armon Dadgar
cdce8208f3 terraform: ensure provisioner runs only on instance create 2014-09-22 11:15:22 -07:00
Mitchell Hashimoto
53c23266ca terraform: add Info field to Resource, remove from Node 2014-09-19 23:01:51 -06:00
Mitchell Hashimoto
157843725d terraform: refreshing tainted resources works 2014-09-19 22:28:13 -06:00
Armon Dadgar
5e0765c24a terraform: Refresh handles tainted instances 2014-09-19 16:24:17 -07:00
Armon Dadgar
8e421caba1 terraform: show each tainted ID 2014-09-19 15:04:21 -07:00
Armon Dadgar
3b7c987889 terraform: EncodeDepedencies should override dep list 2014-09-18 13:33:05 -07:00
Mitchell Hashimoto
1aff5e98e1 terraform: some deepcopying going on 2014-09-17 17:18:17 -07:00
Mitchell Hashimoto
f9ce7de468 terraform: Refresh tests passing 2014-09-17 16:51:07 -07:00
Mitchell Hashimoto
e2aa067996 terraform: fixing Refresh tests 2014-09-17 16:47:26 -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
Armon Dadgar
81abdcafdc terraform: fixing all the panics 2014-09-16 16:55:19 -07:00
Mitchell Hashimoto
95f3e626a5 terraform: modify the ResourceProvider API super hardcore 2014-09-16 16:20:11 -07:00