Commit Graph

57 Commits

Author SHA1 Message Date
David Glasser 6cf06bb3ab config: new interpolation function jsonencode 2016-03-29 07:38:58 -07:00
Paul Hinze 293c6ca68c Revert "Revert "core: Add uuid() interpolate function.""
This reverts commit 661be01d9b.
2016-03-21 15:14:30 -05:00
Paul Hinze 661be01d9b Revert "core: Add uuid() interpolate function." 2016-03-15 18:39:34 -05:00
Paul Hinze 1e0b8ea478 core: Add uuid() interpolate function.
Utilizes hashicorp's go-uuid library for proper random seeding setup.
2016-03-10 18:39:07 -06:00
Radek Simko bb5af50b25 docs: Document new interpolation function md5 2016-02-24 13:01:05 +00:00
Radek Simko b90cd618c2 docs: Sort interpolation functions alphabetically 2016-02-24 13:01:05 +00:00
Paul Hinze a7b8a54a83 website: clarify `file()` base location
refs #5213
2016-02-19 09:56:55 -06:00
Radek Simko 14e6f6e4ce docs: Clarify example usage of the signum function 2016-02-07 20:28:58 +00:00
Radek Simko 4edf782260 Merge pull request #4854 from jfromaniello/add_signum_interpolation
Add signum interpolation function
2016-02-07 19:44:16 +00:00
Radek Simko 1018af5662 config: Add docs for new base64sha256 func 2016-01-30 13:19:10 +01:00
Colin Hebert d92d205dd9 rename trim to trimspace 2016-01-30 20:51:28 +11:00
Colin Hebert f5074cd521 Add the trim() interpolation function 2016-01-30 10:28:04 +11:00
José F. Romaniello c8795b8565 Add signum interpolation function
This function returns -1 for negative numbers, 0 for 0 and 1 for positive numbers.

Useful when you need to set a value for the first resource and a different value for the rest of the resources.

Example: `${element(split(",", var.r53_failover_policy), signum(count.index))}`
2016-01-27 12:49:52 -03:00
James Nugent efe27f3eae docs: Add operators for interpolation functions 2016-01-20 16:28:07 -05:00
Matt Moyer c17a6ceb2a Add a sha256(...) interpolation function. 2016-01-16 23:54:04 +00:00
Seth Vargo 8dbc43639d Use HTTPS + www. for links 2016-01-14 16:03:26 -05:00
William Holroyd 7b962006fb Update interpolation.html.md
Small changes to case on interpolation syntaxes, dealing with case.
2016-01-10 22:39:20 -05:00
Joseph Kordish 21fe576cb5 added the function to the docs 2016-01-06 15:19:54 -06:00
Paul Hinze bd23ab35bf docs: update template_file examples
Use the new non-deprecated style.

refs #4025
2015-11-24 09:01:11 -06:00
Matt Morrison 6ecec7fe83 Add coalesce func 2015-11-08 19:34:56 +13:00
Martin Atkins ef161e1c1b Various interpolation functions for CIDR range manipulation.
These new functions allow Terraform to be used for network address space
planning tasks, and make it easier to produce reusable modules that
contain or depend on network infrastructure.

For example:
- cidrsubnet allows an aws_subnet to derive its
  CIDR prefix from its parent aws_vpc.
- cidrhost allows a fixed IP address for a resource to be assigned within
  an address range defined elsewhere.
- cidrnetmask provides the dotted-decimal form of a prefix length that is
  accepted by some systems such as routing tables and static network
  interface configuration files.

The bulk of the work here is done by an external library I authored called
go-cidr. It is MIT licensed and was implemented primarily for the purpose
of using it within Terraform. It has its own unit tests and so the unit
tests within this change focus on simple success cases and on the correct
handling of the various error cases.
2015-10-22 08:10:52 -07:00
Matt Morrison cccc5d03e3 Add lower / upper interpolation functions 2015-10-21 08:16:24 -07:00
Anthony Stanton b62833e7b8 Add documentation for compact() 2015-10-11 16:47:48 +02:00
Martin Atkins 0b85d35e87 Rename base64enc/dec to encode/decode.
There isn't any precedent for abbreviating words in the interpolation
function names, and it may not be clear to all users what "enc" and "dec"
are short for, so instead we'll prefer to spell out the whole words for
improved readability.
2015-10-03 15:12:51 -07:00
Martin Atkins c3d15a2336 Docs for base64 interpolation functions. 2015-10-03 14:49:50 -07:00
Paul Hinze cdcef1c852 Merge pull request #2704 from thegedge/add-index-function
Add a function to find the index of an element in a list.
2015-08-12 17:07:49 -05:00
Cameron Stokes 30d57bf1ec Clarify math operations available for interpolation
As reported in #2782, the math operations, specifically subtraction,
can cause unexpected behavior when resource or variable names use hyphens.

