terraform/website/docs/language
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
..
data-sources Merge branch 'main' into description-metadata-language-docs 2021-07-21 16:24:59 -04:00
expressions Merge pull request #29273 from mellab/patch-1 2021-08-09 11:44:33 -04:00
files Fix metadata description format on all pages 2021-07-19 12:11:10 -04:00
functions lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
meta-arguments Make all sentences start with caps + additional tweak wording edits 2021-07-30 14:44:17 -04:00
modules Make all sentences start with caps + additional tweak wording edits 2021-07-30 14:44:17 -04:00
providers Merge pull request #29216 from hashicorp/laura-description-metadata-cli 2021-07-30 14:49:36 -04:00
resources Make all sentences start with caps + additional tweak wording edits 2021-07-30 14:44:17 -04:00
settings Update swift.html.md 2021-08-05 08:32:40 +10:00
state Fix metadata description format on all pages 2021-07-19 12:11:10 -04:00
syntax Remove back ticks from syntax index page 2021-07-30 10:57:44 -04:00
values docs: Add note about multiple variable validation blocks (#29299) 2021-08-10 15:20:02 +01:00
attr-as-blocks.html.md website: Move hidden attr-as-blocks page into new URL structure 2021-01-22 12:22:21 -08:00
dependency-lock.html.md Remove backticks from Dependency lock page 2021-07-30 10:42:15 -04:00
index.html.md Fix formatting error on language home page 2021-07-16 17:28:40 -04:00
v1-compatibility-promises.html.md website: Fix formatting of v1 compatibility promises 2021-06-08 10:35:23 -07:00