Mitchell Hashimoto
54de9057ba
terraform: failing test case
2016-01-19 12:37:55 -08:00
James Nugent
2a0334125c
Add test attempting to reproduce #2598
...
This attempts to reproduce the issue described in #2598 whereby outputs
added after an apply are not reflected in the output. As per the issue
the outputs are described using the JSON syntax.
2015-11-09 15:27:09 -05:00
Mitchell Hashimoto
263cc1b855
terraform: final failing test
2015-10-15 13:52:27 -07:00
Rob Zienert
a1939e70f7
Adding ignore_changes lifecycle meta property
2015-10-14 16:34:27 -05:00
Mitchell Hashimoto
61d275f475
terraform: get nested oprhans in the transform
2015-07-19 13:53:31 -07:00
Mitchell Hashimoto
51a7e05f8a
terraform: all providers for ProvidedBy() should be added
2015-06-26 12:00:02 -07:00
Mitchell Hashimoto
29eadb8194
terraform: missing provider should add missing aliases [GH-2023]
2015-06-24 20:58:52 -07:00
Sander van Harmelen
c62370f9e9
Add a function to load JSON directly
...
Without this 12 line function it’s impossible to use any of the
Terraform code without the need for having the files on disk. As more
and more people are using (parts of) Terraform in other software, this
seems to be a very welcome addition. It has no negative impact on
Terraform itself whatsoever (the function is never called), but it
opens up a lot of other use cases.
Next to the single new function, I renamed the existing function (and
related tests) to better reflect what the function does. So now there
is a `LoadDir` function which calls `LoadFile` for each file, which
kind of made sense to me, especially when now adding a `LoadJSON`
function as well.
But of course if the rename is a problem, I can revert that part as
it’s not related to the added `LoadJSON` function.
Thanks!
2015-06-23 16:15:26 +02:00
Mitchell Hashimoto
19b33326be
terraform: don't include variables in destroy node requirements
2015-05-06 20:13:19 -07:00
Mitchell Hashimoto
6afc14982a
terraform: destroy transform must happen globally
2015-05-02 18:21:00 -07:00
Mitchell Hashimoto
873f5a91bb
terraform: EvalDeleteOutput and context test
2015-04-29 11:27:12 -07:00
Mitchell Hashimoto
5ae9ee4d27
terraform: allow TF_VAR_name to be set to set variables
2015-04-22 06:31:53 +02:00
Matt Good
21b0a03d70
Support for multiple providers of the same type
...
Adds an "alias" field to the provider which allows creating multiple instances
of a provider under different names. This provides support for configurations
such as multiple AWS providers for different regions. In each resource, the
provider can be set with the "provider" field.
(thanks to Cisco Cloud for their support)
2015-04-20 14:14:34 -07:00
Mitchell Hashimoto
b64fd8401c
terraform: prune tainted destroys if no tainted in state [GH-1475]
2015-04-14 10:48:45 -07:00
Mitchell Hashimoto
2dce764d75
terraform: add input mode to only ask for unset variables
...
This adds a new input mode for Context.Input() that will only ask for
variable values that are not set.
2015-03-24 13:30:21 -07:00
Paul Hinze
6c93fbb85d
core: [refactor] store Deposed resource instances as a list
...
Deposed instances need to be stored as a list for certain pathological
cases where destroys fail for some reason (e.g. upstream API failure,
Terraform interrupted mid-run). Terraform needs to be able to remember
all Deposed nodes so that it can clean them up properly in subsequent
runs.
Deposed instances will now never touch the Tainted list - they're fully
managed from within their own list.
Added a "multiDepose" test case that walks through a scenario to
exercise this.
2015-03-04 12:25:59 -06:00
Mitchell Hashimoto
11d073f7d4
terraform: test the increase from one case
2015-03-01 21:39:48 -08:00
Mitchell Hashimoto
2389251c38
terraform: catch scenario where both "foo" and "foo.0" are in state
2015-03-01 21:28:41 -08:00
Mitchell Hashimoto
341be226f4
terraform: test for various taint cases
2015-02-26 09:50:18 -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
4b6f258f1f
terraform: only depose state if we're doing the destroy side
2015-02-19 12:08:34 -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
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
a3e4b3e966
terraform: more apply tests
2015-02-19 12:08:05 -08:00
Mitchell Hashimoto
d24082da1e
config: validate that module variables can go to ints, convert [GH-624]
2014-12-15 22:10:16 -08:00
Luke Amdor
6dcb7166d1
fix destroy so incoming module vars get set
2014-12-05 17:18:45 -06:00
Luke Amdor
fead5872e5
Fix for multivars when modulestate not created yet
2014-12-02 13:53:09 -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
f26b8df92f
Merge pull request #598 from hashicorp/f-mod-deps
...
Fix dependency handling of modules
2014-11-24 18:53:22 -08:00
Armon Dadgar
5b025c89f9
terraform: guard output types. Fixes #593
2014-11-24 16:49:38 -08:00
Armon Dadgar
d8ecb32a7c
terraform: test module is marked for destroy
2014-11-24 15:50:15 -08: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
f59e89ccb8
terraform: add count tainted apply test
2014-10-12 09:41:27 -07:00
Mitchell Hashimoto
36f225dea0
fmt
2014-10-10 14:50:35 -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
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
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
ced4125037
teraform: test that count can be a variable
2014-10-02 15:47:00 -07:00
Armon Dadgar
5207e1d268
terraform: test ordering when using create before with depedencies
2014-09-29 17:00:45 -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
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
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
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
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
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
Armon Dadgar
8e421caba1
terraform: show each tainted ID
2014-09-19 15:04:21 -07:00
Armon Dadgar
ff42a92636
terraform: State string includes how many resources are tainted
2014-09-19 14:55:59 -07:00
Armon Dadgar
ed26e3d169
terraform: fixing test case string
2014-09-17 18:03:19 -07:00
Armon Dadgar
17821f2b00
terraform: fixing more test cases
2014-09-17 17:45:38 -07:00
Armon Dadgar
d4e2e66666
terraform: fixing provisioner tests
2014-09-17 17:42:43 -07:00
Armon Dadgar
9a0fe0171e
terraform: fixing ContextApply_compute test
2014-09-17 17:40:59 -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
Mitchell Hashimoto
52bc9a1055
core: check sets for computed [GH-247]
2014-08-30 17:26:10 -07:00
Mitchell Hashimoto
c671e79904
fmt
2014-08-05 10:12:50 -07:00
Mitchell Hashimoto
87f4b49f85
terraform: multi-variables work with count = 1 [GH-115]
2014-08-05 10:12:35 -07:00
Mitchell Hashimoto
7564a0a21c
terraform: set state properly when tainted
2014-07-26 21:03:07 -07:00
Mitchell Hashimoto
a3639b6156
terraform: further tests around count edge cases, fix 1 => N case
...
/cc @pearkes
GH-35
2014-07-26 14:55:42 -07:00
Mitchell Hashimoto
79a9dfce4a
terraform: add test for diff var changing
2014-07-24 20:24:59 -07:00
Mitchell Hashimoto
1ee69761d4
terraform: self-referencing variables in provisoiners work
2014-07-24 07:58:45 -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
83ba038423
terraform: mapping overrides work
2014-07-22 08:18:53 -07:00
Mitchell Hashimoto
5795db9232
terraform: test regular variable default
2014-07-22 08:14:20 -07:00
Mitchell Hashimoto
c9a20c3c58
terraform: test that mapping lookups work
2014-07-22 08:06:09 -07:00
Mitchell Hashimoto
ff36378c4e
terraform: partial state should be saved on apply error
2014-07-17 15:32:19 -07:00
Armon Dadgar
cfc7b69bb1
terraform: Test provisioner apply
2014-07-10 11:38:56 -07:00
Armon Dadgar
e8245f1a67
terraform: Testing graph construction with provisioners
2014-07-10 11:38:56 -07:00
Mitchell Hashimoto
251790f05a
terraform: add ID to diff implicitly
2014-07-08 16:58:31 -07:00
Armon Dadgar
8f4cd641df
terraform: minimal apply test case
2014-07-08 16:12:30 -07:00
Mitchell Hashimoto
d83e687865
terraform: TODO the checksum struct
2014-07-08 14:51:51 -07:00
Mitchell Hashimoto
177f8c094d
helper/diff: add ID to diff
2014-07-07 14:57:41 -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