Commit Graph

21364 Commits

Author SHA1 Message Date
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
Rubén González 944a98f42d website: correct link from file interpolation function to path information variables 2018-01-22 11:35:33 -08:00
Martin Atkins 9baf716f29
Update CHANGELOG.md 2018-01-19 13:08:41 -08:00
James Bardin d29994e247
Merge pull request #17127 from hashicorp/jbardin/ignore_changes
don't ignore partial containers in diffs
2018-01-19 16:08:18 -05:00
Martin Atkins b511caf049 core: interpolate the count config during the apply walk
Previously we would interpolate the count config (ResourceConfig.RawCount)
only while preparing to dynamic-expand aggregate resource nodes. This is
problematic because we do not dynamic-expand any resource nodes during the
apply walk, and so previously the count value was not available for
interpolation during apply and would result in an error.

Now we interpolate RawCount once for each resource we visit during the
apply walk -- even though that redundantly interpolates the same config
multiple times when count > 1 -- to ensure that it's available by the
time we interpolate any remaining expressions in the config and any
expressions within "connection" and "provisioner" blocks.

This error was masked by us sharing a single RawConfig instance between
the plan and apply walks when "terraform apply" is run with no explicit
plan file argument, but was exposed by the workflow where the plan is
written first to disk since in that case the interpolation result from
during the plan phase is not present in the deflated plan object. For
this reason, the new context test serializes the plan into an in-memory
buffer and reloads it in order to simulate the effect of the two-step
workflow.
2018-01-19 13:06:00 -08:00
Martin Atkins 5b08fd4f9f config: Don't expose go implementation details in Resource.Count
Previously we would return the raw error from strconv.ParseInt, which
includes details in its text that expose implementation details and are
thus not helpful to the user.

Instead, we use a locally-defined error message that talks only about
what the caller is expected to know: that count should be parsable as
an integer.
2018-01-19 13:06:00 -08:00
jwa 3d4642719f simulate a webdav backend 2018-01-19 02:30:21 +00:00
James Bardin 48517fbab4 update CHANGELOG.md 2018-01-18 13:50:43 -05:00
James Bardin 8d1e479fc7 don't ignore partial containers in diffs
Containers (maps, lists, sets) in an InstanceDiff need to be handled in
their entirety.  Unchanged values cannot be filtered out from diffs, as
providers expect attribute containers to be complete.

If a value in ignore_changes maps to a single key in an attribute
container, and there are other changes present, that ignored value must
be included in the diff as well.
2018-01-17 19:13:32 -05:00
James Bardin eba73a3bb4
Merge pull request #17134 from hashicorp/jbardin/GH-17119
the trailing slash check caused a nil dereference
2018-01-17 19:07:19 -05:00