Commit Graph

21253 Commits

Author SHA1 Message Date
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
Gauthier Wallet 1b3f5fcbfb helper/structure: More cases for NormalizeJsonString tests
In terraform-providers/terraform-provider-aws#2935, we have been cleaning code
duplication by benefiting from the "NormalizeJsonString" present in the "structure" helper.

It appears that tests in the AWS provider are covering more use-cases,
which are added in this work.
2018-01-17 15:53:38 -08:00
James Bardin a5ed7d0ae4
Merge pull request #17086 from hashicorp/jbardin/GH-17083
only split the prefix string once from the s3 key
2018-01-17 18:51:43 -05:00
James Bardin 38f76ddc4e the trailing slash check caused a nil dereference
The disco package doesn't return errors, and a nil value indicates that
the input isn't valid. Always check for nil.
2018-01-17 18:31:05 -05:00
James Bardin c19fb49bda reset old ignore_changes test back to correct diff
The output for the flatmap ignore_changes test was incorrectly modified.
Providers expect diffs of complex attributes to contain all or nothing.
2018-01-17 15:31:21 -05:00
Justin Campbell 0f00291dfe website: Clarify submodule examples location
When writing an example for a submodule, the example should be placed in
`examples/{example name}` instead of
`modules/{module name}/examples/{example name}`.
2018-01-17 14:58:13 -05:00
stack72 e9476c6765 backend/manta: Update manta dependencies
Internally, triton-go has changed how it handles errors. We can now get rid of
checking strings for errors, and we have introduced an errors library that
wraps some of the major errors we encounter and test for
2018-01-17 11:34:02 -08:00
Chris Griggs 0e93e0c2b0 website: fix typo on community provider index page 2018-01-17 10:38:10 -08:00
Masayuki Morita f440dba137 Standardize on log level "WARN" rather than "WARNING" 2018-01-16 18:05:26 -08:00
jwa b3d432e6bc allow HTTP 201 & 204 when storing remote state
Apache mod_dav returns 201 (created) and 204 (no content) during PUTs;
treat these as valid responses when using Apache as a http backend.
2018-01-11 22:09:59 +00:00
Chris Griggs 0e69f1542d website: additional community provider links
List now includes DigitalRebar, Kibana, Kong and Rubscope.

Also fixes the previously-broken link for OpenDayLight.
2018-01-11 10:50:06 -08:00
Brian Flad 939f20011e Documentation: Cleaner copy around pessimistic version specifiers for modules and providers 2018-01-11 12:46:00 -05:00