terraform/website/docs/language/functions
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
..
abs.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
abspath.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
alltrue.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
anytrue.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
base64decode.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
base64encode.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
base64gzip.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
base64sha256.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
base64sha512.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
basename.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
bcrypt.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
can.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
ceil.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
chomp.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
chunklist.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
cidrhost.html.md lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
cidrnetmask.html.md lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
cidrsubnet.html.md lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
cidrsubnets.html.md lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
coalesce.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
coalescelist.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
compact.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
concat.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
contains.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
csvdecode.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
defaults.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
dirname.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
distinct.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
element.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
file.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filebase64.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filebase64sha256.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filebase64sha512.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
fileexists.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filemd5.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
fileset.html.md various docs updates (#29018) 2021-07-15 12:22:17 -04:00
filesha1.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filesha256.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
filesha512.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
flatten.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
floor.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
format.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
formatdate.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
formatlist.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
indent.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
index.html.md Fix metadata description format on all pages 2021-07-19 12:11:10 -04:00
index_function.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
join.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
jsondecode.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
jsonencode.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
keys.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
length.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
list.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
log.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
lookup.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
lower.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
map.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
matchkeys.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
max.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
md5.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
merge.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
min.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
nonsensitive.html.md Updating sensitive and nonsensitive docs with correct v0.15 info. 2021-05-14 10:32:39 -06:00
one.html.md fix typo 2021-06-09 13:13:08 +03:00
parseint.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
pathexpand.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
pow.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
range.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
regex.html.md fix regex logical or documentation (#27637) 2021-02-08 11:04:38 -05:00
regexall.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
replace.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
reverse.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
rsadecrypt.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
sensitive.html.md Updating sensitive and nonsensitive docs with correct v0.15 info. 2021-05-14 10:32:39 -06:00
setintersection.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
setproduct.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
setsubtract.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
setunion.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
sha1.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
sha256.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
sha512.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
signum.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
slice.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
sort.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
split.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
strrev.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
substr.html.md negative substring 2021-05-18 16:04:47 -04:00
sum.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
templatefile.html.md docs: Document naming conventions for templates & backend configs (#28924) 2021-06-18 17:20:00 +01:00
textdecodebase64.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
textencodebase64.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
timeadd.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
timestamp.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
title.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
tobool.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
tolist.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
tomap.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
tonumber.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
toset.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
tostring.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
transpose.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
trim.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
trimprefix.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
trimspace.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
trimsuffix.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
try.html.md fixed typo 2021-06-18 09:59:56 -06:00
type.html.md website/docs: move type func docs to a useful location (#28940) 2021-06-14 08:54:27 -04:00
upper.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
urlencode.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
uuid.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
uuidv5.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
values.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
yamldecode.html.md Fix yamldecode example from json to yaml (#28220) 2021-04-05 13:41:07 -04:00
yamlencode.html.md website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
zipmap.html.md website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00