Commit Graph

135 Commits

Author SHA1 Message Date
Middleton, Nathan
119f645b41 ECCEAT-1964 join function example added in documentation 2023-02-15 13:15:15 +00:00
Middleton, Nathan
925abf1037 ECCEAT-1964 join function description changed in documentation 2023-02-10 16:45:56 +00:00
Gary McDonald
d3a49dacf2 Fix the spelling of network within the setproducts function documentation.
Signed-off-by: Gary McDonald <mcdonagj@dukes.jmu.edu>
2023-01-22 19:53:30 -05:00
Anton Patsev
119bff6ca2 Fix Examples ip_addrs 2023-01-20 18:36:28 +06:00
Brandon Croft
be5984d664 Merge pull request #32004 from hashicorp/brandonc/nested_attr_sensitive
fix: don't reveal nested attributes with sensitive schema
2022-11-02 16:18:04 -06:00
Laura Pacilio
ec42b167d7 fix broken links 2022-10-31 14:46:15 -04:00
Brandon Croft
bd744ad4e9 Unify all sensitive value plan output as "(sensitive value)"
Previously, there was mixed usage of "(sensitive)" and "(sensitive value)" and even though it was more common to see "(sensitive)", the thought is that it's a value we are hiding rather than describing something already shown.
2022-10-24 12:50:46 -06:00
Kevin Wang
03e262a70b chore: rewrite internal redirects (#32038) 2022-10-20 11:31:55 -04:00
Peter Junos
9016e8d607 Replace pipe with html entity 2022-10-13 10:21:47 +02:00
Peter Junos
6ece575c53 Fix regex pattern for more alternatives
During refactoring, there was a backslash added to `|` character in
terraform regex.

Fix that and return just `x|y` - that's the correct usage.
2022-10-10 17:36:38 +02:00
Rob Pickerill
5d2e888e96 update setsubtract examples to include toset notation 2022-10-01 20:45:04 +01:00
Martin Atkins
f260ed1177 website: Remove warning that yamlencode is experimental
We originally included this warning because the go-cty-yaml module wasn't
yet stable and it was also not extensively tested so it wasn't yet clear
if its behavior would need to change in some less common cases we hadn't
tested so far.

However, go-cty-yaml had its v1.0.0 release some time ago and is now
committed to preserving its current Marshal output unless it is found to
be non-compliant with the YAML 1.2 specification. This doc change means
that Terraform's yamlencode is now adopting a similar posture:
 - The exact style details produced by the function for a particular input
   are now frozen. It'll change only if we find that the function is
   producing output that isn't valid per the YAML spec.
 - If someone finds a YAML parser that cannot parse what yamlencode
   produces but what it produces is valid per the YAML 1.2 spec, we'll
   expect the parser to be corrected to better support the spec rather
   than changing the yamlencode output.

There may be pragmatic exceptions if we encounter a situation we cannot
anticipate yet, but the above will be our general rule. This is really
just a specialization of the spirit of the v1.x Compatibility Promises,
tailored specifically to this function.
2022-09-30 09:08:12 -07:00
koki-develop
d5df330696 fixed typo: startsswith -> startswith 2022-09-22 08:53:11 +09:00
Bryce Kalow
b54017ef83 website: content updates for developer (#31779)
Co-authored-by: Matthew Garrell <69917312+mgarrell777@users.noreply.github.com>
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
Co-authored-by: Kevin Wang <kwangsan@gmail.com>
Co-authored-by: Judith Malnick <judith@hashicorp.com>
Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com>
2022-09-15 15:54:13 -05:00
Martin Atkins
2ee9589650 lang/funcs: "timecmp" function
This is a complement to "timestamp" and "timeadd" which allows
establishing the ordering of two different timestamps while taking into
account their timezone offsets, which isn't otherwise possible using the
existing primitives in the Terraform language.
2022-08-25 10:15:42 -07:00
Alisdair McDiarmid
d3284bdc4e Merge pull request #31220 from FooBartn/string-starts-ends-with-funcs
feat: add startswith and endswith funcs
2022-07-14 13:13:04 -04:00
Alisdair McDiarmid
7190898501 Apply suggestions from code review
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-07-14 13:03:53 -04:00
Joshua Barton
0dfcbe6d0c docs: Add recommended language changes
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-07-14 11:06:35 -05:00
Joshua Barton
2278d30857 docs: add documentation for starts and endswith 2022-07-06 10:56:32 -05:00
Laura Pacilio
7a11e87631 Add example! 2022-07-05 17:32:39 -04:00
Laura Pacilio
15b59fd6c9 Reorder page items and add note about available types to specific verb descriptions 2022-07-05 17:25:08 -04:00
Laura Pacilio
91d6c50ccc Update website/docs/language/functions/format.mdx 2022-06-30 17:35:50 -04:00
Laura Pacilio
e90f9286c2 Update format function to mention list/map types 2022-06-30 17:28:59 -04:00
Laura Pacilio
f83c8e1d18 Merge pull request #31011 from dleser/patch-1
Added example with function argument expansion
2022-06-28 16:50:09 -04:00
Dirk Leser
ab93ef09ec Readded the new example below the description 2022-06-17 14:42:52 +02:00
Dirk Leser
37d18f4229 functions/merge: Added expanation for example
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-06-17 14:32:02 +02:00
Alisdair McDiarmid
718b0875ef lang: Remove defaults function
Now that we are able to specify optional object attribute defaults
inline in a type constraint, the separate `defaults` function is no
longer needed.
2022-06-01 06:40:37 -04:00
Dirk Leser
707f39b440 Added example with function argument expansion
Even if the expansion with three dots is explicity mentioned in https://www.terraform.io/language/expressions/function-calls#expanding-function-arguments the additional example would have helped me a lot as it is a common use case to "flatten" a list of maps.
2022-05-06 09:28:42 +02:00
Craig Wright
e217c0c53a Merge pull request #30938 from jensenbox/patch-1
chore: Typo fix (`retuns` -> `returns`)
2022-04-26 18:32:41 -07:00
Ryoh Akiyoshi
9b4600cc23 website: Fix an example for urlencode function
The example did not reflect the actual behavior of escaping spaces.
2022-04-26 17:38:47 -07:00
Christian Jensen
85a081bd2a chore: Typo fix
Fix a mispelled word.
2022-04-26 15:56:32 -07:00
george-mengelberg
d7316e79ca Description of '-' symbol as used in format()
The existing description for the '-' symbol as use in format() stated that the result would padded spaces to the left.  When tested in via 'terraform console' using format("%-10.1f", 3) the result was "3.0       "

Terraform v1.1.7
2022-03-26 08:26:44 -07:00
Loek Duys
c6fa1e70ef Update toset.mdx
Fix output in `toset`
```
toset(["a", "b", 3])
toset([
  "3",
  "a",
  "b",
])
```

This is the actual output from the tf console, using Terraform v1.1.5 on windows_amd64
2022-03-15 13:48:14 +01:00
Laura Pacilio
68e70d71d4 Merge pull request #30483 from bpar476/patch-1
Adds documentation to `substr` function to cover when `length` exceeds input length
2022-02-15 11:27:47 -05:00
Ben Partridge
252865c6a0 Improvements to wording of substr function documentation
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-02-15 10:23:37 +11:00
Alisdair McDiarmid
98f80bc5da website: Explain limitations of type function 2022-02-10 06:12:58 -05:00
Ben Partridge
fa8a87fab5 Adds documentation to substr function to cover when length longer than input string
The `substr` function allows the `length` parameter to be longer than the remaining characters in the input after the offset. This is useful for when you want to truncate a string to a maximum number of characters. However, the documentation isn't clear on this so I had to do a test deployment to confirm the behaviour after finding the behaviour in an old issue https://github.com/hashicorp/terraform/issues/15751
2022-02-07 15:12:22 +11:00
GiannakopoulosJ
13907690a2 Typo in zipmap documentation
zipmap does not produce a map with comma in terraform cli
tested with Terraform v1.1.3
2022-01-19 16:02:24 +02:00
Martin Atkins
e35c25da44 website: Try function documentation "provably" vs "probably" typo
This paragraph is trying to say that try only works for dynamic errors and
not for errors that are _not_ based on dynamic decision-making in
expressions.

I'm not sure if this typo was always here or if it was mistakenly "corrected"
at some point, but either way the word "probably" changes the meaning
of this sentence entirely, making it seem like Terraform is hedging
the likelihood of a problem rather than checking exactly for one.
2021-12-22 12:10:07 -08:00
Dylan Staley
21cbb5b392 migrate docs to mdx 2021-12-14 18:41:17 -08:00
Dylan Staley
0e48f58688 Revert "migrate docs to mdx"
This reverts commit 3cb12b5a52.
2021-11-22 15:57:25 -08:00
Dylan Staley
3cb12b5a52 migrate docs to mdx 2021-11-22 15:47:36 -08:00
Laura Pacilio
bd64d07e6b Apply suggestions from code review 2021-11-15 10:49:37 -05:00
Laura Pacilio
b838a93023 Add cidr block output example to setproduct function page 2021-11-05 10:51:59 -04:00
Krista LaFentres
1f08f7dba8 Clarify the way the trim() function works and add some more examples 2021-10-25 14:13:15 -05:00
Laura Pacilio
73a3bb2702 Merge pull request #28334 from paultyng/patch-1
Add null to type conversion docs
2021-09-02 14:47:38 -04:00
Laura Pacilio
03849d850a Merge pull request #28486 from joshschmitter/patch-1
setsubtract doc: use "Relative Complement" correctly
2021-08-23 15:49:51 -04:00
joshschmitter
cb41b158f1 concise use of "relative complement"
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2021-08-23 14:40:35 -05:00
Laura Pacilio
d427c81a89 Update jsonencode minified note 2021-08-23 15:01:38 -04:00
Laura Pacilio
dffb8b4a16 Merge pull request #29088 from brenthc/minify_jsonencode
note that output of jsonencode is minified
2021-08-23 14:24:37 -04:00