Commit Graph

28712 Commits

Author SHA1 Message Date
James Bardin 58aabb54ca
Merge pull request #29410 from hashicorp/jbardin/format-empty-nested-attrs
handle null and unknown values in attr diffs
2021-08-18 14:54:27 -04:00
James Bardin 9f24b4dc68
Merge pull request #29411 from hashicorp/jbardin/plan-nesting-single
handle null NestingSingle values
2021-08-18 14:34:49 -04:00
James Bardin 68ed50616e handle null and unknown values in attr diffs
The code adopted from block diffs was not set to handle null and unknown
values, as those are not allowed for blocks.

We also revert the change to formatting nested object types as single
attributes, because the attribute formatter cannot handle sensitive
values from the schema. This presents some awkward syntax for diffs for
now, but should suffice until the entire formatter can be refactored to
better handle these new nested types.
2021-08-18 14:12:01 -04:00
James Bardin f029183f63
Merge pull request #29260 from hashicorp/jbardin/go-mod-tidy
run go mod tidy in CI
2021-08-18 13:55:24 -04:00
James Bardin da007517b0 handle null NestingSingle values
Null NestingSingle attributes were not being handled in ProposedNew
2021-08-18 13:52:18 -04:00
James Bardin c351f41e47
Merge pull request #29406 from hashicorp/jbardin/update-cty
update github.com/zclconf/go-cty@v1.9.1
2021-08-18 09:43:38 -04:00
James Bardin d3ea864ab3 github.com/zclconf/go-cty@v1.9.1 2021-08-18 09:03:31 -04:00
Martin Atkins 563141bc59
Update CHANGELOG.md 2021-08-17 15:36:00 -07:00
Martin Atkins c23a7fce4e lang/funcs: Preserve IP address leading zero behavior from Go 1.16
Go 1.17 includes a breaking change to both net.ParseIP and net.ParseCIDR
functions to reject IPv4 address octets written with leading zeros.

Our use of these functions as part of the various CIDR functions in the
Terraform language doesn't have the same security concerns that the Go
team had in evaluating this change to the standard library, and so we
can't justify an exception to our v1.0 compatibility promises on the same
sort of security grounds that the Go team used to justify their
compatibility exception.

For that reason, we'll now use our own fork of the Go library functions
which has the new check disabled in order to preserve the prior behavior.
We're taking this path, rather than pre-normalizing the IP address before
calling into the standard library, because an additional normalization
layer would be entirely new code and additional complexity, whereas this
fork is relatively minor in terms of code size and avoids any significant
changes to our own calls to these functions.

Thanks to the Kubernetes team for their prior work on carving out a subset
of the "net" package for their similar backward-compatibility concern.
Our "ipaddr" package here is a lightly-modified fork of their fork, with
only the comments changed to talk about Terraform instead of Kubernetes.

This fork is not intended for use in any other future feature
implementations, because they wouldn't be subject to the same
compatibility constraints as our existing functions. We will use these
forked implementations for new callers only if consistency with the
behavior of the existing functions is a key requirement.
2021-08-17 15:20:05 -07:00
Martin Atkins 94f4f8e25d go.mod: Opt in to pruned module graphs
Go 1.17 has a new treatment of go.mod where it tracks more indirect
dependencies in return for needing to fetch and load fewer transitive
go.mod files.

This commit opts in to that new treatment and adds all of the additional
indirect dependencies which contain packages that Terraform directly or
indirectly makes use of.

There are more details on what's going on here in the "Lazy Module Loading"
design document:
    http://golang.org/design/36460-lazy-module-loading

(the design document was written assuming this would land in Go 1.15, but
it actually landed in Go 1.17 and so it's "go 1.17" that selects the new
behavior in spite of the examples in that document.)
2021-08-17 15:20:05 -07:00
Martin Atkins 383bbdeebc Upgrade to Go 1.17
This includes the addition of the new "//go:build" comment form in addition
to the legacy "// +build" notation, as produced by gofmt to ensure
consistent behavior between Go versions. The new directives are all
equivalent to what was present before, so there's no change in behavior.

Go 1.17 continues to use the Unicode 13 tables as in Go 1.16, so this
upgrade does not require also upgrading our Unicode-related dependencies.

This upgrade includes the following breaking changes which will also
appear as breaking changes for Terraform users, but that are consistent
with the Terraform v1.0 compatibility promises.

- On MacOS, Terraform now requires macOS 10.13 High Sierra or later.

This upgrade also includes the following breaking changes which will
appear as breaking changes for Terraform users that are inconsistent with
our compatibility promises, but have justified exceptions as follows:

- cidrsubnet, cidrhost, and cidrnetmask will now reject IPv4 CIDR
  addresses whose decimal components have leading zeros, where previously
  they would just silently ignore those leading zeros.

  This is a security-motivated exception to our compatibility promises,
  because some external systems interpret zero-prefixed octets as octal
  numbers rather than decimal, and thus the previous lenient parsing could
  lead to a different interpretation of the address between systems, and
  thus potentially allow bypassing policy when configuring firewall rules
  etc.

This upgrade also includes the following breaking changes which could
_potentially_ appear as breaking changes for Terraform users, but that do
not in practice for the reasons given:

- The Go net/url package no longer allows query strings with pairs
  separated by semicolons instead of ampersands. This primarily affects
  HTTP servers written in Go, and Terraform includes a special temporary
  HTTP server as part of its implementation of OAuth for "terraform login",
  but that server only needs to accept URLs created by Terraform itself
  and Terraform does not generate any URLs that would be rejected.