I added clarification about using spaces with math operators as well as
which operations are available.
2015-08-04 11:09:43 -07:00
Paul Hinze 2cea7c7d0c docs: clarify template_file path information
- change example to use the most commonly necessary path format w/
   `path.module`
 - link to path variable page in description

/cc @KFishner
2015-07-31 11:44:07 -05:00
Jason Gedge cf5926ddad Add a function to find the index of an element in a list. 2015-07-13 14:11:30 -04:00
Patrick Lee 80af6825fb changed combine() to concat() in docs
The example of the concat() function uses combine() instead of concat().
2015-07-09 17:04:36 -06:00
Radek Simko 6a60fa4bfe config: concat function supports lists (combines more lists into one) 2015-06-13 08:54:01 +01:00
ketzacoatl 9a0c733c18 Update interpolation.md, doc pattern combining template_file and count
This example is derived from @phinze's [work seen here](https://github.com/hashicorp/terraform/issues/1893#issuecomment-100945306)
2015-05-29 18:24:08 +00:00
7heo ff9b74c7e8 More internal links in template documentation. 2015-05-27 12:22:52 +02:00
Mitchell Hashimoto 0c9e95a32f website: note that interpolations can be escaped 2015-05-13 20:22:14 -07:00
Josh Bleecher Snyder 02e751e356 config: add formatlist
formatlist distributes formatting over lists.
See the docs for details.

As a colleague commented:

"It happens all the time that we want a set of
outputs, but in a slightly different way than
just simple joining or concatting."

formatlist (combined with join)
makes it easy to satisfy those needs.
2015-05-12 16:11:42 -07:00
Paul Hinze a268cc3d81 Merge pull request #1878 from jamesob/doc_for_paramterized_lists
Document work-arounds necessary to parameterize list types.
2015-05-08 17:02:36 -05:00
James O'Beirne a074b33bcf Document work-arounds necessary to parameterize list types.
Related to https://github.com/hashicorp/terraform/issues/57.
2015-05-08 14:49:29 -07:00
Josh Bleecher Snyder 2da7c9a823 website: document templates
While we're here, fix a broken link.
2015-05-04 11:42:05 -07:00
Radek Simko 2078c593a2 conf: docs added for length func 2015-04-15 18:55:49 +01:00
Tomas Doran 2dfb837974 Document the fix to GH-1068 on the website 2015-04-03 15:51:12 +01:00
Mitchell Hashimoto bf43cabcc2 website: document format 2015-03-02 10:27:58 -08:00
Mitchell Hashimoto 68e4d346be website: doc replace 2015-03-02 09:40:24 -08:00
Mitchell Hashimoto e2c912c53d website: update docs for self 2015-02-23 15:04:18 -08:00
Mitchell Hashimoto 45a267111b Merge pull request #885 from brycekahle/split-func
config: add split function
2015-02-20 13:45:01 -08:00
Mitchell Hashimoto 3093268106 website: clarify lookup [GH-531] 2015-02-20 10:04:53 -08:00
Bryce Kahle fa8280a56c Add split docs 2015-02-17 13:24:34 -05:00
Mitchell Hashimoto 577e2420b0 Revert "docs: consistent use of array configuration syntax"
This reverts commit 4893eb8b55.
2015-01-14 09:28:25 -08:00
Emil Hessman 4893eb8b55 docs: consistent use of array configuration syntax
The Terraform configuration syntax defines what arrays are.
Use the word array consistently throughout the documentation
instead of list.

The corresponding JSON datatype is called array as well, and
since the Terraform configuration syntax is interoperable with
JSON it makes sense to use the term array to describe them.
2015-01-13 06:59:12 +01:00
Rob Costanzo 8da91e9636 Added an element interpolation lookup function for accessing a specific index from a list with splat variables 2014-11-07 10:24:21 -08:00
Seth Vargo 073a0f76c5 Add meta descriptions to all pages 2014-10-21 23:21:56 -04:00