Commit Graph

353 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e5ce6a97a3 Merge pull request #385 from hashicorp/f-splat-wtf
Fix variable "splatting"
2014-10-09 23:18:10 -07:00
Mitchell Hashimoto
975d564a22 terraform: remove debug stuff 2014-10-09 23:16:59 -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
865ec6a6bf terraform: use the InterpSplitDelim 2014-10-09 16:17:00 -07:00
Mitchell Hashimoto
9dd7618fce config: fix messaging for name symbols 2014-10-08 16:12:53 -07:00
Mitchell Hashimoto
9ed89dbabd terraform: make wording better 2014-10-08 16:01:13 -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
28acb7baa8 Merge pull request #361 from hashicorp/f-provisioner-ui
Foundational support for UI output from provisioners
2014-10-05 08:29:18 -07:00
Mitchell Hashimoto
b713f1ac8d terraform: no longer check for nil diff as error 2014-10-04 16:47:42 -07:00
Mitchell Hashimoto
76f5f1057e terraform: no longer require uiOutput, do it auto in Hook 2014-10-04 16:24:07 -07:00
Mitchell Hashimoto
d7a1f3dc0e terraform: prefix the provisioner output 2014-10-04 10:38:46 -07:00
Mitchell Hashimoto
8b129babe5 terraform: change provisioners to take UIOutput 2014-10-04 09:20:05 -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
2f2be4e936 terraform: show variable defaults when prompting for inputs 2014-10-02 22:33:38 -07:00
Mitchell Hashimoto
1ddf5bfc5f terraform: guard against a nil resource 2014-10-02 22:24:01 -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
941e27b9f3 terraform: Validate expands properly 2014-10-02 13:24:38 -07:00
Mitchell Hashimoto
79520a19c4 terraform: walk the resource properly for destroy 2014-10-02 13:23:16 -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
Armon Dadgar
4fe05428b3 terraform: Avoid having multiple primaries 2014-09-29 15:20:03 -07:00
Mitchell Hashimoto
d927c6e1f6 terraform: support var descriptions 2014-09-29 14:05:10 -07:00
Mitchell Hashimoto
901c1448b4 command: make the UI a look nicer 2014-09-29 13:12:06 -07:00
Mitchell Hashimoto
9bb26f7695 terraform: Make output more machine-like 2014-09-29 12:52:48 -07:00
Mitchell Hashimoto
980fce1d6c terraform: make UX a bit better for input 2014-09-29 12:45:28 -07:00
Mitchell Hashimoto
99d0e52ead terraform: validate should use the full config 2014-09-29 12:04:14 -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
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
1835a03842 terraform: hook parameter is an InstanceInfo 2014-09-25 10:40:44 -07:00
Mitchell Hashimoto
bc71d6adca terraform: prefix errors/warnings with the module they came from 2014-09-24 22:35:11 -07:00
Mitchell Hashimoto
c88614c585 terraform: providers inherit properly for validation 2014-09-24 21:38:23 -07:00
Mitchell Hashimoto
6712ed15aa terraform: clarify comment 2014-09-24 19:40:54 -07:00
Mitchell Hashimoto
8420b58015 terraform: clean up some functions 2014-09-24 19:36:00 -07:00
Mitchell Hashimoto
2d07f79c5a terraform: validation validates the submodules 2014-09-24 19:31:30 -07:00
Mitchell Hashimoto
a36b3e1ec5 command: tests pass 2014-09-24 15:48:46 -07:00
Mitchell Hashimoto
718fb42f4b terraform: Plan should use module.Tree 2014-09-24 14:56:48 -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
e8dfcdbe7b terraform: computed input variables work to modules 2014-09-23 17:05:44 -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
d443202b31 terraform: fix copying dependencies 2014-09-23 14:20:26 -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
c164839ed1 terraform: walkContext 2014-09-23 13:21:45 -07:00
Mitchell Hashimoto
bc67e7c443 terraform: diff is split down into modules 2014-09-23 11:43:21 -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
73e2a43427 terraform: don't put the ResourceState in Resource 2014-09-21 22:08:21 -07:00
Mitchell Hashimoto
a3bb8435b7 terraform: remove unused 2014-09-21 09:42:37 -07:00
Mitchell Hashimoto
13a4818867 terraform: add flags field 2014-09-20 17:02:31 -07:00
Mitchell Hashimoto
53c23266ca terraform: add Info field to Resource, remove from Node 2014-09-19 23:01:51 -06:00
Mitchell Hashimoto
06c862a379 terraform: tainted things all work 2014-09-19 22:47:53 -06:00
Mitchell Hashimoto
10b5661bc3 terraform: planning tainted resources works 2014-09-19 22:35:29 -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
dc01633f3c terraform: fixing outputs for destroy plan 2014-09-17 17:35:43 -07:00
Mitchell Hashimoto
9aa8bec660 terraform: update comments 2014-09-17 17:23:19 -07:00
Mitchell Hashimoto
1aff5e98e1 terraform: some deepcopying going on 2014-09-17 17:18:17 -07:00
Armon Dadgar
c14a17f39b terraform: save/restore dependency info for orphans 2014-09-17 17:01:55 -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
edccc2de3f terraform: fixing provisioner invocation 2014-09-16 17:37:39 -07:00
Armon Dadgar
4a736b0dac terraform: Fixing panics and TODOs 2014-09-16 17:19:37 -07:00
Armon Dadgar
55f4e35586 terraform: Fixing applyWalkFn 2014-09-16 17:10:41 -07:00
Armon Dadgar
81abdcafdc terraform: fixing all the panics 2014-09-16 16:55:19 -07:00
Armon Dadgar
25a3cc480c terraform: fixing tons of panics 2014-09-16 16:32:01 -07:00
Mitchell Hashimoto
95f3e626a5 terraform: modify the ResourceProvider API super hardcore 2014-09-16 16:20:11 -07:00
Armon Dadgar
3963b42625 terraform: Fixing up context 2014-09-16 12:12:15 -07:00
Armon Dadgar
9cbd71b88d terraform: Changing how instances are represented 2014-09-15 17:49:31 -07:00
Armon Dadgar
f5fc4933e5 terraform: working through errors 2014-09-15 17:30:18 -07:00
Armon Dadgar
a85d6fa6c3 terraform: Adding module lookups for state 2014-09-15 17:11:36 -07:00
Mitchell Hashimoto
a53faa2fff terraform: validate providers even without config block [GH-284] 2014-09-09 17:38:30 -07:00
Mitchell Hashimoto
52bc9a1055 core: check sets for computed [GH-247] 2014-08-30 17:26:10 -07:00
Mitchell Hashimoto
da2e221628 terraform: Interpolate if there are any interpolations [GH-159] 2014-08-21 15:05:56 -07:00
Mitchell Hashimoto
d8a999e5af terraform: ResourceConfig.Get gets interpolated if possible 2014-08-19 09:05:19 -07:00
Mitchell Hashimoto
87f4b49f85 terraform: multi-variables work with count = 1 [GH-115] 2014-08-05 10:12:35 -07:00
Mitchell Hashimoto
78c32ac196 terraform: hooks around provisioners 2014-07-27 09:00:34 -07:00
Mitchell Hashimoto
615cf04715 terraform: refresh returning nil should delete from state 2014-07-24 14:40:52 -07:00
Mitchell Hashimoto
86903eb18f terraform: fix issues with tainted marking 2014-07-24 08:49:54 -07:00
Mitchell Hashimoto
1ee69761d4 terraform: self-referencing variables in provisoiners work 2014-07-24 07:58:45 -07:00
Mitchell Hashimoto
b51d18f1de terraform: more logs 2014-07-24 07:30:24 -07:00
Mitchell Hashimoto
dc0ec11ec9 command: fix tests 2014-07-22 19:43:09 -07:00
Mitchell Hashimoto
d5e3d5a196 terraform: validate diffs are the same 2014-07-22 19:33:09 -07:00
Mitchell Hashimoto
79eb52eba6 terraform: error if diff during Apply returns nil 2014-07-22 19:33:08 -07:00
Mitchell Hashimoto
14f7067b0c terraform: taint plan requires destroy/create 2014-07-22 10:30:42 -07:00
Mitchell Hashimoto
192fc1e544 terraform: mark resource as tainted if provisioning fails 2014-07-22 10:09:11 -07:00
Mitchell Hashimoto
808036bf60 terraform: ResourceProvisioner can't return a state anymore 2014-07-22 09:56:39 -07:00
Mitchell Hashimoto
fed0a89c36 terraform: comments 2014-07-22 08:21:11 -07:00
Mitchell Hashimoto
83ba038423 terraform: mapping overrides work 2014-07-22 08:18:53 -07:00
Mitchell Hashimoto
c9a20c3c58 terraform: test that mapping lookups work 2014-07-22 08:06:09 -07:00
Mitchell Hashimoto
3276ae313f terraform: PostApply should get error result from Apply 2014-07-17 15:38:50 -07:00
Mitchell Hashimoto
ff36378c4e terraform: partial state should be saved on apply error 2014-07-17 15:32:19 -07:00
Armon Dadgar
104b28e19e terraform: Remove ResourceConnectionInfo, use raw map 2014-07-15 12:34:07 -07:00
Armon Dadgar
fec8e95a09 terraform: Ensure ConnInfo is initialized 2014-07-15 12:34:07 -07:00
Armon Dadgar
94c95afa48 terraform: Passthrough provisioner level connection info 2014-07-15 12:34:06 -07:00
Mitchell Hashimoto
3af16c8faf terraform: don't process outputs when all we did was destroy 2014-07-13 11:07:31 -07:00
Mitchell Hashimoto
4dea4c325b terraform: Context.Graph 2014-07-12 19:23:56 -07:00
Mitchell Hashimoto
10d17c4d40 terraform: don't ever pass a nil diff into Apply 2014-07-11 20:20:08 -07:00
Mitchell Hashimoto
2ed77c8a6f terraform: remove output diffs attributes from the Apply call 2014-07-11 12:00:41 -07:00
Mitchell Hashimoto
8d065ce5c4 terraform: don't validate orphans 2014-07-11 11:09:19 -07:00
Mitchell Hashimoto
9c9f478811 terraform: remove data race around validation 2014-07-10 13:36:06 -07:00
Mitchell Hashimoto
d9dda40957 Merge pull request #16 from hashicorp/f-provisioners
Adding support for provisioners
2014-07-10 13:03:51 -07:00
Armon Dadgar
83c1ed438f terraform: Fix and test provisioner configs 2014-07-10 11:38:57 -07:00
Armon Dadgar
2423d135ac terraform: Move the config initialization of provisioners 2014-07-10 11:38:57 -07:00
Armon Dadgar
87c3423fd4 terrform: Thread provisioner factory through Context 2014-07-10 11:38:56 -07:00
Armon Dadgar
ee475e8178 terraform: Apply and Validate provisioners when walking 2014-07-10 11:38:56 -07:00
Mitchell Hashimoto
3e4bdb5584 terraform: fix more cases where nil access can happen 2014-07-10 11:13:17 -07:00
Mitchell Hashimoto
eda3cb009c terraform: make sure the "id" attribute is in the state 2014-07-08 17:15:41 -07:00
Mitchell Hashimoto
251790f05a terraform: add ID to diff implicitly 2014-07-08 16:58:31 -07:00
Mitchell Hashimoto
3318fe97dc terraform: ContextOpts can set a max parallelism 2014-07-08 11:42:03 -07:00
Mitchell Hashimoto
6a7e3668a2 command: apply saves state even if error occurs 2014-07-07 21:20:48 -07:00
Mitchell Hashimoto
5263306f1f terraform: more logging 2014-07-07 21:12:21 -07:00
Mitchell Hashimoto
b0a83adea4 terraform: manually interpolate variables in walker functions
This avoids issues where we were interpolating when we didn't need to
2014-07-07 16:56:23 -07:00
Mitchell Hashimoto
c96886edce terraform: Refresh should work on Context state 2014-07-07 16:22:09 -07:00
Mitchell Hashimoto
38b3734d12 terraform: don't refresh resources that aren't created 2014-07-07 16:19:25 -07:00
Mitchell Hashimoto
b80e8364d0 terraform: fix potential nil access on graph 2014-07-07 15:38:25 -07:00
Mitchell Hashimoto
916eb5aaf3 terraform: copy before modifying struct in graphAddDiff
/cc @pearkes - Fixes the destroy bug
2014-07-07 12:53:39 -07:00
Mitchell Hashimoto
582d81ed03 terraform: converge on calculated variables rather than caching 2014-07-06 23:03:51 -07:00
Mitchell Hashimoto
f1b4f7ad40 terraform: simplify internals, remove unused vars 2014-07-06 21:53:22 -07:00
Mitchell Hashimoto
cc0c32d5ca terraform: test for single index access of counts 2014-07-06 14:09:44 -07:00
Mitchell Hashimoto
a01d979c1b terraform: outputs work with multi-variables 2014-07-05 10:48:47 -07:00
Mitchell Hashimoto
4b5f5aec65 terraform: outputs are computed for the state 2014-07-04 15:36:28 -07:00
Mitchell Hashimoto
c5a0b9cb40 terraform: test case for decreasing the count 2014-07-03 21:42:18 -07:00
Mitchell Hashimoto
a616218d13 terraform: planning and applying multi-count resources tests 2014-07-03 21:24:17 -07:00
Mitchell Hashimoto
175e455999 terraform: add better logging 2014-07-03 12:32:00 -07:00
Mitchell Hashimoto
ed57fe7083 terraform: ValidateResource is called 2014-07-03 12:30:51 -07:00
Mitchell Hashimoto
6508edaba9 terraform: Context.Validate checks ProviderConfig Validate 2014-07-03 12:17:56 -07:00
Mitchell Hashimoto
a6ae7230d1 command: use new API 2014-07-03 11:46:40 -07:00
Mitchell Hashimoto
adcd6486a2 terraform: Context doesn't need a sync.Cond 2014-07-03 11:33:45 -07:00
Mitchell Hashimoto
99757dc930 terraform: update state when refreshed 2014-07-03 11:30:16 -07:00
Mitchell Hashimoto
2b3855d5e2 terraform: make all actions cancellable in context 2014-07-03 11:28:47 -07:00
Mitchell Hashimoto
4ee6771d3a terraform: remove terraform.go 2014-07-03 11:28:04 -07:00
Mitchell Hashimoto
4f5f3a5502 terraform: Context.Stop 2014-07-03 11:27:30 -07:00
Mitchell Hashimoto
603ee36d92 terraform: Context.Apply 2014-07-03 11:04:04 -07:00
Mitchell Hashimoto
403876fff3 terraform: Context.Plan 2014-07-03 10:44:30 -07:00
Mitchell Hashimoto
2e10ddb878 terraform: Context.Refresh 2014-07-03 10:29:14 -07:00
Mitchell Hashimoto
947fa4e669 terraform: Context introduction 2014-07-03 10:14:17 -07:00