Commit Graph

877 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
e5f07567c6 terraform: module input to another module doesn't error [GH-659] 2014-12-16 08:23:19 -08:00
Sander van Harmelen
d24ab685d0 Adding a small fix to the Same() func
This is a little tricky, but when a diff contains a computed list or
set that can only be interpolated after the apply command has created
the dependant resources, it could turn out that the result is actually
the same as the existing state which would remove the key from the diff
2014-12-16 13:58:31 +01:00
Sander van Harmelen
40ca4c1c81 Merge pull request #676 from svanharmelen/f-fix-expand-bug
core: fix expand bug
2014-12-16 11:04:25 +01:00
Mitchell Hashimoto
d24082da1e config: validate that module variables can go to ints, convert [GH-624] 2014-12-15 22:10:16 -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
Sander van Harmelen
83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Armon Dadgar
d821f7aaa6 terraform: Make RemoteState more flexible 2014-12-10 13:27:09 -08:00
Armon Dadgar
85bb01acd7 terraform: Fixing unit test 2014-12-10 13:27:09 -08:00
Armon Dadgar
b83b4a923f terraform: expose the state version 2014-12-10 13:27:06 -08:00
Armon Dadgar
6ce957d4b1 terraform: State helpers 2014-12-10 13:27:06 -08:00
Armon Dadgar
1ec0602cab terraform: Add new remote storage fields to state 2014-12-10 13:27:06 -08:00
Armon Dadgar
f1cb297c59 terraform: Fixing issue with computed maps 2014-12-09 00:51:28 -08:00
Armon Dadgar
c43eb6f883 terraform: fixing test case 2014-12-09 00:28:03 -08:00
Armon Dadgar
0a3d7bd121 terraform: Check module config for resource instead of state 2014-12-09 00:25:06 -08:00
Mitchell Hashimoto
e82a28529d terraform: return errors for interpolations 2014-12-08 23:57:01 -08:00
Luke Amdor
ca48dcab4a no module state, we shouldn't fail multivars yet 2014-12-06 15:30:19 -06: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
Luke Amdor
4b3bf76406 looking up count of multivars in module config 2014-11-28 07:14:58 -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
Armon Dadgar
56a34087ba terraform: test orphan dependency inversion 2014-11-24 15:42:58 -08:00
Armon Dadgar
5376e05add terraform: test encoding module dependencies 2014-11-24 15:25:37 -08:00
Armon Dadgar
6af820f78b terraform: test graph with orphan module dependencies 2014-11-24 15:22:37 -08:00
Armon Dadgar
3bdaccdf5d terraform: testing the destroy order of modules 2014-11-24 14:58:52 -08:00
Armon Dadgar
afef564108 terraform: Handle module depedency inversion 2014-11-24 14:38:06 -08:00
Armon Dadgar
d5fd4dabe8 terraform: Mark modules for destroy 2014-11-24 14:15:24 -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
9707eb3fc8 terraform: Add dependencies field to modules 2014-11-21 15:34:23 -08:00
Armon Dadgar
8446b036d7 Merge pull request #535 from ceh/vet-fixes
argument and verb formatting fixes reported by go vet
2014-11-19 15:46:01 -08:00
Armon Dadgar
e29e364c89 terraform: Testing duplicate delete issue 2014-11-18 15:38:54 -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
Emil Hessman
4bfe18b40d argument and verb formatting fixes reported by go vet
builtin/providers/aws/tags_test.go:56: unrecognized printf verb 'i'
builtin/providers/aws/tags_test.go:59: unrecognized printf verb 'i'

config/config_test.go:101: possible formatting directive in Fatal call
config/config_test.go:157: possible formatting directive in Fatal call

config/module/get_file_test.go:91: missing argument for Fatalf(%s): format reads arg 1, have only 0 args

helper/schema/schema.go:341: arg v.Type for printf verb %s of wrong type: schema.ValueType
helper/schema/schema.go:656: missing argument for Errorf(%s): format reads arg 2, have only 1 args
helper/schema/schema.go:912: arg schema.Type for printf verb %s of wrong type: schema.ValueType

terraform/context.go:178: arg v.Type() for printf verb %s of wrong type: github.com/hashicorp/terraform/config.VariableType
terraform/context.go:486: arg c.Operation for printf verb %s of wrong type: terraform.walkOperation

