Commit Graph

25360 Commits

Author SHA1 Message Date
tf-release-bot d30b99d9bf Cleanup after v0.12.17 release 2019-12-02 18:31:04 +00:00
tf-release-bot f0ae01e605
v0.12.17 2019-12-02 18:19:08 +00:00
Martin Atkins 180e233ec1
Update CHANGELOG.md 2019-12-02 10:10:13 -08:00
Martin Atkins 6db3cf8e5b vendor: upgrade Azure SDK and Azure/go-autorest
This involves some minor changes to the "azure" backend code to account
for upstream breaking changes.
2019-12-02 10:04:49 -08:00
Radek Simko 5b5efa2c7e
Update .github/SECURITY.md
Co-Authored-By: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2019-12-02 13:07:02 +00:00
Radek Simko b4a22aa0e9
Make link to vulnerability reports more visible 2019-11-29 15:53:07 +00:00
cgriggs01 650250c471 move provider link page 2019-11-26 17:28:21 -08:00
Graham Davison e32641c9ce website/docs: Corrects function name in `cidrsubnets` function documentation (#23473) 2019-11-26 07:50:32 -05:00
Kristin Laemmert 4409cc04f5
Update CHANGELOG.md 2019-11-25 15:04:06 -05:00
Kristin Laemmert 99225b8d76
command/jsonstate,plan: fix panic with null values (#23492)
The code responsible for marshalling attribute values was checking for
nil values, but not null.

Fixes #23485, #23274
2019-11-25 15:01:38 -05:00
Radek Simko 211cf08b38
Update config.yml 2019-11-25 13:46:07 +00:00
Radek Simko 3db7ea2d89
Merge pull request #23225 from hashicorp/add-issue-template-cfg
github: Add issue templates config
2019-11-25 13:44:39 +00:00
Radek Simko 438279c520
github: Add issue templates config 2019-11-25 13:02:24 +00:00
James Bardin 88a806cc32
Merge pull request #23450 from hashicorp/jbarin/err-diags
fix diagnostics handling
2019-11-22 15:02:50 -05:00
Chris Griggs d5602cc839
Merge pull request #23460 from hashicorp/cgriggs01-community
[Website] Community providers
2019-11-22 08:24:08 -08:00
cgriggs01 1c9ed3927a add commmunity providers 2019-11-21 16:48:36 -08:00
Chris Griggs 7ef92417d1
Merge pull request #23456 from hashicorp/cgriggs01-opennebula
[Website] OpenNebula provider links
2019-11-21 10:42:08 -08:00
Jon Schulman 722eae2cec website: Fix example reference for remote backend (#23455)
Example reference had a missing `=` sign on line 133; this causes the workspace reference not to parse properly
2019-11-21 10:18:24 -08:00
James Bardin e20a7dea53
Merge pull request #23452 from hashicorp/jbardin/deps
Minor dependency handling fixups
2019-11-21 12:45:23 -05:00
Martin Atkins 5aa119e693
Update CHANGELOG.md 2019-11-21 09:29:05 -08:00
Martin Atkins 4f7dcf346f
Update CHANGELOG.md 2019-11-21 09:23:32 -08:00
Martin Atkins 7cf782c1bf states/statefile: Better error messages for some unsupported v3 cases
There are a few situations that we've seen arise quite commonly for folks
upgrading from Terraform 0.11 to 0.12. These particular problems are not
things that Terraform 0.12 can fix automatically during upgrading, but
we can at least give some better feedback to users that they ought to be
addressed _before_ upgrading.

The provider address problem is already detected and flagged by the
"terraform 0.11checklist" command that folks should run as part of their
upgrade process, but the module address problem is not something we
noticed was lacking validation in 0.11 and so the checklist tool doesn't
cover it. Due to the lack of coverage in the checklist tool, this commit
also includes an additional section in the upgrade guide that mentions
the problem and gives instructions on how to address it.
2019-11-21 09:18:49 -08:00
Martin Atkins 1ae47ae314 states/statefile: tolerate and ignore invalid depends_on in version 3
The state refactoring command "terraform state mv" in Terraform 0.11 does
not update existing dependency addresses recorded in the state when it
moves objects around, and Terraform only updates the dependency addresses
in the state when it performs a full update on a resource instance, and
so it's a common problem for folks updating from Terraform 0.11 with
resource names that are not valid identifiers to run into state upgrade
errors even though they have followed the instructions produced by
"terraform 0.12checklist".

Dependencies are synced from config during every refresh walk anyway, so
in practice we can get away with just discarding invalid dependency
addresses and letting the refresh walk update them. In practice these
addresses are unlikely to be pointing at a resource that actually exists
anyway, because if so Terraform 0.12's configuration parser wouldn't be
able to interpret it.

Discarding invalid dependency addresses allows the state upgrade to
complete successfully in such cases and thus gives the refresh step an
opportunity to repair the problem.
2019-11-21 09:18:49 -08:00
James Bardin 5ed7d17265 remove incorrect comment
The CreateBeforeDestroy transformer correctly handles the edge referred
to in the comment, and going forward it will probably be easier to use
the knowledge of this edge for CBD anyway.
2019-11-21 11:35:54 -05:00
James Bardin 8510aa81ca make sure to get a ResourceAddr for destroy refs
addr.Resource is sometimes a resource, except when it's an instance.
Make sure to always get the underlying resource.
2019-11-21 11:35:54 -05:00
James Bardin c47f100e56 update test states that need dependency info
A number of tests had no, or incomplete state for the transformations
they wanted to test. Add states state with the correct dependencies for
these tests.
2019-11-21 11:35:54 -05:00
James Bardin 23112e198a fix missing deposed key 2019-11-21 10:31:41 -05:00
James Bardin 6caa5d23e2 fix diagnostics handling
Located all non-test paths where a Diagnostic type was assigned to an
error variable.
2019-11-21 09:14:50 -05:00
James Bardin 98b0e62fb9
Merge pull request #23435 from hashicorp/jbardin/cbd-deps
fix CreateBeforeDestroy de-duplication
2019-11-20 22:15:28 -05:00
cgriggs01 b82a266f40 add opennebula links 2019-11-20 16:00:19 -08:00
James Bardin 1e6f04547f collect all dependencies for create_before_destroy
An earlier change to eliminate the large amount of duplicate edges being
added by the original CreateBeforeDestroy dependency mapper mistakingly
prevented adding edges when there are multiple CBD dependencies.

This updates the algorithm to use a map to collect all possible edges
and de-deplucating them before processing.
2019-11-20 11:44:43 -05:00
James Bardin 3ad9ae5001 failing test for missing cbd edge 2019-11-20 10:56:28 -05:00
Martin Atkins 7081c26e54 command: Don't show more than two of the same warning
Some of our warnings are produced in response to particular configuration
constructs which might appear many times across a Terraform configuration.
To avoid the warning output dwarfing all of the other output, we'll use
ConsolidateWarnings to limit each distinct warning summary to appear at
most twice, and annotate the final one in the sequence with an additional
paragraph noting that some number of them have been hidden.

This is intended as a compromise to ensure that these warnings are still
seen and noted but to help ensure that we won't produce so many of them
as to distract from other output that appears alongside them.

This applies only to warnings relating to specific configuration ranges;
errors will continue to be shown individually, and sourceless warnings
(which are rare in Terraform today) will likewise remain ungrouped because
they are less likely to be repeating the same statement about different
instances of the same problem throughout the configuration.
2019-11-19 15:36:08 -08:00
Martin Atkins 79b62ae8ca tfdiags: ConsolidateWarnings method
This detects when there are many warning diagnostics with the same summary
and consolidates some of them together into a single diagnostic in order
to make the resulting output less overwhelming when presented in CLI
output where other information is competing for attention with the
warnings.

This is not yet used anywhere. Usage of it will follow in a subsequent
commit.
2019-11-19 15:36:08 -08:00
Pam Selle 285e545735
Merge pull request #23414 from gechr/gc-fix-trim-func-mappings
lang: Fix new `trim*` function mappings
2019-11-19 15:01:34 -05:00
George Christou 23fc68cc91
lang: Fix new `trim*` function mappings
Fixes #23413
2019-11-19 10:13:14 +00:00
tf-release-bot 6470a56fac Cleanup after v0.12.16 release 2019-11-18 22:20:57 +00:00
tf-release-bot d54ddd5dc9
v0.12.16 2019-11-18 22:09:27 +00:00
James Bardin c8857bf54e update CHANGELOG.md 2019-11-18 16:56:55 -05:00
James Bardin 5a113db84c
Merge pull request #23399 from hashicorp/jbardin/cbd-cycle
CBD GraphNodeCreators cannot depend on GraphNodeDestroyers
2019-11-18 16:54:25 -05:00
Nick Fagerlund 6af552bea6 website: interpolation: clean up more placeholder formatting 2019-11-18 12:32:51 -08:00
Carlos Vega Meyer fa22084e3a website: interpolation.html.md: "module" is literal
`MODULE` should be lowercase since it's not a placeholder for the actual module name.
2019-11-18 12:32:51 -08:00
James Bardin 33bef7c42e don't append refreshed state dependencies
EvalRefreshDependencies is used to update resource dependencies when
they don't exist, allow broken or old states to be updated. While
appending any newly found dependencies is tempting to have the largest
set available, changes to the config could conflict with the prior
dependencies causing cycles.
2019-11-18 09:32:57 -05:00
Kristin Laemmert 9ddc9c79a4
Update CHANGELOG.md 2019-11-18 08:32:31 -05:00
George Christou 91100c003c lang/funcs: Add more `trim*` functions (#23016)
* lang/funcs: Add `trim*` functions
2019-11-18 08:31:44 -05:00
sclaire-1 13fe1f8b47
Edit BUILDING.md
Split a sentence under the  "Versioning" section into two sentences to improve flow
2019-11-17 15:04:22 -08:00
James Bardin 682083cdd1 Creators cannot depend directly on CBD dest nodes
Since a create node cannot both depend on its destroy node AND be
CreateBeforeDestroy, the same goes for its dependencies. While we do
connect resources with dependency destroy nodes so that updates are
ordered correctly, this ordering does not make sense in the
CreateBeforeDestroy case.

If resource node is CreateBeforeDestroy, we need to remove any direct
dependencies from it to destroy nodes to prevent cycles. Since we don't
know for certain if a crate node is going to be CreateBeforeDestroy at
the time the edge is added in the graph, we add it unconditionally and
prune it out later on. The pruning happens during the CBD transformer
when the CBD destroy node reverses it's own destroy edge.  The reason
this works for detecting the original edge, is that dependencies of CBD
resources are forced to be CBD themselves. This does have a false
positive where the case of the original node is NOT CBD, but this can be
taken care of later when we gather enough information in the graph to
prevent the connection in the first place.
2019-11-17 09:56:44 -05:00
James Bardin 71f4526ae5 failing test for cbd cycle 2019-11-17 09:55:32 -05:00
Pam Selle 04c5547766
Update CHANGELOG.md 2019-11-15 15:32:49 -05:00
Pam Selle 5223aa35ba
Merge pull request #23398 from hashicorp/b-windows-tfignore
[deps] Update go-tfe
2019-11-15 15:31:20 -05:00