Commit Graph

353 Commits

Author SHA1 Message Date
Mitchell Hashimoto
61c789aace
terraform: shadow graph runs in sequence after the real graph 2016-10-11 22:17:30 +08:00
Mitchell Hashimoto
3edb8599b1
terraform: Shadow interface, properly string through errors at the right
time
2016-10-11 22:17:29 +08:00
Mitchell Hashimoto
184b4a8b09
terraform: context verifies real and shadow state/diff match 2016-10-11 22:17:29 +08:00
Mitchell Hashimoto
3e7665db09
terraform: shadow component factory supports closing 2016-10-11 22:17:29 +08:00
Mitchell Hashimoto
0b00bbde4e
terraform: switch to a component factory
This is necessary so that the shadow version can actually keep track of
what provider is used for what. Before, providers for different alises
were just initialized but the factory had no idea. Arguably this is fine
but when trying to build a shadow graph this presents challenges.

With these changes, we now pass an opaque "uid" through that is used to
keep track of the providers and what real maps to what shadow.
2016-10-11 22:17:29 +08:00
Mitchell Hashimoto
742af8752b
terraform: run the shadow graph for Apply operations (everything fails) 2016-10-11 22:17:28 +08:00
Mitchell Hashimoto
02e93f5920
terraform: shadowResourceProviderFactory
This helper helps create the factory maps for the context.
2016-10-11 22:17:28 +08:00
Mitchell Hashimoto
f7134d95e4
terraform: Diff.DeepCopy 2016-10-11 22:17:28 +08:00
Mitchell Hashimoto
9ae9f208d1
terraform: Context knows how to walk a shadow graph and report errors 2016-10-11 22:17:28 +08:00
Mitchell Hashimoto
af7085f671
terraform: refactor var loading out to a helper
Small style changes too
2016-08-17 11:10:26 -07:00
James Bardin
c48a1423a1 Collapse nested if with an && 2016-08-10 16:34:21 -04:00
James Bardin
2e5791ab2b Allow the HCL input when prompted
We already accept HCL encoded input for -vars, and this expands that to
accept HCL when prompted for a value on the command line as well.
2016-08-10 11:14:31 -04:00
Clint
a9aaf44a87 fix make issues (supersedes #7868) (#7876)
* Fixing the make error or invalid data type for errorf and printf

* fix make errors
2016-07-29 21:05:57 +01:00
James Bardin
9dec28bccf Merge pull request #7803 from hashicorp/jbardin/tf_vars-push
Add tf_vars to the variables sent in push
2016-07-28 16:31:04 -04:00
James Bardin
341abd7956 limit input retries
Prevent going into a busy loop if the input fd closes early.
2016-07-28 08:49:09 -04:00
James Nugent
7af10adcbe core: Do not assume HCL parser has touched vars
This PR fixes #7824, which crashed when applying a plan file. The bug is
that while a map which has come from the HCL parser reifies as a
[]map[string]interface{}, the variable saved in the plan file was not.
We now cover both cases.

Fixes #7824.
2016-07-27 17:14:47 -05:00
James Nugent
681d94ae20 core: Allow lists and maps as variable overrides
Terraform 0.7 introduces lists and maps as first-class values for
variables, in addition to string values which were previously available.
However, there was previously no way to override the default value of a
list or map, and the functionality for overriding specific map keys was
broken.

Using the environment variable method for setting variable values, there
was previously no way to give a variable a value of a list or map. These
now support HCL for individual values - specifying:

    TF_VAR_test='["Hello", "World"]'

will set the variable `test` to a two-element list containing "Hello"
and "World". Specifying

    TF_VAR_test_map='{"Hello = "World", "Foo" = "bar"}'

will set the variable `test_map` to a two-element map with keys "Hello"
and "Foo", and values "World" and "bar" respectively.

The same logic is applied to `-var` flags, and the file parsed by
`-var-files` ("autoVariables").

Note that care must be taken to not run into shell expansion for `-var-`
flags and environment variables.

We also merge map keys where appropriate. The override syntax has
changed (to be noted in CHANGELOG as a breaking change), so several
tests needed their syntax updating from the old `amis.us-east-1 =
"newValue"` style to `amis = "{ "us-east-1" = "newValue"}"` style as
defined in TF-002.

In order to continue supporting the `-var "foo=bar"` type of variable
flag (which is not valid HCL), a special case error is checked after HCL
parsing fails, and the old code path runs instead.
2016-07-26 15:27:29 -05:00
James Nugent
5d18f41f04 core: Convert context vars to map[string]interface{}
This is the first step in allowing overrides of map and list variables.
We convert Context.variables to map[string]interface{} from
map[string]string and fix up all the call sites.
2016-07-18 13:02:54 -05:00
Paul Hinze
4a1b36ac0d
core: rerun resource validation before plan and apply
In #7170 we found two scenarios where the type checking done during the
`context.Validate()` graph walk was circumvented, and the subsequent
assumption of type safety in the provider's `Diff()` implementation
caused panics.

Both scenarios have to do with interpolations that reference Computed
values. The sentinel we use to indicate that a value is Computed does
not carry any type information with it yet.

That means that an incorrect reference to a list or a map in a string
attribute can "sneak through" validation only to crop up...

 1. ...during Plan for Data Source References
 2. ...during Apply for Resource references

In order to address this, we:

 * add high-level tests for each of these two scenarios in `provider/test`
 * add context-level tests for the same two scenarios in `terraform`
   (these tests proved _really_ tricky to write!)
 * place an `EvalValidateResource` just before `EvalDiff` and `EvalApply` to
   catch these errors
 * add some plumbing to `Plan()` and `Apply()` to return validation
   errors, which were previously only generated during `Validate()`
 * wrap unit-tests around `EvalValidateResource`
 * add an `IgnoreWarnings` option to `EvalValidateResource` to prevent
   active warnings from halting execution on the second-pass validation

Eventually, we might be able to attach type information to Computed
values, which would allow for these errors to be caught earlier. For
now, this solution keeps us safe from panics and raises the proper
errors to the user.

Fixes #7170
2016-07-01 13:12:57 -05:00
Mitchell Hashimoto
2a86b85646
terraform: start Import function, totally untested 2016-05-11 13:02:30 -07:00
James Nugent
f49583d25a core: support native list variables in config
This commit adds support for native list variables and outputs, building
up on the previous change to state. Interpolation functions now return
native lists in preference to StringList.

List variables are defined like this:

variable "test" {
    # This can also be inferred
    type = "list"
    default = ["Hello", "World"]
}

output "test_out" {
    value = "${var.a_list}"
}
This results in the following state:

```
...
            "outputs": {
                "test_out": [
                    "hello",
                    "world"
                ]
            },
...
```

And the result of terraform output is as follows:

```
$ terraform output
test_out = [
  hello
  world
]
```

Using the output name, an xargs-friendly representation is output:

```
$ terraform output test_out
hello
world
```

The output command also supports indexing into the list (with
appropriate range checking and no wrapping):

```
$ terraform output test_out 1
world
```

Along with maps, list outputs from one module may be passed as variables
into another, removing the need for the `join(",", var.list_as_string)`
and `split(",", var.list_as_string)` which was previously necessary in
Terraform configuration.

This commit also updates the tests and implementations of built-in
interpolation functions to take and return native lists where
appropriate.

A backwards compatibility note: previously the concat interpolation
function was capable of concatenating either strings or lists. The
strings use case was deprectated a long time ago but still remained.
Because we cannot return `ast.TypeAny` from an interpolation function,
this use case is no longer supported for strings - `concat` is only
capable of concatenating lists. This should not be a huge issue - the
type checker picks up incorrect parameters, and the native HIL string
concatenation - or the `join` function - can be used to replicate the
missing behaviour.
2016-05-10 14:49:14 -04:00
Mitchell Hashimoto
35c87836b4 core: Add terraform_version to state
This adds a field terraform_version to the state that represents the
Terraform version that wrote that state. If Terraform encounters a state
written by a future version, it will error. You must use at least the
version that wrote that state.

Internally we have fields to override this behavior (StateFutureAllowed),
but I chose not to expose them as CLI flags, since the user can just
modify the state directly. This is tricky, but should be tricky to
represent the horrible disaster that can happen by enabling it.

We didn't have to bump the state format version since the absense of the
field means it was written by version "0.0.0" which will always be
older. In effect though this change will always apply to version 2 of
the state since it appears in 0.7 which bumped the version for other
purposes.
2016-05-10 14:40:11 -04:00
Paul Hinze
f882dd1427 core: Encode Targets in saved Planfile
When a user specifies `-target`s on a `terraform plan` and stores
the resulting diff in a plan file using `-out` - it usually works just
fine since the diff is scoped based on the targets.

When there are tainted resources in the state, however, graph nodes to
destroy them were popping back into the plan when it was being loaded
from a file. This was because Targets weren't being stored in the
Planfile, so Terraform didn't know to filter them out. (In the
non-Planfile scenario, we still had the Targets loaded directly from the
flags.)

