Commit Graph

187 Commits

Author SHA1 Message Date
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
Shailesh Yadav 9aa9c15786 English sentence correction (#12612)
English sentence correction. Corrected following:
"map values are merged and all are values are overridden"
to
"map values are merged and all other values are overridden"
2017-03-12 16:11:19 +02:00
Clint 3fdeacdca7 helper/schema: Rename Timeout resource block to Timeouts (#12533)
helper/schema: Rename Timeout resource block to Timeouts

- Pluralize configuration argument name to better represent that there is
one block for many timeouts
- use a const for the configuration timeouts key
- update docs
2017-03-09 14:40:14 -06:00
Clint 2fe5976aec helper/schema: Add configurable Timeouts (#12311)
* helper/schema: Add custom Timeout block for resources

* refactor DefaultTimeout to suuport multiple types. Load meta in Refresh from Instance State

* update vpc but it probably wont last anyway

* refactor test into table test for more cases

* rename constant keys

* refactor configdecode

* remove VPC demo

* remove comments

* remove more comments

* refactor some

* rename timeKeys to timeoutKeys

* remove note

* documentation/resources: Document the Timeout block

* document timeouts

* have a test case that covers 'hours'

* restore a System default timeout of 20 minutes, instead of 0

* restore system default timeout of 20 minutes, refactor tests, add test method to handle system default

* rename timeout key constants

* test applying timeout to state

* refactor test

* Add resource Diff test

* clarify docs

* update to use constants
2017-03-02 11:07:49 -06:00
Mitchell Hashimoto d2f9df37f5 Merge pull request #11922 from hashicorp/f-tf-cli
command: add TF_CLI_ARGS to specify additional CLI args
2017-02-13 15:26:25 -08:00
Mitchell Hashimoto f7e535ed6e
website: update website for TF_CLI_ARGS 2017-02-13 14:51:37 -08:00
Kit Ewbank 549cff56d0 Add 'slice' interpolation function. (#9729) 2017-02-13 21:20:02 +00:00
Mitchell Hashimoto b35b263015 Merge pull request #11329 from hashicorp/f-destroy-prov
Destroy Provisioners
2017-01-26 14:32:21 -08:00
Mitchell Hashimoto 3a1140951b
website: document destroy provisioners 2017-01-20 23:21:29 -08: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
mbfrahry 4d03f26b31 Update terraform.html.md (#10743) 2016-12-15 11:53:41 +00:00
Mitchell Hashimoto da418b2582
website: note about map/var merging 2016-12-10 15:05:58 -05:00
Mitchell Hashimoto 4ab5356ff9
website: update website for conditionals 2016-12-07 20:49:31 -05:00
James Turnbull 034a272cce Fixed note formatting 2016-12-07 12:57:37 -05:00
Walter Dolce 0101f12958 Explicitly say `count` is not supported by modules (#10553)
Reference: https://groups.google.com/forum/#!msg/terraform-tool/T3eB4pZ6waU/5hqs2SyGCAAJ
2016-12-07 16:33:15 +01: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 25d19ef3d0 Merge pull request #10080 from hashicorp/f-tf-version
terraform: support version requirement in configuration
2016-11-14 11:53:30 -08:00
Mitchell Hashimoto df34fa88ce Merge pull request #10076 from hashicorp/f-depend-module
terraform: depends_on can reference entire modules
2016-11-14 11:53:12 -08:00
Mitchell Hashimoto 15f07e0e50
website: correct description for Terraform section 2016-11-12 22:52:27 -08:00
Mitchell Hashimoto 0e2e19c784
website: document required_version 2016-11-12 22:50:28 -08:00
Mitchell Hashimoto cfd3be4856
website: update website for "module.X" depends_on 2016-11-12 08:41:18 -08:00
Mitchell Hashimoto 4f0ccd7794
website: update website to doc output depends_on 2016-11-11 18:17:46 -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
Mitchell Hashimoto bac66430cb
terraform: consistent variable values for booleans
Fixes #6447

This ensures that all variables of type string are consistently
converted to a string value upon running Terraform.

The place this is done is in the `Variables()` call within the
`terraform` package. This is the function responsible for loading and
merging the variables from the various sources and seems ideal for
proper conversion to consistent values for various types. We actually
already had tests to this effect.

This also adds docs that talk about the fake-ish boolean variables
Terraform currently has and about how in future versions we'll likely
support them properly, which can cause BC issues so beware.
2016-10-31 11:22:26 -07: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 15e42ac939 Added provider to meta-param resource docs
I am not sure `provider` IS a meta-param but it looks like one...
2016-10-25 06:56:33 -04:00
James Turnbull f83c988496 Added another anchor 2016-10-25 03:39:15 -04:00
James Turnbull 0d5f86bd0d Cleanup of the resources and variables pages
1. Added a heredoc example to the variables page.
2. Tidied up and added headers.
3. Some minor whitespace and grammar edits.
2016-10-24 20:05:25 +11:00
James Turnbull e0fab2267b I'd like to be able to anchor to functions 2016-10-21 17:28:01 +11:00
clint shryock b87a071bfe fix broken link 2016-10-20 10:09:15 -05:00
James Turnbull affb2c6511 Added list element syntax 2016-10-18 23:37:50 +11:00
James Turnbull 68b88f273e Some edits to the variables sections
1. Fixes a duplicate word.
2. Fixes a variety of formatting.
3. Re-structures variable assignment section.
4. Sets Notes to consistent style.
2016-10-18 04:35:39 +11:00