Commit Graph

25283 Commits

Author SHA1 Message Date
Pam Selle 2a2201cc74
Merge pull request #23475 from hashicorp/pselle/setMetaCleanup
Cleanup SetResourceInstanceCurrent to be clearer and more reliable
2019-12-04 12:04:12 -05:00
Kristin Laemmert 9891d0354a
providers: use addrs.Provider as map keys for provider.Factory (#23548)
* terraform/context: use new addrs.Provider as map key in provider factories
* added NewLegacyProviderType and LegacyString funcs to make it explicit that these are temporary placeholders

This PR introduces a new concept, provider fully-qualified name (FQN), encapsulated by the `addrs.Provider` struct.
2019-12-04 11:30:20 -05:00
James Bardin 8547603ff5 deprecation warning for destroy provisioner refs
Add deprecation warning for references from destroy provisioners or
their connections to external resources or values. In order to ensure
resource destruction can be completed correctly, destroy nodes must be
able to evaluate with only their instance state.

We have sufficient information to validate destroy-time provisioners
early on during the config loading process. Later on these can be
converted to hard errors, and only allow self, count.index, and each.key
in destroy provisioners. Limited the provisioner and block evaluation
scope later on is tricky, but if the references can never be loaded,
then they will never be encountered during evaluation.
2019-12-04 11:14:37 -05:00
Kyle MacDonald 26131d948c website: add yt video to /intro 2019-12-03 15:14:59 -08:00
Pam Selle c5e6d36ace Revert "Confirmed these two tests are fine behavior manually running test case"
This reverts commit e8aa5bfdc9.
2019-12-03 16:52:29 -05:00
Pam Selle de953eca6f Fixup for allowing empty lists/sets of resources 2019-12-03 16:29:01 -05:00
Pam Selle 19b408e053 Only need this one call, don't call the meta func 2019-12-03 14:27:18 -05:00
Pam Selle 61ce1cb3ad Fix provider related tests 2019-12-03 14:27:18 -05:00
Pam Selle e8aa5bfdc9 Confirmed these two tests are fine behavior manually running test case 2019-12-03 14:27:18 -05:00
Pam Selle 01da7b4f7f Tested and confirmed we cannot delete this, so removed TODO 2019-12-03 14:27:18 -05:00
Pam Selle 87fdcd0064 Add a new method cause doing things in module is weird 2019-12-03 14:27:18 -05:00
Pam Selle 3b4382082d More comments and names 2019-12-03 14:27:18 -05:00
Pam Selle fd34def9dc More comment updates, a lil refactor 2019-12-03 14:27:18 -05:00
Pam Selle ca9da51516 Cleanup 2019-12-03 14:27:18 -05:00
Pam Selle 9482bb8eb0 Comment cleanup 2019-12-03 14:27:18 -05:00
Pam Selle d144b83d50 This works, with lots of noise 2019-12-03 14:27:18 -05:00
Pam Selle 8cd4bd545c Delete dead code 2019-12-03 14:27:18 -05:00
James Bardin 07edc211eb
Merge pull request #23550 from hashicorp/jbardin/get_resource_panic
check for missing Current instance in EachMap
2019-12-03 12:40:42 -05:00
James Bardin bff675e0c3 check for missing Current instance in EachMap
NoEach and Each list both have this check, but it was missing in
EachMap. Refactor the EachList check to remove a level of indentation,
and make the check consistently near the start of the block.
2019-12-03 11:16:42 -05:00
tmshn fcc1a76d5e make plan-diff format a bit more dry 2019-12-03 19:02:59 +09:00
Daniel Dreier 4e5a18c621
Merge pull request #23530 from hashicorp/issue-tpl-sec-vuln
github: Make link to vulnerability reports more visible
2019-12-02 14:00:14 -08:00
Chris Griggs bbd6bf334c
Merge pull request #23509 from hashicorp/cgriggs01-website-update
[Website] move provider link page
2019-12-02 13:47:38 -08:00
Kristin Laemmert 6728e521c1
addrs: rename Provider Name to more accurate Provider Type (#23449) 2019-12-02 15:32:31 -05:00
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