By encoding Targets in with the Planfile we can ensure that the same
filters are always applied.

Backwards compatibility should be fine here, since we're just adding a
field. The gob encoder/decoder will just do the right thing (ignore/skip
the field) with planfiles stored w/ versions that don't know about
Targets.

Fixes #5183
2016-03-08 14:29:37 -06:00
Martin Atkins
8173cd25bb Demote some log lines to DEBUG.
Now that we support log line filtering (as of 0090c063) it's good to be
a bit more fussy about what log levels are assigned to different things.

Here we make a few things that are implementation details log as DEBUG,
and prevent spurious errors from EvalValidateCount where it was returning
an empty EvalValidateError rather than nil when everything was okay.
2015-10-11 10:45:33 -07:00
Radek Simko
40b04154fe Add operation walkDestroy 2015-10-03 14:16:40 -07:00
Paul Hinze
5c38456b05 core: don't prompt for variables with defaults
In `helper/schema` we already makes a distinction between `Default`
which is always applied and `InputDefault` which is displayed to the
user for an empty field.

But for variables we just have `Default` which is treated like
`InputDefault`. This changes it to _not_ prompt the user for a value
when the variable declaration includes a default.

Treating this as a UX bugfix and the "don't prompt for variables w/
defaults set" behavior as the originally expected behavior we were
failing to honor.

