Commit Graph

21474 Commits

Author SHA1 Message Date
Radek Simko a4388b0ef2
Merge pull request #17261 from hashicorp/b-diff-crash-set
helper/schema: Prevent crash on removal of computed field in CustomizeDiff
2018-02-01 13:33:28 +00:00
Radek Simko 7af1c2b3a4
helper/schema: Prevent crash on removal of computed field in CustomizeDiff 2018-02-01 12:05:22 +00:00
Laura Martin 6e1e614a56 Change -force to -auto-approve when destroying
Since an early version of Terraform, the `destroy` command has always
had the `-force` flag to allow an auto approval of the interactive
prompt. 0.11 introduced `-auto-approve` as default to `false` when using
the `apply` command.

The `-auto-approve` flag was introduced to reduce ambiguity of it's
function, but the `-force` flag was never updated for a destroy.

People often use wrappers when automating commands in Terraform, and the
inconsistency between `apply` and `destroy` means that additional logic
must be added to the wrappers to do similar functions. Both commands are
more or less able to run with similar syntax, and also heavily share
their code.

This commit updates the command in `destroy` to use the `-auto-approve` flag
making working with the Terraform CLI a more consistent experience.

We leave in `-force` in `destroy` for the time-being and flag it as
deprecated to ensure a safe switchover period.
2018-02-01 00:14:42 +00:00
James Bardin 1ba8691f35
Merge pull request #17241 from hashicorp/jbardin/destroy-with-locals
Fix destroy-time handling of outputs and local values
2018-01-31 17:40:19 -05:00
James Bardin 4b617986c8
Merge pull request #17260 from hashicorp/jbardin/plan-shutdown-test
slow down the plan shutdown tests for slow hosts
2018-01-31 17:38:12 -05:00
James Bardin 6f41a80b3a slow down the plan shutdown tests for slow hosts
The plan shutdown test often fail on slow CI hosts, becase the plan
completes befor the main thread can cancel it. Since attempting to make
the MockProvider concurrent proved too invasive for now, just slow the
test down a bit to help ensure Stop gets called.
2018-01-31 17:09:48 -05:00
James Bardin 7217aba5f0 release: clean up after v0.11.3 2018-01-31 21:00:32 +00:00
James Bardin 3802b14260
v0.11.3 2018-01-31 20:48:39 +00:00
Aidan Feldman c9481ab012 website: improve the Module Sources documentation
Better section linking within Module Sources page, and centralize the documentation on Terraform Registry sources.
2018-01-31 11:52:14 -08:00
Blake Stoddard f918fb8583 website: fix ordering of interpolation functions 2018-01-31 11:50:00 -08:00
James Bardin 7fbc35a36c Make sure outputs are removed when targeting
Similar to NodeApplyableOuptut, NodeDestroyableOutputs also need to stay
in the graph if any ancestor nodes

