Commit Graph

932 Commits

Author SHA1 Message Date
Paul Hinze
d2034a26b2 release: clean up after v0.6.5 2015-10-21 11:34:52 -05:00
Paul Hinze
5ea09afad5 v0.6.5 2015-10-21 10:47:56 -05:00
Paul Hinze
05c0998d2d core: store deeply nested modules in a consistent order in the state
We were only comparing the last element of the module, which meant that
deeply nested modules with the same name but different ancestry had an
undefined sort order, which could cause inconsistencies in state
storage and potentially break remote state MD5 checksumming.
2015-10-20 14:35:57 -05:00
Paul Hinze
fca44bdec3 core: state metadata difference should bump serial
Remote state includes MD5-based checksumming to protect against State
conflicts. This can generate improper conflicts with states that differ
only in their Schema version.

We began to see this issue with
https://github.com/hashicorp/terraform/pull/3470 which changes the
"schema_version" of aws_key_pairs.
2015-10-20 12:28:12 -05:00
Mitchell Hashimoto
263cc1b855 terraform: final failing test 2015-10-15 13:52:27 -07:00
clint shryock
1bfd4b0f71 Reset CHANGELOG/version for 0.6.5 release 2015-10-15 17:50:20 +00:00
clint shryock
49396ba3e0 v0.6.4 2015-10-15 15:51:15 +00:00
Paul Hinze
562a793430 style: ran go fmt 2015-10-15 10:21:20 -05:00
Rob Zienert
a1939e70f7 Adding ignore_changes lifecycle meta property 2015-10-14 16:34:27 -05: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
Martin Atkins
3c939f9b26 Merge #3239: "compact" interpolation function 2015-10-10 15:18:10 -07:00
Anthony Stanton
3040d8419f Test removing weird zero+zero Route53 test case 2015-10-08 18:07:07 +02:00
Panagiotis Moustafellos
e4845f75cc removed extra parentheses 2015-10-08 15:48:04 +03:00
Radek Simko
3a05f01553 Treat missing variables during destroy as unknown 2015-10-03 14:16:40 -07:00
Radek Simko
40b04154fe Add operation walkDestroy 2015-10-03 14:16:40 -07:00
Radek Simko
2b60d0c6b6 Add repro test case for bug #2892 2015-10-03 14:16:39 -07:00
Paul Hinze
c39fdd2917 Merge pull request #2988 from hashicorp/b-input-var-partially-computed
core: don't error on computed value during input walk
2015-09-24 15:07:49 -05:00
Anthony Scalisi
198e1a5186 remove various typos 2015-09-11 11:56:20 -07:00
Radek Simko
91d750d2df interpolate: Expand computed TypeList attributes properly 2015-08-27 13:02:02 +01:00
Paul Hinze
c618132085 tests: fix missed test update from last merge 2015-08-13 10:11:12 -05:00
Paul Hinze
22ea3d693f update prevent_destroy error message
per recommendations by @nathanielks

closes #2473
2015-08-13 09:57:52 -05:00
Paul Hinze
b928777cac core: don't error on computed value during input walk
fixes #2987
2015-08-12 14:23:33 -05:00
Clint Shryock
58d8ae8b51 release: cleanup after v0.6.3 2015-08-11 11:42:54 -05:00
Clint Shryock
234f49a2c9 v0.6.3 2015-08-11 15:45:58 +00:00
Paul Hinze
52c4bfbe98 core: fix deadlock when dependable node replaced with non-dependable one
In #2884, Terraform would hang on graphs with an orphaned resource
depended on an orphaned module.

This is because orphan module nodes (which are dependable) were getting
expanded (replaced) with GraphNodeBasicSubgraph nodes (which are _not_
dependable).

The old `graph.Replace()` code resulted in GraphNodeBasicSubgraph being
entered into the lookaside table, even though it is not dependable.

This resulted in an untraversable edge in the graph, so the graph would
hang and wait forever.