Added an already-passing test to verify and cover the `helper/schema`
behavior.

Perhaps down the road we can add a `input_default` attribute to
variables to allow similar behavior to `helper/schema` in variables, but
for now just sticking with the fix.

Fixes #2592
2015-07-02 10:40:30 -05:00
Mitchell Hashimoto
785defc870 terraform: fail early if module validation fails 2015-06-24 22:43:55 -07:00
Mitchell Hashimoto
0728e25f43 terraform: env vars are lower priority 2015-05-14 09:58:30 -07:00
Mitchell Hashimoto
fe74d69852 terraform: validation should succeed if env var set [GH-1930] 2015-05-13 20:09:05 -07:00
Paul Hinze
0fff7d1673 core: validate graph w/ diff during plan phase
This reimplements my prior attempt at nipping issues where a plan did
not yield the same cycle an apply did. My prior attempt was to have
ctx.Validate generate a "Verbose" worst-case graph. It turns out that
skipping PruneDestroyTransformer to generate this graph misses important
heuristics that prevent cycles by dropping destroy nodes that are
determined to be unused.

This resulted in Validate improperly failing in scenarios where these
heuristics would have broken the cycle.

We detected the problem during the work on #1781 and worked around the
issue by reverting to the non-Verbose graph in Validate.

This commit accomplishes the original goal in a better way - by
generating the full graph and checking it once Plan has calculated the
diff. This guarantees that any graph issue that would be caught by Apply
will be caught by Plan.
2015-05-05 17:24:44 -05:00
Mitchell Hashimoto
6d4969f64c terraform: run prune destroy on validate 2015-05-05 12:11:49 -07:00
Paul Hinze
d4b9362518 core: validate on verbose graph to detect some cycles earlier
Most CBD-related cycles include destroy nodes, and destroy nodes were
all being pruned from the graph before staring the Validate walk.

