Commit Graph

26454 Commits

Author SHA1 Message Date
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
hashicorp-ci 73fc1c451d Cleanup after v0.13.0 release 2020-08-10 18:04:10 +00:00
hashicorp-ci 4feec2357e
Release v0.13.0 2020-08-10 17:46:08 +00:00
Chris Griggs d08b31d3d9 final fmt changes to guide 2020-08-10 09:56:45 -07:00
Petros Kolyvas 30c50a3b33 Small docs fix for broken link 2020-08-10 13:29:48 -03:00
Chris Griggs 459b7a8326 PDP initial changes 2020-08-10 07:09:10 -07:00
Nicolas Vogel 8f42f0fa77
Fix documentation example for the indent function
We must use interpolation, using the %{} directive will trigger the following error  "indent" is not a valid template control keyword
2020-08-10 11:45:28 +02:00
Nick Fagerlund 7bc75a1804 website: Edits to updated Registry documentation
- Edits to registry overview
- Add index link as 'overview' (header links are semi-invisible)
- move providers/overview.html to providers/index.html
- Edits to providers overview
- fix filename of os-arch
- edits to provider publishing
2020-08-07 22:40:04 -07:00
Tony Carmichael cde98a3172 website: Update Registry documentation for Terraform 0.13 release
Co-authored-by: Tom Bamford <tbamford@hashicorp.com>
2020-08-07 22:40:04 -07:00
James Bardin 99cd3ab223 fix command tests
A number of tests had invalid configs or providers, but were never
properly validated
2020-08-07 14:13:57 -04:00
James Bardin 3cf84bb3f9 don't add state to the validate context
The validate command should work with the configuration, but when
validate was run at the start of a plan or apply command the state was
inserted in preparation for the next walk. This could lead to errors
when the resource schemas had changes and the state could not be
upgraded or decoded.
2020-08-07 14:13:57 -04:00
James Bardin 998ba6e6e1 remove extra attrs found in state json
While removal of attributes can be handled by providers through the
UpgradeResourceState call, data sources may need to be evaluated before
reading, and they have no upgrade path in the provider protocol.

Strip out extra attributes during state decoding when they are no longer
present in the schema, and there is no schema upgrade pending.
2020-08-06 22:55:36 -04:00
Petros Kolyvas 796eba95da
Merge pull request #25721 from hashicorp/doc-import-multiple-bindings
website: Documentation about the one-to-one object binding assumption
2020-08-06 15:50:03 -03:00
Daniel Dreier cc86889fd6 Update GitHub issue templates
Add "bug" label to bug_report.md
Add "new" label to feature_request.md
2020-08-05 17:39:56 -04:00
Daniel Dreier 237a1f3684 Add "new" label to issue templates 2020-08-05 17:28:12 -04:00
Martin Atkins 08ba58c8c8 website: Documentation about the one-to-one object binding assumption
Terraform's design assumes that each remote object in Terraform's care is
bound to one resource instance and one alone. If the same object is bound
to multiple instances then confusing behavior will often result, such as
two resource configurations competing to update a single object, or
objects being "left behind" when all existing Terraform deployments are
destroyed.

This assumption was previously only implied, though. This change is an
attempt to be more explicit about it, although these are additions to some
older documentation sections that have not been revised for some time and
so this is just a best effort to make this information discoverable
without getting drawn into a full-on reorganization of these sections.

While revising this there were some particular oddities that I decided to
revise while I was there, but I'll leave a fuller revision of this older
content for a later commit when we have more time to review it in greater
detail.
2020-07-31 15:22:50 -07:00
Martin Atkins 47dc40d229
Update CHANGELOG.md 2020-07-31 14:16:53 -07:00
Martin Atkins 0684d3761d
Update CHANGELOG.md 2020-07-31 14:15:58 -07:00