Commit Graph

23845 Commits

Author SHA1 Message Date
James Bardin 3c34c047f7
Merge pull request #20553 from hashicorp/jbardin/invalid-timeouts-in-plan
Prevent unexpected timeout blocks from being planned
2019-03-04 17:11:52 -05:00
Justin Campbell e466bc4bb7
Merge pull request #20543 from hashicorp/hashicorp-signing-key
plugin/discovery: Verify sig against HashiCorp key
2019-03-04 09:47:09 -05:00
James Bardin 33d5ddf291 remove empty timeouts blocks in copyTimeoutValues
The hcl2shims will always add in the timeouts block, because there's no
way to differentiate a null single block from an empty one in the
flatmapped state. Since we are only concerned with keeping the prior
timeouts value, always set the new value to null, and then copy over the
prior value if it exists.
2019-03-02 11:30:37 -05:00
James Bardin e50be82da4 don't add empty blocks in ProposedNewObject
If the config contained a null block, don't convert it to a block with
empty values for the proposed new value.
2019-03-02 11:21:59 -05:00
James Bardin 369d512e22
Merge pull request #20546 from hashicorp/jbardin/backend-init-panic
don't panic of the users aborts backend input
2019-03-01 19:03:49 -05:00
James Bardin 2adf5801d9 don't panic of the users aborts backend input
When the user aborts input, it may end up as an unknown value, which
needs to be converted to null for PrepareConfig.