Now, we remove entries from the lookaside table when a dependable node
is being replaced with a non-dependable node. This means we lose an
edge, but we can move forward. It's ~probably~ never correct to be
replacing depenable nodes with non-dependable ones, but this tweak
seemed preferable to tossing a panic in there.
2015-08-10 15:50:36 -05:00
Paul Hinze
7a464b1156 tests: extract deadlock checking test helper 2015-08-10 15:50:36 -05:00
Clint Shryock
fd2b943c9d release: clean up after v0.6.2 2015-08-06 14:35:18 -05:00
Clint Shryock
f26d2b75c8 v0.6.2 2015-08-06 18:59:05 +00:00
Paul Hinze
5ebbda3334 core: fix crash on provider warning
When a provider validation only returns a warning, we were cutting the
evaltree short by returning an error. This is fine during a
`walkValidate` but was causing trouble during `walkPlan` and
`walkApply`.

fixes #2870
2015-07-28 17:13:14 -05:00
Radek Simko
a22dc2a9a2 Add resource ID to refresh errors 2015-07-22 14:09:39 +02:00
Radek Simko
8e477b78d8 Add resource ID to errors coming from apply 2015-07-22 14:09:34 +02:00
Clint Shryock
7110364298 release: clean up after v0.6.1 2015-07-20 16:03:53 -05:00
Clint Shryock
4c67368dd8 v0.6.1 2015-07-20 20:03:29 +00:00
Mitchell Hashimoto
8d29f274c8 terraform: remove print 2015-07-20 08:57:35 -07:00
Mitchell Hashimoto
696d5ef94f terraform: clarify comment 2015-07-20 08:57:35 -07:00
Mitchell Hashimoto
4d361c839e terraform: prune resources and variables 2015-07-20 08:57:34 -07:00
Mitchell Hashimoto
6550f564bf terraform: PruneNoopTransformer 2015-07-20 08:57:34 -07:00
Mitchell Hashimoto
853f4f2385 Merge pull request #2786 from hashicorp/b-nested-module-orphans
Grandchild module orphans should be destroyed
2015-07-20 08:52:33 -07:00
Mitchell Hashimoto
955bbbba41 terraform: state module orphans should only return direct 2015-07-20 08:41:24 -07:00
Paul Hinze
392f56101c core: add failing deeply nested orphan module test
I was worried about the implications of deeply nested orphaned modules
in the parent commit, so I added a test. It's failing but not quite like
I expected it to. Perhaps I've uncovered an unrelated bug here?

/cc @mitchellh
2015-07-20 10:19:52 -05:00
Mitchell Hashimoto
7735847579 terraform: splatting with computed values is computed [GH-2744] 2015-07-19 17:27:38 -07:00
Mitchell Hashimoto
edd05f2aa2 terraform: fix some test failures 2015-07-19 14:14:05 -07:00
Mitchell Hashimoto
61d275f475 terraform: get nested oprhans in the transform 2015-07-19 13:53:31 -07:00
Mitchell Hashimoto
96a04c16f6 terraform: state ModuleOrphans should return grandchild orphans 2015-07-19 13:41:57 -07:00
Mitchell Hashimoto
2ee46eda94 test case 2015-07-17 10:58:47 -07:00
Paul Hinze
f97c635ef6 core: fix "provider ... couldn't be found" bug
The `CloseProviderTransformer` relies on the `ProvidedBy()` interface to
look up the proper dependency for the the graph nodes it adds. This
interface needs to yield the name of a provider, _AND_ for flattened
nodes it needs to yield the full path to a provider.

Destroy nodes did not implement this second part, which resulted in
"provider X couldn't be found" when both of these were true:

 * A module included a resource that dependend on a provider
 * The root did _NOT_ include a provider config

Implementing a proper ProvidedBy() on the flattened version of
destroy nodes solves the issue.

fixes #2581
2015-07-16 11:56:58 -05:00
Paul Hinze
ff45f6451d core: split context tests
The context_test file has gotten pretty unruly. Let's split it up into
a few files so we can be nicer to our editors and our own sanity.

Definitely lots more we can do to clean up, but with changes like this
I'd rather do small, focused, clear steps instead of one big "cleaned up
lots of stuff" PR.
2015-07-10 14:08:49 -06:00
Sander van Harmelen
4a8ef78d33 Fixes #2676 by prefixing all Windows commands
By prefixing them with `cmd /c` it will work with both `winner` and
`ssh` connection types.

This PR also reverts some bad stringer changes made in PR #2673
2015-07-10 12:56:27 +02:00
Sander van Harmelen
97fd4f5b7d Tweaking the tests 2015-07-09 21:29:27 +02: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