terraform/website/docs/configuration/functions
Martin Atkins ff4ea042c2 config: Allow module authors to specify validation rules for variables
The existing "type" argument allows specifying a type constraint that
allows for some basic validation, but often there are more constraints on
a variable value than just its type.

This new feature (requiring an experiment opt-in for now, while we refine
it) allows specifying arbitrary validation rules for any variable which
can then cause custom error messages to be returned when a caller provides
an inappropriate value.

    variable "example" {
      validation {
        condition = var.example != "nope"
        error_message = "Example value must not be \"nope\"."
      }
    }

The core parts of this are designed to do as little new work as possible
when no validations are specified, and thus the main new checking codepath
here can therefore only run when the experiment is enabled in order to
permit having validations.
2020-01-10 15:23:25 -08:00
..
abs.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
abspath.html.md lang/funcs: add "abspath" function (#21409) 2019-07-02 08:30:30 -04:00
base64decode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64encode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64gzip.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
base64sha256.html.md website: Fix typographical errors in the docs for base64sha256/512 2019-11-08 09:43:27 -08:00
base64sha512.html.md website: Fix typographical errors in the docs for base64sha256/512 2019-11-08 09:43:27 -08:00
basename.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
bcrypt.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
can.html.md config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00
ceil.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
chomp.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
chunklist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
cidrhost.html.md website: Additional explanation for cidrsubnet function 2019-03-26 10:04:29 -07:00
cidrnetmask.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
cidrsubnet.html.md lang/funcs: cidrsubnets function 2019-09-20 15:58:01 -07:00
cidrsubnets.html.md website/docs: Corrects function name in `cidrsubnets` function documentation (#23473) 2019-11-26 07:50:32 -05:00
coalesce.html.md funcs/coalesce: return the first non-null, non-empty-string element from a sequence (#21002) 2019-04-12 13:57:52 -04:00
coalescelist.html.md lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
compact.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
concat.html.md lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
contains.html.md lang/funcs: remove sethaselement function and documentation (#21164) 2019-05-02 10:47:19 -04:00
csvdecode.html.md website: example of csvdecode with for_each 2019-07-31 12:43:16 -07:00
dirname.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
distinct.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
element.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
file.html.md website: Typo in link to the templatefile function page 2019-03-15 14:12:26 -07:00
filebase64.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filebase64sha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filebase64sha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
fileexists.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filemd5.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
fileset.html.md lang/funcs: Switch fileset() function glob implementation to github.com/bmatcuk/doublestar to support additional glob patterns 2019-08-30 20:22:03 -04:00
filesha1.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filesha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
filesha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
flatten.html.md website: Full examples for for_each with flatten and setproduct 2019-10-11 13:41:58 -07:00
floor.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
format.html.md Add "leading zeros" for the sake of SEO 2019-06-25 16:13:05 -07:00
formatdate.html.md Fix docs mistake/misleading 2019-08-28 11:38:26 -04:00
formatlist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
indent.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
index.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
join.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
jsondecode.html.md website: Fix some broken links 2019-02-28 16:21:09 -08:00
jsonencode.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
keys.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
length.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
list.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
log.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
lookup.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
lower.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
map.html.md website: Fix various typos in the config function documentation 2019-03-11 13:59:12 -07:00
matchkeys.html.md website: correct the title of the "matchkeys" function page 2019-04-04 15:35:13 -07:00
max.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
md5.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
merge.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
min.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
parseint.html.md lang/funcs: parseint function 2019-09-17 15:33:22 -07:00
pathexpand.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
pow.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
range.html.md lang: "range" function 2019-06-04 16:20:17 -07:00
regex.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
regexall.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
replace.html.md lang: "regex" and "regexall" functions 2019-08-06 11:52:14 -07:00
reverse.html.md lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
rsadecrypt.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
setintersection.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
setproduct.html.md website: Full examples for for_each with flatten and setproduct 2019-10-11 13:41:58 -07:00
setunion.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
sha1.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sha256.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sha512.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
signum.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
slice.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
sort.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
split.html.md website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
strrev.html.md lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
substr.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
templatefile.html.md website: Note about using jsonencode/yamlencode in templatefile 2019-12-11 12:57:01 -08:00
timeadd.html.md website: Added missing doublequotes. (#20696) 2019-03-19 11:23:24 -07:00
timestamp.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
title.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tobool.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tolist.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tomap.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
tonumber.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
toset.html.md website: Fix various typos in the config function documentation 2019-03-11 13:59:12 -07:00
tostring.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
transpose.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
trim.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
trimprefix.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
trimspace.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
trimsuffix.html.md lang/funcs: Add more `trim*` functions (#23016) 2019-11-18 08:31:44 -05:00
try.html.md lang: "try" and "can" functions 2020-01-10 15:23:25 -08:00
upper.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
urlencode.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
uuid.html.md lang/funcs: New "uuidv5" function 2019-06-07 14:38:22 -07:00
uuidv5.html.md docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
values.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
yamldecode.html.md lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
yamlencode.html.md lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
zipmap.html.md website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00