Allow PrepareConfig to accept null config values in order to fill in
missing defaults.
2019-03-01 18:45:06 -05:00
Kristin Laemmert 8fb4e5ce6e
command/show: differentiate between state schemas and plan schemas. (#20516)
When a planfile is supplied to the `terraform show -json` command, the
context that loads only included schemas for resources in the plan. We
found an edge case where removing a data source from the configuration
(though only if there are no managed resources from the same provider)
would cause jsonstate.Marshal to fail because the provider schema wasn't
in the plan context.

jsonplan.Marshal now takes two schemas, one for plan and one for state.
If the state schema is nil it will simply use the plan schemas.
2019-03-01 13:59:57 -08:00
Kristin Laemmert c4151b7c7c
command/show: fixing bugs in modulecalls (#20513)
* command/show: fixing bugs in modulecalls

jsonconfig and jsonplan both had subtle bugs with the logic for
marshaling module calls that only showed up when multiple modules were
referenced. This PR fixes those bugs and extends the existing tests to
include multiple modules.

* sort all the things, mostly for tests
2019-03-01 13:59:12 -08:00
Kristin Laemmert 21f6e3dffd
Mildwonkey/012 docs updated (#20542)
* docs: update plan command documentation. Fixes #19235

* docs: added a missing reserved variable name. Fixes #19159.

* website: add note that resource names cannot start with a number

* website: add some notes to the 0.12 upgrade guide
2019-03-01 12:30:51 -08:00
Justin Campbell 0574eadb62 plugin/discovery: Verify sig against HashiCorp key
https://github.com/hashicorp/terraform/pull/19389 introduced a change to
the provider GPG signature verification process, and removed the
hardcoded HashiCorp GPG key.

While the changes were intended and are still planned for a future
release, we should still be verifying all providers in the TF 0.12.0
release against the HashiCorp GPG key until a more robust key
verification procedure is in place.

Fixes https://github.com/hashicorp/terraform/issues/20527
2019-03-01 14:05:51 -05:00
Andriy Borodiychuk a0f3a2daa0 Update doc.go, fix typo (#20529) 2019-03-01 08:59:01 -08:00
John Slee 8f7b897d0c website: typo in outputs doc (#20520) 2019-03-01 08:25:49 -08:00
Martin Atkins 08f0f60908 website: Temporary link to the beta1 announcement from v0.12 guide
The announcement post contains the information about the temporary
situation where not all of the providers are compatible yet. Linking there
rather than duplicating the information in the upgrade guide means we'll
be able to update in one place as the situation changes.
2019-02-28 16:21:48 -08:00
Martin Atkins 6cd6f0275c website: Fix some broken links
In all the shuffling of these docs for v0.12 some of the links ended up
not lining up quite right.
2019-02-28 16:21:09 -08:00
James Bardin 8f7e5b75fc
Merge pull request #20522 from hashicorp/jbardin/sdk-shims
Unexpected empty and computed values
2019-02-28 19:17:50 -05:00
James Bardin 49230f8198 existing fields cannot become computed during plan
Fields with no change can only become computed during initial creation.
2019-02-28 18:45:11 -05:00
James Bardin 9a39af5047 1->0 set changes non longer should happen in Read
The new normalization should make preventing those changes unnecessary,
and will also prevent extra empty elements from being added when
resources are refreshed.
2019-02-28 17:47:11 -05:00
Radek Simko 0dc3ca966a
Merge pull request #20509 from hashicorp/vendor-bump-crypto
vendor: go get golang.org/x/crypto@31a38585487a
2019-02-28 22:12:42 +00:00
Martin Atkins 1e25ccf11a release: clean up after v0.12.0-beta1 2019-02-28 21:22:37 +00:00
Martin Atkins 09f521a682
v0.12.0-beta1 release prep 2019-02-28 21:11:02 +00:00
Radek Simko 242de8ff28
vendor: go get golang.org/x/crypto@31a38585487a 2019-02-28 08:32:43 +00:00
Martin Atkins f193b11073 command/format: Normalize before/after values before rendering
We are now allowing the legacy SDK to opt out of the safety checks we try
to do after plan and apply, and so in such cases the before/after values
in planned changes may be inconsistent with our usual rules.

To avoid adding lots of extra complexity to the diff renderer to deal with
these situations, instead we'll normalize the handling of nested blocks
prior to using these values.

In the long run it'd be better to do this normalization at the source,
immediately after we receive an object from a provider using the opt-out,
but we're doing this at the outermost layer for now to avoid risking
unintended impacts on other Terraform Core components when we're just
about to enter the beta phase of the v0.12.0 release cycle.
2019-02-27 16:53:29 -08:00
Martin Atkins c280c27d87 plans/objchange: func NormalizeObjectFromLegacySDK
Now that we have an opt-out to let the legacy SDK return values that are
inconsistent with the new conventions for representing configuration,
various parts of Terraform must now be prepared to deal with
inconsistencies.

This function normalizes the most egregious inconsistencies relating to
the representation of nested blocks, freeing any recipient of its result
from worrying about these inconsistencies itself.
2019-02-27 16:53:29 -08:00
Kristin Laemmert 5ebf8b2992
website: fix link (#20501) 2019-02-27 12:21:20 -08:00
Brian Flad 364c3e70b7
Merge pull request #20497 from hashicorp/f-s3-backend-logging-and-user-agent
backend/s3: Add debug logging and user agent
2019-02-27 14:29:54 -05:00
Kristin Laemmert f44e4b2c6a
website: add documentation for terraform providers schema (#20468)
* website: add documentation for terraform providers schema
2019-02-27 11:08:31 -08:00
Brian Flad e34a97abca
backend/s3: Add debug logging and user agent
Porting over previous behavior from terraform-provider-aws.
2019-02-27 12:59:08 -05:00
Radek Simko 47443e39ad
Merge pull request #20495 from hashicorp/vendor-protobuf-bump
vendor: github.com/golang/protobuf@v1.3.0
2019-02-27 17:20:32 +00:00
Radek Simko bb952cb90a
vendor: github.com/golang/protobuf@v1.3.0 2019-02-27 15:42:18 +00:00
Sander van Harmelen 4ba8504e86
Update CHANGELOG.md 2019-02-27 07:53:34 +01:00
Sander van Harmelen 63e2dcef8a
Merge pull request #20481 from hashicorp/svh/b-exit-code
backend/remote: exit with 1 when a run is canceled
2019-02-27 07:52:20 +01:00
James Bardin 6e7016008b update CHANGELOG.md 2019-02-26 20:47:01 -05:00
James Bardin eada955721
Merge pull request #19070 from mars/postgres-backend
Postgres backend
2019-02-26 20:20:01 -05:00
Mars Hall 6d9e2048f4 Skip more pg backend acceptance tests 2019-02-26 16:50:36 -08:00
Martin Atkins 6fa1ff5de7 vendor: go get github.com/hashicorp/hcl2@master
This includes a fix for the parsing of object for expressions in newline-
sensitive contexts like block bodies.

It also includes a change to the JSON syntax decoder that cause it to
consider an explicit null to be equivalent to a property not being set at
all when interpreting a property value as a nested block. (It was
previously doing tha only when interpreting the property value as an
attribute value.)
2019-02-26 16:08:18 -08:00
Mars Hall 3c68b857be
📚 correction to pg backend configuration 2019-02-26 15:30:17 -08:00
Mars Hall c98d979e6b Remove Postgres setup from Travis CI 2019-02-26 15:22:26 -08:00
Chris Griggs b5fd9fa1fd
Merge pull request #20488 from cgriggs01/cgriggs01-newcomunity
[Website] Add two new community providers
2019-02-26 14:28:40 -08:00
cgriggs01 ad279fda77 Add two new community providers 2019-02-26 14:10:32 -08:00
Mars Hall 920e7a7acc Mutex pg backend‘s database transaction 2019-02-26 13:45:16 -08:00
Mars Hall c6bf3442fc Lock() in pg backend now returns LockError for retryable errors 2019-02-26 13:20:40 -08:00
Radek Simko 14ca8611ba
Merge pull request #20483 from hashicorp/vendor-winrmtest-bump
vendor: github.com/dylanmei/winrmtest@99b7fe2fddf1
2019-02-26 21:13:11 +00:00
Mars Hall a075a68c58 Correct name of pg backend‘s default schema 2019-02-26 12:59:31 -08:00
James Bardin f43b87a61e
Merge pull request #20480 from hashicorp/jbardin/backend-init
backend init defaults and inputs
2019-02-26 15:04:00 -05:00
Sander van Harmelen 01f17fa0ca backend/remote: exit with 1 when a run is canceled 2019-02-26 21:00:07 +01:00
Martin Atkins da4862e3f7 website: Revamped upgrade guide for v0.12.0-beta1
The upgrade guide had its last major upgrade while we were preparing for
the alpha releases. Now that the upgrade tool is more complete we can
describe the required changes in terms of that tool, and also add
additional information about provider upgrades.

We will revise this at least one more time before v0.12.0 final, but this
is an interim copy of the upgrade guide intended to help those who are
testing the beta releases.
2019-02-26 10:27:51 -08:00
Martin Atkins f4bc502f51 website: Documentation for "terraform 0.12upgrade" 2019-02-26 10:27:51 -08:00
Mars Hall 4875529c8d 📚 doc pg backend config & locking 2019-02-26 10:26:06 -08:00
Radek Simko fdb126f27e
vendor: github.com/dylanmei/winrmtest@99b7fe2fddf1 2019-02-26 18:22:15 +00:00
Kristin Laemmert 98353dbe60
Update CHANGELOG.md 2019-02-26 09:47:27 -08:00