Use the same GraphNodeTargetDownstream method to keep them from being
pruned, since they are dependent on the output node and all its
descendants.
2018-01-31 13:51:40 -05:00
Chris Griggs 3d23a14a7a Website: Provider link (#17246)
* Website: add PANOS links

* fix type

* edit
2018-01-31 10:29:48 -06:00
James Bardin 61fa9a365d
Merge pull request #17252 from jen20/remove-unnecessary-vendor
deps: Remove unnecessary Joyent dependencies
2018-01-31 08:30:53 -05:00
James Nugent 1b97297860 deps: Remove unnecessary Joyent dependencies
github.com/joyent/triton-go replaced a bunch of other dependencies quite
some time ago, but the replaced dependencies were never removed. This
commit removes them from the vendor manifest and the vendor/ directory.
2018-01-30 20:59:10 -06:00
James Bardin ca4178b9ec gofmt bug will be fixed in 1.10 2018-01-30 15:46:24 -05:00
James Bardin a2f8482333 catch missing id attribute during interpolation
The id attribute can be missing during the destroy operation.
While the new destroy-time ordering of outputs and locals should prevent
resources from having their id attributes set to an empty string,
there's no reason to error out if we have the canonical ID field
available.

This still interrogates the attributes map first to retain any previous
behavior, but in the future we should settle on a single ID location.
2018-01-30 15:46:12 -05:00
James Bardin 9a7db39f45
Merge pull request #17245 from cchildress/workspaces_docs
Workspaces are supported locally.
2018-01-30 15:16:16 -05:00
Cameron Childress 5ebb9d818d Workspaces are supported locally. 2018-01-30 10:40:07 -07:00
James Bardin 99867f0082 add PruneUnusedValuesTransformer
Since outputs and local nodes are always evaluated, if the reference a
resource form the configuration that isn't in the state, the
interpolation could fail.

Prune any local or output values that have no references in the graph.
2018-01-30 10:47:17 -05:00
James Bardin 2d138d9917 add a more complex locals test
Using destroy provisioners again for edge cases during destroy.
2018-01-30 10:47:17 -05:00
James Bardin d31fe5ab9d delete outputs during destroy
Now that outputs are always evaluated, we still need a way to remove
them from state when they are destroyed.

Previously, outputs were removed during destroy from the same
"Applyable" node type that evaluates them. Now that we need to possibly
both evaluate and remove output during an apply, we add a new node -
NodeDestroyableOutput.

This new node is added to the graph by the DestroyOutputTransformer,
which make the new destroy node depend on all descendants of the output
node.  This ensures that the output remains in the state as long as
everything which may interpolate the output still exists.
2018-01-29 19:30:04 -05:00
Chris Griggs 61ff3422b7 website: even more community providers 2018-01-29 15:49:21 -08:00
James Bardin 08139557f8 always evaluate outputs too
Always evaluate outputs during destroy, just like we did for locals.
This breaks existing tests, which we will handle separately.

Don't reverse output/local node evaluation order during destroy, as they
are both being evaluated.
2018-01-29 18:10:34 -05:00
James Bardin 7ac0a46981 add destroy provisioner test with locals, outputs
Add a complex destroy provisioner testcase using locals, outputs and
variables.

Add that pesky "id" attribute to the instance states for interpolation.
2018-01-29 18:01:58 -05:00
James Bardin 7da1a39480 always evaluate locals, even during destroy
Destroy-time provisioners require us to re-evaluate during destroy.

Rather than destroying local values, which doesn't do much since they
aren't persisted to state, we always evaluate them regardless of the
type of apply. Since the destroy-time local node is no longer a
"destroy" operation, the order of evaluation need to be reversed. Take
the existing DestroyValueReferenceTransformer and change it to reverse
the outgoing edges, rather than in incoming edges. This makes it so that
any dependencies of a local or output node are destroyed after
evaluation.

Having locals evaluated during destroy failed one other test, but that
was the odd case where we need `id` to exist as an attribute as well as
a field.
2018-01-29 16:16:41 -05:00
Brian Flad 8743edc4c9 deps: Bump AWS provider to support cn-northwest-1 state 2018-01-27 03:53:29 -05:00
James Bardin 5f72c97e70
Merge pull request #17201 from hashicorp/jbardin/disco-timeout
extend disco timeout
2018-01-26 17:14:23 -05:00
James Bardin eca2440c38
Merge pull request #17200 from hashicorp/jbardin/update-go-plugin
update the go-plugin package
2018-01-26 17:12:45 -05:00
James Bardin 37ad172d0d extend disco timeout
Extend the discovery timeout from 4 seconds to 11 seconds. This gives a
little more time for a slow host to response. The duration of 11s
keeps the delay reasonable, and puts it just after the default TLS
handshake timeout of 10s for easier differentiation of the error cases.
2018-01-25 17:16:28 -05:00
James Bardin 18c2ad1cfc update the go-plugin package
This contains some new functionality related to grpc.
2018-01-25 15:20:03 -05:00
Brian Flad 1ff724f333
Merge pull request #17087 from hashicorp/f-versioning-docs-updates
Documentation: Add version specifier information to provider version docs and clarify pessimistic specifier
2018-01-25 14:56:08 -05:00
James Bardin 99c60f5525 update CHANGELOG.md 2018-01-25 14:15:37 -05:00
James Bardin 142dd6632b
Merge pull request #17126 from hashicorp/module-examples-clarification
website: Clarify submodule examples location
2018-01-25 14:04:08 -05:00
James Bardin 3a608cd275
Merge pull request #17183 from jeloou/fix/docs-typo
website: fix typo in getting started guide
2018-01-25 14:03:37 -05:00
James Bardin aba18f2588
Merge pull request #17184 from Haegin/master
Correct website typo
2018-01-25 14:03:23 -05:00
James Bardin 522ae01e73
Merge pull request #17090 from jwa/state-remote-webdav
allow HTTP 201 & 204 when storing remote state
2018-01-25 13:43:05 -05:00
James Bardin 54d12f6703
Merge pull request #17170 from ubschmidt2/master
s/repalce/replace
2018-01-25 13:40:01 -05:00
James Bardin 8bed10bda0
Merge pull request #17186 from marco-m/patch-1
Update init.html.markdown
2018-01-25 13:39:35 -05:00
James Bardin 0b000f19e3
Merge pull request #17193 from jen20/update-aws-provider
deps: Bump AWS provider to add eu-west-3 for state
2018-01-25 13:38:48 -05:00
James Bardin 389d676157
Merge pull request #17168 from minamijoyo/fix-workspace-help
Remove duplicated help messages from `workspace --help`
2018-01-25 13:34:16 -05:00
James Bardin df6c48590f update CHANGELOG.md 2018-01-25 10:38:19 -05:00
Sander van Harmelen 129fdb3553
Merge pull request #17147 from jeremiahsnapp/fix-chef-provisioner-validateFn
Fix chef provisioner validateFn
2018-01-25 16:28:33 +01:00
Jeremiah Snapp 7595e27772 Fix chef provisioner validateFn
Correctly validate Chef provisioner's `use_policyfile`
field even if its value is a string type.

Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
2018-01-25 09:24:05 -05:00
James Nugent 0a9608c900 deps: Bump AWS provider to add eu-west-3 for state
Also updates github.com/aws/aws-sdk-go and adds github.com/beevik/etree.

Fixes terraform-providers/terraform-provider-aws#3129.
2018-01-25 11:52:20 +00:00
Joseph Núñez 7c5e160c58 website: fix typo in getting started guide 2018-01-24 21:02:03 -03:00
Marco Molteni 5f27730ca3
Update init.html.markdown
Fix typo and replace some "it's" with "it is", according to rules for written English.
2018-01-24 18:41:42 +01:00
Harry Mills 856b852ac2
Correct typo 2018-01-24 11:02:12 -05:00
Stefan Schmidt ee6c8a777a s/repalce/replace 2018-01-23 17:41:03 +01:00
Masayuki Morita 338d5cad70 Remove duplicated help messages from `workspace --help`
Fixes #17165
2018-01-23 23:38:42 +09:00
Chris Griggs 02531b237c Website Docs: add community providers (#17149)
* add community providers

* add Infoblox

* change ACME github org to vancluever
2018-01-22 16:31:52 -06:00