Commit Graph

26471 Commits

Author SHA1 Message Date
Rémi Lapeyre 0056882859
Add remilapeyre to CODEOWNERS 2020-08-19 14:25:19 +02:00
Martin Atkins 189f9fa382
Update CHANGELOG.md 2020-08-18 14:41:07 -07:00
Martin Atkins 6f05430295
Update CHANGELOG.md 2020-08-18 14:39:57 -07:00
Martin Atkins ce67a818db internal/getproviders: Allow basedir for local search to be symlink
The SearchLocalDirectory function was intentionally written to only
support symlinks at the leaves so that it wouldn't risk getting into an
infinite loop traversing intermediate symlinks, but that rule was also
applying to the base directory itself.

It's pretty reasonable to put your local plugins in some location
Terraform wouldn't normally search (e.g. because you want to get them from
a shared filesystem mounted somewhere) and creating a symlink from one
of the locations Terraform _does_ search is a convenient way to help
Terraform find those without going all in on the explicit provider
installation methods configuration that is intended for more complicated
situations.

To allow for that, here we make a special exception for the base
directory, resolving that first before we do any directory walking.

In order to help with debugging a situation where there are for some
reason symlinks at intermediate levels inside the search tree, we also now
emit a WARN log line in that case to be explicit that symlinks are not
supported there and to hint to put the symlink at the top-level if you
want to use symlinks at all.

