Commit Graph

121 Commits

Author SHA1 Message Date
Dennis Webb e27e0862f3 Fixes order of interpolation functions in docs (#14241) 2017-05-05 17:24:03 +03:00
Joshua Spence 38d4d2f9d4 Add a logarithm function
Fixes #9498. Adds a `log` function for calculating logarithms.
2017-05-05 17:06:53 +10:00
Martins Sipenko c7fb9808ef config: sha512 hash functions (#14100) 2017-05-02 16:35:23 -07:00
Tom Elliff 551eedcf26 Document the data source interpolation usage (#14144)
* Document the data source interpolation usage

Also briefly mentions how to use counts and splat syntax as with resources to further document the usage of counts for data sources (see https://github.com/hashicorp/terraform/pull/14143).

* Output -> Attribute

As per feedback.
2017-05-02 15:17:24 +01:00
Jake Champlin 70bc1e1dcc Merge pull request #12537 from Pryz/coalescelist
Add coalescelist interpolation function
2017-04-21 15:23:21 -04:00
Pavel Khusainov f9fb6010ee config: "matchkeys" interpolation function
This new function allows using a search within one list to filter another list. For example, it can be used to find the ids of EC2 instances in a particular AZ.

The interface is made slightly awkward by the constraints of HIL's featureset.

#13847
2017-04-21 10:04:49 -07:00
tmshn 86d7c47c0a Change cidrhost() to get IP from end of the range when negative number given
Ref: https://github.com/apparentlymart/go-cidr/pull/2
2017-04-19 09:41:41 -07:00
Phillip Shipley c87459a895 website: updated link to RE2 regex syntax page
Docs had old link to google code, which does not redirect to the new syntax page.
2017-04-15 17:15:14 -07:00
Martin Atkins d1b35b412c Merge #13419: "chomp" function for stripping trailing newlines from strings 2017-04-07 11:12:49 -07:00
Seth Vargo 7110d15f19
Add HCL syntax highlighting for everything but providers 2017-04-06 14:08:39 -04:00
Joern Barthel 059a1b2c0f Added chomp interpolation function. 2017-04-06 13:17:25 +02:00
Hernán Schmidt 2d8f3f257a Fix small typo 2017-04-03 10:38:35 +02:00
Joshua Spence af2c84de5a Add `basename` and `dirname` functions
Adds `basename` and `dirname` interpolation. I want to add a `stack` tag to our infrastructure, the value of which is set to `${basename(path.cwd)}`. We currently use `${replace(path.cwd, "/^.+\\//", "")}` instead, but this is extremeley unreadable. The existance of a `basename` function would be very useful for this use case.

I don't have an immediate use case for a `dirname` function, but it seemed reasonable to add it as well.
2017-03-28 09:29:26 -07:00
Joshua Spence e71d6d92ad Add a substring interpolation function (#12870)
Adds a new `substr` interpolation function which can be used to truncate a string.
2017-03-22 11:30:39 -04:00
Mitchell Hashimoto 173e8562d4
website: document terraform.env 2017-03-13 16:39:05 -07:00
Pryz 733f1ca1e7 Add coalescelist interpolation function 2017-03-08 12:38:08 -08:00
Kit Ewbank 549cff56d0 Add 'slice' interpolation function. (#9729) 2017-02-13 21:20:02 +00:00
Jake Champlin 0a1991c82e
match paragraph indentation 2017-01-20 12:01:07 -05:00
Jake Champlin be45816c80
documentation: Add warning for pathexpand interpolation function
Note that the `pathexpand` interpolation function could cause an unwanted diff on two different hosts
2017-01-20 09:51:25 -05:00
Jake Champlin 5749217869 Merge pull request #11277 from hashicorp/f-add-tilde-expansion
core: Add pathexpand interpolation function
2017-01-19 09:35:33 -05:00
Jake Champlin 0b73b92830
core: Add pathexpand interpolation function
Adds the `pathexpand` interpolation function to allow users to expand `~` to the home directory in filepath strings.
2017-01-18 16:11:19 -05:00
Benjamin Richter a54d8a2d73 Remove obsolete reference from interpolation.html.md
The reference to the resources page is obsolete, the splat syntax is not described there (nor anywhere else, as far as I can see).
2017-01-18 11:36:20 +01:00
Benjamin Richter a53c827bdd Update interpolation.html.md (#11223)
correct typo
2017-01-17 15:40:56 +00:00
Matt Clegg a297d81dcd Fix bullet points (Whitespace formatting) 2016-12-21 15:51:54 +01:00
Michael H. Oshita a48de8cb9a syntax typo in doc for lookup() (#10783) 2016-12-16 11:29:01 +00:00
James J. Goodhouse ecbc3e066a fix interpolation syntax typo for website docs 2016-12-15 09:10:01 -08:00
Mitchell Hashimoto 4ab5356ff9
website: update website for conditionals 2016-12-07 20:49:31 -05:00
Jake Champlin 1f33952330
Add the timestamp interpolation function.
Adds the timestamp interpolation function, tests, and documentation to allow a user to insert an RFC 3339 formatted UTC timestamp.
2016-12-01 14:51:01 -05:00
Mitchell Hashimoto 8fab86a9d4
website: update docs for precedence rules 2016-11-15 15:29:38 -08:00
Mitchell Hashimoto 7d6b3b80b9
website: document escaping template vars [GH-9897] 2016-11-07 08:42:46 -08:00
Jason Wieringa 43dcc30ae8 Fixed typo on interpolation docs (#9880)
Removes extra slash in name
2016-11-04 19:48:44 +00:00
James Turnbull 18b3736ba4 Pass over the Interpolation page (#9703)
* Pass over the Interpolation page

Fixes some grammar, typos and structure. Updated some headings and fixed
a couple of spelling mistakes.

* Added proper note syntax

* Turned some notes into actual notes

* Couple of minor typos just noticed
2016-10-29 01:13:09 +01:00
Jesse Szwedko 0fbd72a355 Add some basic math interpolation functions
Support the following math functions for interpolation:

* ceil
* floor
* max
* min

Fixes #7409
2016-10-28 17:49:31 +00:00
Mitchell Hashimoto 296ce59f37 Merge pull request #9624 from rottenbytes/TF-9169
Add a note about operator precedence. #9169
2016-10-27 08:14:45 -04:00
James Nugent 47bce79b29 core: Add zipmap interpolation function
This commit adds a new interpolation function, zipmap, which produces a
map given a list of string keys and a list of values of the same length
as the list of keys.

The name comes from the same operation in Clojure (and likely other
functional langauges).
2016-10-26 11:28:36 -05:00
Gustavo 5910e3b8af Adds ‘tittle’ built-in function. (#9087)
The tittle function returns a copy of the string with the first characters of all the words capitalized.
2016-10-26 13:21:32 +01:00
Nicolas Szalay c1be0c51c6 Add a note about operator precedence. #9169 2016-10-26 14:03:50 +02:00
James Turnbull f83c988496 Added another anchor 2016-10-25 03:39:15 -04:00
James Turnbull e0fab2267b I'd like to be able to anchor to functions 2016-10-21 17:28:01 +11:00
James Turnbull affb2c6511 Added list element syntax 2016-10-18 23:37:50 +11:00
Nick Walke b361347812
Added the word string to make more sense 2016-10-07 10:24:06 -05:00
Nick Walke 04d0d0f0ae
Added explicit map and list variable usage
This page did not show how to actually use a list as a list.  The
variables page states that "The usage of maps, list, strings, etc. is
documented fully in the interpolation syntax page", but that wasn't the
case.

I've split them out to list them explicitly and provide examples of
each.

Closes #9037
2016-10-07 10:20:17 -05:00
Radek Simko 43de2afde1
docs: Fix misspelled words 2016-09-12 07:08:00 +01:00
Paul Stack b49fbb5383 Merge pull request #8566 from MiLk/docs/interpolation-template-data
Template are now data sources
2016-09-04 00:30:11 +03:00
zhuk-intetics 3308b974e2 Update interpolation.html.md 2016-08-31 10:19:17 +03:00
Emilien Kenler 95a86cc617
Template are now data sources 2016-08-31 12:04:55 +09:00
alex goretoy 7938eaf76f Fix typo on interpolation.html.md (#8274) 2016-08-17 16:07:52 -05:00
James Nugent 9fa978a45f docs: Fix map key interpolation documentation
Previously was recommending the now-invalid dot syntax for map keys,
change to using HIL indexing.
2016-08-09 16:03:05 -04:00
Cecchi MacNaughton 8d9a9ddebe Correct typo in `length()` documentation (#7947) 2016-08-03 18:48:00 +01:00
James Bardin 2a11f3a138 make variadic syntax consistent in docs 2016-08-02 09:34:29 -04:00