2021-08-17 15:20:05 -07:00
James Bardin a94155d0ca
Merge pull request #29397 from hashicorp/jbardin/format-id-name-marks
unmark object ID or Name for formatting
2021-08-17 14:58:56 -04:00
James Bardin a48b024c0a unmark object ID or Name for formatting 2021-08-17 12:24:43 -04:00
James Bardin bd8cae3970
Merge pull request #29398 from hashicorp/jbardin/diff-nested-attrs
Empty nested attribute handling in diffs
2021-08-17 11:51:28 -04:00
James Bardin 296a757ab4 check for null sets in diff rendering 2021-08-16 18:25:16 -04:00
James Bardin fbfb14142e render empty nested containers as attributes
Don't try to break down containers that are empty to render the diff, so
we can avoid having to check for empty vs null in all cases.
2021-08-16 18:13:55 -04:00
rita 8407ce73db
Merge pull request #29372 from hashicorp/link_multicloud_tutorial_from_use_cases
Link multi-cloud K8s tutorial from use cases page
2021-08-13 16:40:06 -04:00
ritsok fae0567216 move multi-cloud to top of use-cases page 2021-08-13 16:38:26 -04:00
ritsok 3449cb2805 Link multi-cloud K8s tutorial from use cases page 2021-08-13 13:47:47 -04:00
hc-github-team-tf-core 1206298487 Cleanup after v1.1.0-alpha20210811 release 2021-08-11 15:13:06 +00:00
hc-github-team-tf-core c3a93ccc24
Release v1.1.0-alpha20210811 2021-08-11 14:57:27 +00:00
Radek Simko 2496bc2b1e
internal/registry: Add URL to error message for clarity (#29298) 2021-08-10 15:20:40 +01:00
Radek Simko 7a95bbf019
docs: Add note about multiple variable validation blocks (#29299) 2021-08-10 15:20:02 +01:00
Top 963771d398
Merge pull request #29304 from hashicorp/tf-swift-backend-swauth
Update swift.html.md
2021-08-10 08:16:26 +10:00
Radek Simko abc762c42d
docs: Update outdated info about terraform-providers org (#29328)
* docs: Update outdated info about terraform-providers org

* Remove codecov mentions
2021-08-09 17:45:27 +01:00
Laura Pacilio 3376752b08
Merge pull request #29273 from mellab/patch-1
Fixed typo on type-constraints.html.md
2021-08-09 11:44:33 -04:00
Alisdair McDiarmid 10e431487f
Merge pull request #29312 from hashicorp/alisdair/json-output-planned-output-change
json-output: Add output changes to plan logs
2021-08-06 10:10:05 -04:00
Alisdair McDiarmid 3b33dc1105 json-output: Add output changes to plan logs
Extend the outputs JSON log message to support an `action` field (and
make the `type` and `value` fields optional). This allows us to emit a
useful output change summary as part of the plan, bringing the JSON log
output into parity with the text output.

While we do have access to the before/after values in the output
changes, attempting to wedge those into a structured log message is not
appropriate. That level of detail can be extracted from the JSON plan
output from `terraform show -json`.
2021-08-05 15:32:26 -04:00
Top 21a5103551
Update swift.html.md
Add note for Swauth v1.0 support
2021-08-05 08:32:40 +10:00
James Bardin 2f152f1139 update CHANGELOG.md 2021-08-02 08:45:45 -04:00
Laura Pacilio 5b07bb7040
Merge pull request #29216 from hashicorp/laura-description-metadata-cli
Laura description metadata cli
2021-07-30 14:49:36 -04:00
Laura Pacilio 31af9adc00 Make all sentences start with caps + additional tweak wording edits 2021-07-30 14:44:17 -04:00
Laura Pacilio 845470617d Address PR comments for manipulating state index 2021-07-30 14:25:01 -04:00
Laura Pacilio 2034c17948 Address PR comments on inspect index page 2021-07-30 14:22:16 -04:00
Laura Pacilio 0abd79c9b4 Address PR comments on workspace command index page 2021-07-30 14:19:14 -04:00
James Bardin 97a2694528
Merge pull request #28838 from remilapeyre/consul-size-limit
Fix handling large states in the Consul backend
2021-07-30 14:18:34 -04:00
Laura Pacilio 18a3143495 Address PR comments for init page 2021-07-30 14:15:46 -04:00
Laura Pacilio e94bf7bc16 Address PR comments for cli index page 2021-07-30 14:13:04 -04:00
Laura Pacilio 342335003d
Update website/docs/cli/commands/import.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:10:32 -04:00
Laura Pacilio d59777c12f
Update website/docs/language/modules/sources.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:07:45 -04:00
Laura Pacilio 6874aad76d
Update website/docs/language/meta-arguments/resource-provider.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:07:19 -04:00
Laura Pacilio 809f50fbf2
Update website/docs/language/meta-arguments/module-providers.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:07:03 -04:00
Laura Pacilio 87348f97f8
Update website/docs/language/expressions/dynamic-blocks.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:06:20 -04:00
Laura Pacilio 507ad21a91
Update website/docs/cli/import/index.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:05:06 -04:00
Laura Pacilio fb6ff1f440
Update website/docs/cli/state/inspect.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:04:39 -04:00
Laura Pacilio f2552e502a Update metadata on graph command page 2021-07-30 11:21:10 -04:00
Laura Pacilio 58bc29b61b update metadata on get command page 2021-07-30 11:19:44 -04:00
Laura Pacilio fef4ccb795 Update metadta on force-unlock command page 2021-07-30 11:18:58 -04:00
Laura Pacilio e326a7b1a5 Update metadata on providers command page 2021-07-30 11:17:17 -04:00
Laura Pacilio 7105ed7a1e Update metadata on version command page 2021-07-30 11:16:08 -04:00