In practice this meant that we had scenarios that would error out with
graph cycles on Apply that _seemed_ fine during Plan.

This introduces a Verbose option to the GraphBuilder that tells it to
generate a "worst-case" graph. Validate sets this to true so that cycle
errors will always trigger at this step if they're going to happen.

(This Verbose option will be exposed as a CLI flag to `terraform graph`
in a second incoming PR.)

refs #1651
2015-04-23 11:07:13 -05:00
Mitchell Hashimoto
7a1592ff1e terraform: don't panic on input for bad default type [GH-1344] 2015-04-18 16:31:21 -07:00
Paul Hinze
97acccd3ed core: targeted operations
Add `-target=resource` flag to core operations, allowing users to
target specific resources in their infrastructure. When `-target` is
used, the operation will only apply to that resource and its
dependencies.

The calculated dependencies are different depending on whether we're
running a normal operation or a `terraform destroy`.

Generally, "dependencies" refers to ancestors: resources falling
_before_ the target in the graph, because their changes are required to
accurately act on the target.

For destroys, "dependencies" are descendents: those resources which fall
_after_ the target. These resources depend on our target, which is going
to be destroyed, so they should also be destroyed.
2015-03-31 14:49:38 -05:00
Mitchell Hashimoto
5e27bfc040 command/push: read name from the config 2015-03-24 13:30:23 -07:00
Mitchell Hashimoto
22087181af command/push: archive, upload 2015-03-24 13:30:22 -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
Mitchell Hashimoto
f3af221866 terraform: make DeepCopy public 2015-02-23 21:32:27 -08:00
Mitchell Hashimoto
709c40026c terraform: remove debug println 2015-02-23 13:45:45 -08:00
Mitchell Hashimoto
fa222a44c3 terraform: limit parallelism 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
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
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
c8091aa338 terraform: fix more create-before-destroy state juggling 2015-02-19 12:08:07 -08:00
Mitchell Hashimoto
742b45886a terraform: destroy nodes work properly 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
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
23d097ee53 terraform: module inputs are passed through to subgraphs 2015-02-19 12:08:01 -08:00
Mitchell Hashimoto
aae2d4c780 terraform: starting up the plans 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
379c37dd06 terraform: refresh hooks 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
863b9a4f45 terraform: filter eval nodes on operation 2015-02-19 12:07:59 -08:00
Mitchell Hashimoto
d94c4392eb terraform: validate provisioners 2015-02-19 12:07:58 -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
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
Mitchell Hashimoto
659f0db8cf terraform: Graph => GraphOld 2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
2abeb2d9ac config: use new API 2015-01-14 22:03:15 -08:00
Mitchell Hashimoto
8ae14f06b3 config: variables must be typed 2015-01-14 10:40:43 -08:00
Mitchell Hashimoto
1429ac6a7f terraform: return unknown variable value if nil 2014-12-16 18:43:18 -08: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
Armon Dadgar
f1cb297c59 terraform: Fixing issue with computed maps 2014-12-09 00:51:28 -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
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
d5fd4dabe8 terraform: Mark modules for destroy 2014-11-24 14:15:24 -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
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
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
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
ce61b5caec terraform: no outputs if we have no resources 2014-10-12 22:49:05 -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
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