terraform/internal
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
..
addrs refactoring: First round of ValidateMoves rules 2021-07-29 12:29:36 -07:00
backend Merge pull request #28838 from remilapeyre/consul-size-limit 2021-07-30 14:18:34 -04:00
builtin return diagnostics from provisioners 2021-05-19 11:24:54 -04:00
command Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
communicator Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
configs Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
copy deprecate helper/copy 2020-10-08 08:42:16 -04:00
dag Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
depsfile Move addrs/ to internal/addrs/ 2021-05-17 14:09:07 -07:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
e2e Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
earlyconfig Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
experiments configs: Include "moved" blocks when merging multiple files into a module 2021-07-01 08:28:02 -07:00
getmodules Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
getproviders internal/registry: Add URL to error message for clarity (#29298) 2021-08-10 15:20:40 +01:00
grpcwrap Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
helper Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
httpclient Move httpclient/ to internal/httpclient/ 2021-05-17 14:09:07 -07:00
initwd addrs: ModuleRegistryPackage for representing module registry packages 2021-06-03 08:50:34 -07:00
instances refactoring: First round of ValidateMoves rules 2021-07-29 12:29:36 -07:00
ipaddr lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
lang lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
legacy Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
logging go.mod,backend: update coreos/etcd dependency to release-3.4 branch 2021-07-20 12:27:22 -04:00
modsdir Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
moduledeps Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
moduletest Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
plans configs/configschema: fix missing "computed" attributes from NestedObject's ImpliedType (#29172) 2021-07-15 13:00:07 -04:00
plugin Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
plugin6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-simple Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-simple-v6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-terraform/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
providercache tools: remove terraform-bundle. (#28876) 2021-06-03 14:08:04 -04:00
providers Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
provisioner-local-exec/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provisioners Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
refactoring refactoring: First round of ValidateMoves rules 2021-07-29 12:29:36 -07:00
registry internal/registry: Add URL to error message for clarity (#29298) 2021-08-10 15:20:40 +01:00
repl add marks.Raw 2021-06-25 14:27:43 -04:00
replacefile Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
states Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
terminal Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
terraform core: Call into refactoring.ValidateMoves after creating a plan 2021-07-28 13:54:10 -07:00
tfdiags Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
tfplugin5 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
tfplugin6 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
typeexpr internal/typeexpr: staticcheck 2020-12-02 13:59:19 -05:00