(The support for symlinks at the deepest level of search is not mentioned
in this message because we allow it primarily for our own cache linking
behavior.)
2020-08-18 14:28:50 -07:00
angie pinilla daa112b566
Update CHANGELOG for #25903 2020-08-18 14:18:58 -04:00
angie pinilla d96d834ec1
Merge pull request #25903 from hashicorp/f-aws-sdk-go-base-update
backend/s3: Update aws-sdk-go-base to v0.6.0
2020-08-18 14:09:28 -04:00
Angie Pinilla 582fb73a7c deps: Update aws-sdk-go-based to 0.6.0 2020-08-18 12:49:31 -04:00
Alisdair McDiarmid 27affd06ce
Update CHANGELOG.md 2020-08-17 11:23:34 -04:00
Alisdair McDiarmid eb9e32d7b2
Merge pull request #25861 from hashicorp/alisdair/builtin-provider-legacy-string
addrs: Fix LegacyString for builtin providers
2020-08-17 11:22:20 -04:00
Alisdair McDiarmid e02e53ed4d states: Add roundtrip v3->v4 with builtin provider 2020-08-14 15:40:48 -04:00
Alisdair McDiarmid d53a4ac588 addrs: Fix LegacyString for builtin provider addrs
Builtin provider addrs (i.e. "terraform.io/builtin/terraform") should be
able to convert to legacy string form (i.e. "terraform"). This ensures
that we can safely round-trip through ParseLegacyAbsProviderConfig,
which can return either a legacy or a builtin provider addr.
2020-08-14 14:56:35 -04:00
Kristin Laemmert 95eca06782
statemgr: add a NewUnlockErrorFull state manager for tests (#25823)
* statemgr: add a NewUnlockErrorFull state manager for tests

I've frequently needed to coerce Unlock() errors for tests and it's been
awkward and fraught every time, so I decided to add a full state manger
that returns *mostly* errors. I intend to use this in conjunction with
the clistate.Locker interface, which first calls Lock() (to block if the
mutex is in use) at the start of Unlock(), so Lock() rather awkwardly needed to succeed.
2020-08-14 14:14:51 -04:00
Kristin Laemmert c9f710ac29
terraform: remove DisableReduce from refresh, plan and apply graphs (#25824) 2020-08-14 14:13:33 -04:00
Kristin Laemmert b5f4f9a96e
website: add providers mirror command to providers sidebar 2020-08-14 10:17:55 -04:00
Kristin Laemmert 470298006f website: add providers mirror command to providers sidebar 2020-08-14 10:03:31 -04:00
Tony Carmichael f5c8ef19ad
Merge pull request #25844 from hashicorp/aicarmic-add-org-gpg-instructions
Update publishing.html.md
2020-08-13 10:03:17 -06:00
Tony Carmichael 76fb0515af
Update publishing.html.md
Clarify steps for sending in GPG keys if publishing with a GH org.
2020-08-13 09:40:52 -06:00
Pam Selle ce2bbb151a
Merge pull request #25825 from hashicorp/pselle/build-website
[build] Fix missing VERSION for running make website
2020-08-12 13:34:00 -04:00
Pam Selle 0eac3de22a Fix missing VERSION for running make website 2020-08-12 13:24:03 -04:00
James Bardin ebd7828892 update CHANGELOG.md 2020-08-12 10:54:56 -04:00
Pam Selle f63b261fca
Merge pull request #25791 from hashicorp/aug20_provisioners_nav
website: Move provisioners into language section of nav sidebar
2020-08-12 10:54:13 -04:00
James Bardin 1c09df1a66
Merge pull request #25779 from hashicorp/jbardin/remove-state-attrs
Remove resource state attributes that are no longer in the schema
2020-08-12 10:49:44 -04:00
James Bardin aec0059920
Merge pull request #25760 from hashicorp/jbardin/target-resource
Generalize target addresses before expansion
2020-08-12 10:28:51 -04:00
James Bardin b9e076ec66 re-add ModuleInstance -> Module conversion
When working with a ConfigResource, the generalization of a
ModuleInstance to a Module was inadvertently dropped, and there was to
test coverage for that type of target.

Ensure we can target a specific module instance alone.
2020-08-12 10:22:13 -04:00
James Bardin 0df5a7e6cf Generalize target addresses before expansion
Before expansion happens, we only have expansion resource nodes that
know their ConfigResource address. In order to properly compare these to
targets within a module instance, we need to generalize the target to
also be a ConfigResource.

We can also remove the IgnoreIndices field from the transformer, since
we have addresses that are properly scoped and can compare them in the
correct context.
2020-08-12 10:12:43 -04:00
James Bardin cbbd487130
Merge pull request #25663 from hashicorp/jbardin/plan-empty-resource
Return known empty containers from resource evaluation during plan
2020-08-12 10:10:59 -04:00
James Bardin c8ed0ccbdb
Merge pull request #25662 from hashicorp/jbardin/dynamic-set-block
Unknown set blocks with dynamic may have 0 elements
2020-08-12 10:06:59 -04:00
Kristin Laemmert 7111d8deb1
Merge pull request #25783 from nvogel/master
Fix documentation example for the indent function
2020-08-12 09:34:07 -04:00
Nick Fagerlund 2ffb71bcee
website: Fix several broken links (#25808) 2020-08-11 15:24:51 -07:00
Alisdair McDiarmid 31f858e1bb
Update CHANGELOG.md 2020-08-11 12:21:54 -04:00
Alisdair McDiarmid ef65f552c8
Merge pull request #25647 from hashicorp/alisdair/remove-stubbed-out-apply-diff-code
command: Remove stubbed-out apply diff output code
2020-08-11 12:18:49 -04:00
Alisdair McDiarmid c5377ca50f
Merge pull request #25523 from hashicorp/alisdair/fix-state-mv-panic
command: Fix state mv for only resource in module
2020-08-11 12:18:32 -04:00
Alisdair McDiarmid 17e1c9dd05 command: Fix state mv for only resource in module
When moving a resource block with multiple instances to a new address
within the same module, we need to ensure that the target module is
present as late as possible. Otherwise, deleting the resource from the
original address triggers pruning, and the module is removed just before
we try to add the resource to it, which causes a crash.

Includes regression test which panics without this code change.
2020-08-11 11:54:35 -04:00
Kristin Laemmert 67ee056c0b
Update CHANGELOG.md 2020-08-11 11:52:19 -04:00
Kristin Laemmert 4729f7f76b
lang/funcs: update cidrsubnet and cidrhost for 64-bit systems (#25517)
* upgrade go-cidr to v1.1.0

* lang/funcs: refactor Subnet and Host functions to support 64-bit systems

* add test cases and remove no-longer-needed validation
2020-08-11 11:51:31 -04:00
Kristin Laemmert 989b58071f
Update CHANGELOG.md 2020-08-11 11:50:31 -04:00
Kristin Laemmert 5964e928dc
states/statefile: consistently sort resources across modules (#25498)
If a statefile had resources with the same name in different modules,
the sort order could be inconsistent between state refreshes. This adds
the module to the Less() function used in sorting and a minimal test to
verify consistent ordering.
2020-08-11 11:50:07 -04:00
Kristin Laemmert 3cfe888057
Update CHANGELOG.md 2020-08-11 11:49:26 -04:00
Kristin Laemmert 30142b02e3
Update CHANGELOG.md 2020-08-11 11:48:27 -04:00
Kristin Laemmert df4627fecb
configs: include "providers" when overriding modules (#25496) 2020-08-11 11:46:40 -04:00
Kristin Laemmert 6621501ae3
state: remove deprecated state package (#25490)
Most of the state package has been deprecated by the states package.
This PR replaces all the references to the old state package that
can be done simply - the low-hanging fruit.

* states: move state.Locker to statemgr

The state.Locker interface was a wrapper around a statemgr.Full, so
moving this was relatively straightforward.

* command: remove unnecessary use of state package for writing local terraform state files

* move state.LocalState into terraform package

state.LocalState is responsible for managing terraform.States, so it
made sense (to me) to move it into the terraform package.

* slight change of heart: move state.LocalState into clistate instead of
terraform
2020-08-11 11:43:01 -04:00
Kristin Laemmert adf5cde180
Update CHANGELOG.md 2020-08-11 11:25:49 -04:00
Kristin Laemmert 86e9ba3d65
* backend/local: push responsibility for unlocking state into individual operations
* unlock the state if Context() has an error, exactly as backend/remote does today
* terraform console and terraform import will exit before unlocking state in case of error in Context()
* responsibility for unlocking state in the local backend is pushed down the stack, out of backend.go and into each individual state operation
* add tests confirming that state is not locked after apply and plan

* backend/local: add checks that the state is unlocked after operations

This adds tests to plan, apply and refresh which validate that the state
is unlocked after all operations, regardless of exit status. I've also
added specific tests that force Context() to fail during each operation
to verify that locking behavior specifically.
2020-08-11 11:23:42 -04:00
Petros Kolyvas 50b2f0f9b2
Fix sidebar link for Terraform standard backends to include link to Kubernetes backend docs (#25792)
* website/layouts/backend-types.erb

* Update backend-types.erb
2020-08-10 20:25:14 -03:00
Nick Fagerlund 30b983e1e8 website: Move provisioners into language section of nav sidebar 2020-08-10 14:18:31 -07:00
Chris Griggs 2fc26a9691
Merge pull request #25789 from hashicorp/cgriggs01-pdp-docs
[Website] Provider Dev Program Guide
2020-08-10 13:32:56 -07:00
Petros Kolyvas b9cf673bea
Merge pull request #25786 from hashicorp/0.13-docs-fixups
Small docs fix for broken link
2020-08-10 16:54:28 -03:00
Kristin Laemmert a8d9809234
terraform-bundle: re-enable e2e tests (#25516) 2020-08-10 15:17:47 -04:00
Chris Griggs 1b30656df4
Update website/guides/terraform-provider-development-program.html.md
Co-authored-by: Tony Carmichael <1105554+aicarmic@users.noreply.github.com>
2020-08-10 12:08:42 -07:00
Chris Griggs a8f98b8a78 update asset path 2020-08-10 12:06:50 -07:00