terraform/diff_test.go💯 arg actual for printf verb %s of wrong type: terraform.DiffChangeType
terraform/diff_test.go:235: arg actual for printf verb %s of wrong type: terraform.DiffChangeType
2014-11-02 13:56:44 +01: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
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
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
Armon Dadgar
422b82648c terraform: Switch to using semaphore 2014-10-16 10:04:36 -07:00
Armon Dadgar
ad31023252 terraform: Adding a semaphore implementation 2014-10-16 10:04:36 -07:00
Mitchell Hashimoto
5596ee7f53 terraform: don't panic if no state in Walk return [GH-403] 2014-10-15 20:32:19 -07:00
Mitchell Hashimoto
edf85de411 terraform: output state in human-readable format
/cc @armon - Didn't need to save the bits here, plus it makes it easier
for someone to go in and modify this stuff
2014-10-12 22:56:34 -07:00
Mitchell Hashimoto
ce61b5caec terraform: no outputs if we have no resources 2014-10-12 22:49:05 -07:00
Mitchell Hashimoto
06889b8fc7 terraform: make sure taint destroys happen first for counts 2014-10-12 09:50:36 -07:00
Mitchell Hashimoto
7af9179edd terraform: remove old test 2014-10-12 09:45:01 -07:00
Mitchell Hashimoto
f59e89ccb8 terraform: add count tainted apply test 2014-10-12 09:41:27 -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
ecafcfa682 terraform: don't validate tainted resources 2014-10-11 16:02:07 -07:00
Mitchell Hashimoto
6e7d23d612 terraform: don't crash if validating orphan 2014-10-11 15:58:52 -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
d7786473df fmt 2014-10-11 12:57:06 -07:00
Mitchell Hashimoto
d2e836275b terraform: sort the modules in the state [GH-318] 2014-10-11 12:47:06 -07:00
Mitchell Hashimoto
36f225dea0 fmt 2014-10-10 14:50:35 -07:00
Mitchell Hashimoto
ab6741f6fc terraform: require the prefix match with a "." in Diff.Instances 2014-10-10 13:46:44 -07:00
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
1ebcedb22b config: make the interp split pretty insane 2014-10-09 22:45:22 -07:00
Mitchell Hashimoto
75e79da9c3 terraform: modify Same to return true if list is computed 2014-10-09 20:52:38 -07:00
Mitchell Hashimoto
dcaf653d6f helper/schema: properly detect that a list is computed 2014-10-09 19:09:06 -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
c52a21d680 terraform: comments 2014-10-04 16:31:48 -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
24dd078bee terraform: UIOutputPrefix 2014-10-04 10:33:01 -07:00
Mitchell Hashimoto
8b129babe5 terraform: change provisioners to take UIOutput 2014-10-04 09:20:05 -07:00
Mitchell Hashimoto
509f293bea rpc: UIOutput 2014-10-04 09:11:51 -07:00
Mitchell Hashimoto
6445e1f16a terraform: UIOutput interface 2014-10-04 09:00:07 -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
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
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
ced4125037 teraform: test that count can be a variable 2014-10-02 15:47:00 -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
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
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
101ac636a2 config: add Config method 2014-10-02 11:34:08 -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
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
Armon Dadgar
4fe05428b3 terraform: Avoid having multiple primaries 2014-09-29 15:20:03 -07:00
Armon Dadgar
f398708be2 terraform: Adding flag for CreateBeforeDestroy 2014-09-29 15:20:03 -07:00
Armon Dadgar
1aaddafba0 terraform: Adding lifecycle config block 2014-09-29 15:20:02 -07:00
Armon Dadgar
aef7718778 terraform: support create-before-destroy 2014-09-29 15:20:02 -07:00
Mitchell Hashimoto
d927c6e1f6 terraform: support var descriptions 2014-09-29 14:05:10 -07:00
Mitchell Hashimoto
a7c321a028 helper/scheam: support UI defaults 2014-09-29 14:00:35 -07:00
Mitchell Hashimoto
b32470f070 command: accept defaults for UI 2014-09-29 13:51:16 -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
5611b9b8a8 terraform: add Input API to ResourceProvider 2014-09-28 23:50:37 -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
2ac6c127bc terraform: orphans should properly depend on modules 2014-09-26 10:03:10 -07:00
Mitchell Hashimoto
4782e31e9d terraform: properly encode module dependencies in state 2014-09-26 09:38:53 -07:00
Mitchell Hashimoto
1fa3840a00 terraform: handle module dependencies with a diff 2014-09-26 09:20:01 -07:00
Mitchell Hashimoto
77b1c7daa0 terraform: destroy plans work with modules 2014-09-25 20:44:34 -07:00
Mitchell Hashimoto
e5e51d7b17 command: state output is well formatted for modules 2014-09-25 19:25:10 -07:00
Mitchell Hashimoto
30dcacf29f terraform: use the proper edge creation 2014-09-25 19:06:29 -07:00
Mitchell Hashimoto
1835a03842 terraform: hook parameter is an InstanceInfo 2014-09-25 10:40:44 -07:00
Mitchell Hashimoto
9bdc97386f terraform: expand/contract looks a lot better for modules 2014-09-24 23:46:22 -07:00
Mitchell Hashimoto
8c17062638 command: plan shows module-level, can control depth 2014-09-24 22:54:51 -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
a12f785211 terraform: add some helpers to ModuleDiff and InstanceDiff for UX 2014-09-24 17:51:45 -07:00
Mitchell Hashimoto
72e6f97093 terraform: support graphing modules 2014-09-24 17:36:27 -07:00
Mitchell Hashimoto
6904c131a7 terraform: test that unused providers are pruned 2014-09-24 16:02:42 -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
672bf58337 command: compiles, tests don't pass yet 2014-09-24 14:37:24 -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
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
29603f36d2 terraform: remove Read/WriteDiff, we don't use it 2014-09-23 11:15:05 -07:00
Mitchell Hashimoto
5565c27fdd terraform: error if subgraph fails to build 2014-09-22 16:51:35 -07:00
Mitchell Hashimoto
a6f792b3aa terraform: update graph to build subgraphs for modules 2014-09-22 16:48:18 -07:00
Mitchell Hashimoto
46c1209c92 terraform: State.String outputs multiple modules 2014-09-22 15:53:18 -07:00
Mitchell Hashimoto
a32833af2c terraform: Graph, Context, Plan all speak modules 2014-09-22 15:37:29 -07:00
Mitchell Hashimoto
1d106d3fa4 terraform: modules are put into the graph 2014-09-22 15:11:57 -07:00
Armon Dadgar
cdce8208f3 terraform: ensure provisioner runs only on instance create 2014-09-22 11:15:22 -07:00
Mitchell Hashimoto
ca875f5457 terraform: fix missing arg to Printf 2014-09-21 22:36:34 -07:00
Mitchell Hashimoto
7a97396583 terraform: remove unused function 2014-09-21 22:35:11 -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
Mitchell Hashimoto
f89c2c5ff0 terraform: graph tainted resources into the graph 2014-09-19 21:29:48 -06:00
Armon Dadgar
5e0765c24a terraform: Refresh handles tainted instances 2014-09-19 16:24:17 -07:00
Armon Dadgar
1d96373a54 terraform: deepcopy should not alloc when nil 2014-09-19 16:15:52 -07: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
9594ed6e1c terraform: minor cleanup 2014-09-19 14:54:21 -07:00
Armon Dadgar
a1c4a27715 terraform: Drop useless field 2014-09-19 14:45:12 -07:00
Armon Dadgar
5ef46b797b terraform: fixing dependency handling for orphans 2014-09-18 15:39:53 -07:00
Armon Dadgar
b2188d7fe8 terraform: properly handle diff generation with meta resources 2014-09-18 14:31:27 -07:00
Armon Dadgar
68614aeb79 terraform: Guard against future version changes 2014-09-18 13:43:26 -07:00
Armon Dadgar
ec4be66f63 terraform: ensure file version is set and serial incremented 2014-09-18 13:38:36 -07:00
Armon Dadgar
3b7c987889 terraform: EncodeDepedencies should override dep list 2014-09-18 13:33:05 -07:00
Armon Dadgar
a9c4b523db terraform: Encode dependencies of ResourceMeta ndoes 2014-09-18 11:22:40 -07:00
Armon Dadgar
d61f199d6f terraform: test dependency encoding 2014-09-18 11:12:39 -07:00
Armon Dadgar
364d210e59 terraform: fixing destroy dependency flipping twice 2014-09-18 11:02:14 -07:00
Armon Dadgar
5adc55415b terraform: testing new state file format 2014-09-18 10:51:47 -07:00
Mitchell Hashimoto
15564b04a5 command: tests pass 2014-09-18 10:40:35 -07:00
Armon Dadgar
1dcdd7a336 terraform: moving state v1 tests 2014-09-18 10:21:25 -07:00
Armon Dadgar
4db7282072 terraform: first pass at state file upgrades 2014-09-17 18:24:53 -07:00
Armon Dadgar
18a91a87c9 terraform: first stab at read/write of state 2014-09-17 18:13:38 -07:00
Armon Dadgar
ed26e3d169 terraform: fixing test case string 2014-09-17 18:03:19 -07:00
Armon Dadgar
9c5f2c3061 terraform: EncodeDependencies does not encode self dependence 2014-09-17 17:57:46 -07:00
Mitchell Hashimoto
7a2591190b terraform: fix graph test 2014-09-17 17:52:24 -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
Armon Dadgar
dc01633f3c terraform: fixing outputs for destroy plan 2014-09-17 17:35:43 -07:00
Armon Dadgar
af3c55096c terraform: handle logical dependencies during a delete 2014-09-17 17:30:25 -07:00
Armon Dadgar
cb8e581731 terraform: test creates an actual logical dependence 2014-09-17 17:30:25 -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
Armon Dadgar
31653fcbcb terraform: Adding utility methods 2014-09-17 17:01:55 -07:00
Armon Dadgar
bf072c5862 terraform: reorder list scan to reduce cost 2014-09-17 17:01:54 -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
71782c57b3 terraform: emit ID of tainted resource in string 2014-09-16 17:37:39 -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
4b0f970659 terraform: fixing test errors 2014-09-16 15:09:40 -07:00
Armon Dadgar
196991430b terraform: Resolving more errors 2014-09-16 14:26:27 -07:00
Armon Dadgar
3404277f31 terraform: porting to new state 2014-09-16 12:34:21 -07:00
Armon Dadgar
04a2b5288b terraform: fixing errors 2014-09-16 12:34:08 -07:00
Armon Dadgar
f4678c8fcd terraform: Fixing type references 2014-09-16 12:33:45 -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
Armon Dadgar
ab7ae0516c terraform: handle state pruning 2014-09-15 17:06:32 -07:00
Armon Dadgar
bb26c79421 terraform: Adding deepcopy() to new state 2014-09-15 16:08:13 -07:00
Armon Dadgar
6373b2b90b Renaming to suffix V1 to old state structs 2014-09-15 16:08:01 -07:00
Armon Dadgar
5dc37bafe6 Adding the new state structures 2014-09-15 15:31:17 -07:00
Mitchell Hashimoto
281b59533d fmt 2014-09-09 21:44:40 -07:00
Mitchell Hashimoto
9573d1bfec terraform: test to make sure nil in RawConfig is okay 2014-09-09 17:41:05 -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
28a2e7b979 terraform: depends_on with count creates proper graph [GH-244] 2014-08-30 16:08:50 -07:00
Mitchell Hashimoto
da2e221628 terraform: Interpolate if there are any interpolations [GH-159] 2014-08-21 15:05:56 -07:00
Mitchell Hashimoto
9ecfdc350e terraform: ResourceConfig.Get doesn't panic if exceed list bounds
[GH-210]
2014-08-21 11:37:14 -07:00
Mitchell Hashimoto
6d6cd793e0 terraform: GoString for *ResourceState 2014-08-20 10:38:51 -07:00
Mitchell Hashimoto
839f9d84c8 Merge pull request #201 from hashicorp/f-resource
High-Level Framework for Writing Providers and Resources
2014-08-19 09:40:59 -07:00
Mitchell Hashimoto
808463a2d5 Merge pull request #200 from hashicorp/f-hcl
Replace C dep with HCL
2014-08-19 09:27:48 -07:00
Mitchell Hashimoto
776b5ace2e terraform: better comments 2014-08-19 09:05:50 -07:00
Mitchell Hashimoto
d8a999e5af terraform: ResourceConfig.Get gets interpolated if possible 2014-08-19 09:05:19 -07:00
Mitchell Hashimoto
22e286ffd5 helper/schema: diff-ing lists at a basic level 2014-08-14 23:17:53 -07:00
Mitchell Hashimoto
2e777d87a2 terraform: fix potential case where cycle is made 2014-08-12 17:08:12 -07:00
Mitchell Hashimoto
258a7311ce terraform: register a type 2014-08-11 09:58:53 -07:00
Mitchell Hashimoto
038cca291e config: HCL loader 2014-08-11 09:58:53 -07:00
Alex Gaynor
46154ca1d3 Fixed a ton of typos in docs and comments 2014-08-07 00:19:56 -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
d28e5a1638 dos2unix 2014-07-28 10:43:00 -07:00
Mitchell Hashimoto
78c32ac196 terraform: hooks around provisioners 2014-07-27 09:00:34 -07:00
Mitchell Hashimoto
7564a0a21c terraform: set state properly when tainted 2014-07-26 21:03:07 -07:00
Mitchell Hashimoto
37c4edd5e7 terraform: test cases around self-referencing variables
This includes cases of multi-counts.

/cc @armon - Looks like this was a non-issue. Terraform already errors
on this.
2014-07-26 15:02:23 -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
Armon Dadgar
0da10b813b terraform: fix dot output for meta resources 2014-07-24 18:57:47 -04: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
3acb7dc154 terraform: register another gob type we use 2014-07-24 07:30:23 -07:00