Commit Graph

362 Commits

Author SHA1 Message Date
Martin Atkins 67d95b97ce lang/funcs: templatefile requires valid variable names
Previously the templatefile function would permit any arbitrary string as
a variable name, but due to the HCL template syntax it would be impossible
to refer to one that isn't a valid HCL identifier without causing an
HCL syntax error.

The HCL syntax errors are correct, but don't really point to the root
cause of the problem. Instead, we'll pre-verify that the variable names
are valid before we even try to render the template, and given a
specialized error message that refers to the vars argument expression as
the problematic part, which will hopefully make the resolution path
clearer for a user encountering this situation.

The syntax error still remains for situations where all of the variable
names are correct but e.g. the user made a typo referring to one, which
makes sense because in that case the problem _is_ inside the template.
2020-02-25 10:19:46 -05:00
James Bardin 4185aa93f5 doc typo 2020-02-13 21:27:35 -05:00
James Bardin a765d69fb0
Merge pull request #24032 from hashicorp/jbardin/map-funcs
make the merge function more precise
2020-02-12 10:51:05 -05:00
James Goodhouse 25bfe7337b
lang: add setsubtract function (#23424)
* add setdifference and setsubtract functions and docs
* remove setdifference as it is not implemented correct in underlying lib

* Update setintersection.html.md
* Update setproduct.html.md
* Update setunion.html.md
2020-02-06 12:49:11 -05:00
Nick Fagerlund 6494591ec1 website: Remove extra copy of "Getting Started", update links
This guide now lives at:

- https://learn.hashicorp.com/terraform#getting-started

...and terraform.io has been redirecting to there for quite a while. This commit
removes the extra copy so that the text of the two versions doesn't drift, and
updates existing links to point to the new location.
2020-02-05 14:58:30 -08:00
James Bardin 529271e0be update merge docs to match behavior 2020-02-05 15:47:36 -05:00
Pam Selle 4e0879c486 Document for_each key requirements 2020-01-30 17:18:16 -05:00
Pam Selle 213189c3d0 Use a real resource 2020-01-24 13:47:51 -05:00
Pam Selle 885ff69c50 Update docs to generalize/use fake example vs one that could be misleading 2020-01-24 12:44:07 -05:00
Kristin Laemmert 4c221cbcb9
website: document optional syntax for required_providers setting (#23854) 2020-01-14 07:59:18 -05:00
ZMI-RyanMann 66411b5ca0 website/docs: Updated documentation for range function pseudocode (#23823) 2020-01-13 09:17:47 -05:00
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
Martin Atkins 02576988c1 lang: "try" and "can" functions
These are intended to make it easier to work with arbitrary data
structures whose shape might not be known statically, such as the result
of jsondecode(...) or yamldecode(...) of data from a separate system.

For example, in an object value which has attributes that may or may not
be set we can concisely provide a fallback value to use when the attribute
isn't set:

    try(local.example.foo, "fallback-foo")

Using a "try to evaluate" model rather than explicit testing fits better
with the usual programming model of the Terraform language where values
are normally automatically converted to the necessary type where possible:
the given expression is subject to all of the same normal type conversions,
which avoids inadvertently creating a more restrictive evaluation model
as might happen if this were handled using checks like a hypothetical
isobject(...) function, etc.
2020-01-10 15:23:25 -08:00
Pam Selle 76831793d0
Merge pull request #23265 from lucazz/update_docs_for_outputs
Update Output values docs
2019-12-17 07:34:46 -05:00
Pam Selle 3bcea18d1c
Update outputs.html.md 2019-12-17 07:33:11 -05:00
Pam Selle 31b56207e0
Update outputs.html.md 2019-12-17 07:32:22 -05:00
Igor Vodka be89975667
Fix markdown being misused in docs 2019-12-16 16:29:47 +03:00
Martin Atkins bfbd00a23c website: Note about using jsonencode/yamlencode in templatefile
It's a common source of errors to try to produce JSON or YAML syntax
using string concatenation via our template language but to miss some
details like correct string escaping, quoting, required commas, etc.

The jsonencode and yamlencode functions are a better way to generate JSON
and YAML, but it's not immediately obvious that both of these functions
are available for use in external templates (via templatefile) too.

Given that questions related to this come up a lot in our community forum
and elsewhere, it seems worth having a documentation section to show the
pattern of having a template that consists only of a single function call.
2019-12-11 12:57:01 -08:00
Graham Davison e32641c9ce website/docs: Corrects function name in `cidrsubnets` function documentation (#23473) 2019-11-26 07:50:32 -05:00
George Christou 91100c003c lang/funcs: Add more `trim*` functions (#23016)
* lang/funcs: Add `trim*` functions
2019-11-18 08:31:44 -05:00
Yuki Ito 72c910cebc website: Fix typographical errors in the docs for base64sha256/512 2019-11-08 09:43:27 -08:00
Lucas do Amaral Saboya 806397803c
Update Output values docs. 2019-11-02 17:56:16 -03:00
Martin Atkins f8a32f0b83 website: Consistently recommend the required_providers block
Previously we were inconsistent in whether we were recommending the
new required_providers block or the "version" setting inside a "provider"
block.
2019-10-28 15:56:12 -07:00
Martin Atkins 7c110f9cf8 website: provider version constraints in modules 2019-10-28 15:56:12 -07:00
Thomas Alton ddd0d2a442 website: Provider proxy config only supports alias 2019-10-28 15:56:12 -07:00
Thomas Alton 24386bcfcb website: Link to `required_providers` block from provider documentation 2019-10-28 15:56:12 -07:00
Pam Selle 5b453f6ba9
Merge pull request #23186 from pselle/pselle/docs-syntax-link
Docs around splat and for_each
2019-10-24 16:15:18 -04:00
Pam Selle 566f22a34e Docs around splat 2019-10-24 16:09:34 -04:00
Pam Selle 9ee19eac94
Merge pull request #23177 from hashicorp/pselle/docs-syntax-link
Fix link in syntax docs
2019-10-24 11:59:08 -04:00
Pam Selle 0d4ea7d9ad Fix link in syntax docs 2019-10-24 11:57:08 -04:00
Kris Luminar 8bb0491dc1 website: clarify where you run the `terraform init` command 2019-10-24 08:41:00 -07:00
charlottemach e3d38046dc website/docs: replace outdated tag syntax (#23111)
Fixes #21614
2019-10-24 11:23:17 -04:00
Martin Atkins 047733d20c website: Full examples for for_each with flatten and setproduct
A very common question since we launched the two repetition constructs
is how to deal with situations where the input data structure doesn't
match one-to-one with the desired configuration.

This adds some full worked examples of two common situations that have
come up in questions. To avoid adding a lot of extra content to the
already-large "expressions" and "resources" pages, the main bulk of this
new content lives with the relevant functions themselves as a full example
of one thing they are good for, and then we'll link to them from the two
general documentation sections where folks are likely to be reading when
they encounter the problem.
2019-10-11 13:41:58 -07:00
Pam Selle 2a50bc6b5a More in expressions, removed extra resource thing 2019-10-07 14:46:20 -04:00
Pam Selle 67e314dcbe Some docs updates to clarify splat confusion 2019-10-07 14:44:33 -04:00
Nick Fagerlund f6e648cc8b website: Document behavior of `self` object for provisioners 2019-10-03 15:12:18 -07:00
Martin Atkins 39e609d5fd vendor: switch to HCL 2.0 in the HCL repository
Previously we were using the experimental HCL 2 repository, but now we'll
shift over to the v2 import path within the main HCL repository as part of
actually releasing HCL 2.0 as stable.

This is a mechanical search/replace to the new import paths. It also
switches to the v2.0.0 release of HCL, which includes some new code that
Terraform didn't previously have but should not change any behavior that
matters for Terraform's purposes.

For the moment the experimental HCL2 repository is still an indirect
dependency via terraform-config-inspect, so it remains in our go.sum and
vendor directories for the moment. Because terraform-config-inspect uses
a much smaller subset of the HCL2 functionality, this does still manage
to prune the vendor directory a little. A subsequent release of
terraform-config-inspect should allow us to completely remove that old
repository in a future commit.
2019-10-02 15:10:21 -07:00
Martin Atkins 25222fccd5 website: Link to hashicorp/subnets/cidr for cidrsubnets docs
The cidrsubnets function signature is intentionally very low-level and
focused on the core requirement of generating addresses. This registry
module then wraps it with some additional functionality to make it more
convenient to generate and use subnet address ranges.
2019-09-23 13:15:44 -07:00
Martin Atkins f84ab99b7d lang/funcs: cidrsubnets function
This is a companion to cidrsubnet that allows bulk-allocation of multiple
subnet addresses at once, with automatic numbering.

Unlike cidrsubnet, cidrsubnets allows each of the allocations to have a
different prefix length, and will pack the networks consecutively into the
given address space. cidrsubnets can potentially create more complicated
addressing schemes than cidrsubnet alone can, because it's able to take
into account the full set of requested prefix lengths rather than just
one at a time.
2019-09-20 15:58:01 -07:00
Jeet Parekh bcc69c05bb lang/funcs: parseint function 2019-09-17 15:33:22 -07:00
The Terraform Team 9b6fcc4e86
Merge pull request #22755 from echernyavskiy/patch-1
website/docs: Fix typo in variables.html
2019-09-17 11:46:57 -04:00
The Terraform Team 669242ee14
Merge pull request #22777 from acsbendi/patch-1
website/docs: Fixed typo in documentation about expressions
2019-09-17 11:42:32 -04:00
Nick Fagerlund 655bbfdf28 website: Add complex type example to variables.html 2019-09-13 12:58:15 -07:00
Bendegúz Ács 8f9d368a25
Fixed typo in documentation about expressions 2019-09-12 14:16:13 +02:00
Evgeny Chernyavskiy 5f16669362
Fix typo in variables.html 2019-09-10 10:29:37 -04:00
Pam Selle f9ebae749c
Merge pull request #22707 from vsimon/spell
docs: Minor spelling and typo fixes
2019-09-06 11:46:01 -04:00
Vicken Simonian 853a0e0677 docs: Minor spelling and typo fixes 2019-09-05 10:08:34 -07:00
Brian Flad 19cf34114f
lang/funcs: Switch fileset() function glob implementation to github.com/bmatcuk/doublestar to support additional glob patterns
This allows the usage of the glob patterns `**` and `{alternative1,...}` to simplify Terraform configuration logic for more complex file matching.
2019-08-30 20:22:03 -04:00
Brian Flad af7f6ef441
lang/funcs: Update fileset() function to include path as separate first argument, automatically trim the path argument from results, and ensure results are always canonical with forward slash path separators
Reference: https://github.com/hashicorp/terraform/pull/22523#pullrequestreview-279694703

These changes center around better function usability and consistency with other functions. The function has not yet been released, so these breaking changes can be applied safely.
2019-08-30 20:19:44 -04:00
Pam Selle 75d3f1e62e
Merge pull request #22614 from heimweh/patch-1
website: fix expression typo
2019-08-28 16:22:48 -04:00
Kristin Laemmert 212d5b0b1c
Mildwonkey/docs updates (#22623)
* website/formatdate: update example

The given example was showing HOUR:MONTH instead of HOUR:MINUTE

Fixes #22598

* website/import: remove reference to no-longer-working option

Users can no longer supply `-config=""` to tell Terraform not to load
configuration for import.

Fixes #22294

* website/provisioners: `host` is required in connection blocks

Fixes #21877

* website/variables: clarify variable definition precedence

It was not entirely obvious that a variable could not be assigned
multiples times in a single source.

Fixes #21682

* website/backend/local: add `workspace_dir` attribute

Fixes #21391

* website/output: `sensitive` outputs are redacted in output

Fixes #21502

* website/backends: sidebar order tweak

It makes sense for backend 'configuration' to appear before 'init'.

Fixes #13796

* Revert "website/formatdate: update example"

This reverts commit ccd93c86ddd15a21625c0767702ee1cc62e77254.
2019-08-28 15:34:22 -04:00
Pam Selle 6e614f3465 Fix docs mistake/misleading 2019-08-28 11:38:26 -04:00
Alexander Hellbom 99c59b833e
website: fix expression typo
exression -> expression
2019-08-28 15:16:49 +02:00
Brian Flad d48d9ed766
lang/funcs: Add fileset function
Reference: https://github.com/hashicorp/terraform/issues/16697

Enumerates a set of regular file names from a given glob pattern. Implemented via the Go stdlib `path/filepath.Glob()` functionality. Notably, stdlib does not support `**` or `{}` extended patterns. See also: https://github.com/golang/go/issues/11862

To support the extended glob patterns, it will require adding a dependency on a third party library or adding our own matching code.
2019-08-20 04:50:01 -04:00
Nick Fagerlund 3aa909ac6e website: Update URLs and name references for Terraform Cloud rebrand
The Terraform Enterprise brand has now been split into two parts:

- Terraform Cloud is the application that helps teams use Terraform together,
  with remote state storage, a shared run environment, etc.
- Terraform Enterprise is the on-premise distribution that lets enterprises run
  a private instance of the Terraform Cloud application.

The former TFE docs have been split accordingly.
2019-08-16 15:55:29 -07:00
Nick Fagerlund 979a2fa6d1 website: Align `count` and `for_each` sections
- Make these descriptions more similar, since they do basically the same thing.
- Add some subheaders to break up the wall of text and make it more skimmable.
- Nudge people more firmly toward `for_each` if they need to actually
  incorporate data from a variable into their instances.
- Add version note so you know whether you can use this yet.
2019-08-08 14:13:10 -07:00
Martin Atkins 135afaeb9c lang: "regex" and "regexall" functions
These existing upstream cty functions allow matching strings against
regular expression patterns, which can be useful if you need to consume
a non-standard string format that Terraform doesn't (and can't) have a
built-in function for.
2019-08-06 11:52:14 -07:00
Martin Atkins 5cb80c43c1 website: example of csvdecode with for_each
We added the csvdecode function originally with the intent of it being
used with for_each, but because csvdecode was released first we had a
section in its documentation warning about the downsides of using it with
"count", since that seemed like something people would be likely to try.

With resource "for_each" now merged, we can replace that scary section
with a more positive example of using these two features together.

We still include a paragraph noting that "count" _could_ be used here, but
with a caution against doing so. This is in the hope of helping users
understand the difference between these two patterns and why for_each is
the superior choice for most situations.
2019-07-31 12:43:16 -07:00
Pam Selle 1b25cb7d4a Docs updates for data resources, update expressions ref 2019-07-26 11:22:10 -04:00
Pam Selle 7d905f6777 Resource for_each 2019-07-22 10:51:16 -04:00
Pam Selle 19b8a9c02f
Merge pull request #21715 from petems/minor_spelling_fixes
Minor spelling fixes
2019-07-12 13:54:19 -04:00
Chris Arcand 275ecf96f2
Merge pull request #22042 from hashicorp/012-replace-regex-docs
Added regex details to replace() docs
2019-07-12 12:46:31 -05:00
Pam Selle 5cd551f716
Merge pull request #21887 from jmcgeheeiv/patch-1
Add "leading zeros" for the sake of SEO
2019-07-12 13:42:55 -04:00
Chris Arcand 22385c3198 Added regex details to replace() docs 2019-07-12 11:42:20 -05:00
Andreas Sommer 042aead714 lang/funcs: add "abspath" function (#21409) 2019-07-02 08:30:30 -04:00
Ben Hadfield 0a1c0d6c24 website: Fix typo in Arithmetic Operators section (#21945) 2019-07-01 10:42:26 -07:00
John McGehee 4bb6f0dff2
Add "leading zeros" for the sake of SEO
The search "terraform leading zero" does not find the `format()`
function, which is perfectly capable of adding leading zeros.
Thus I have added this one word to help people find `format()`.
2019-06-25 16:13:05 -07:00
Martin Atkins 1bba574fe9 website: Document ignore_changes for individual map elements
This also includes a previously-missing test that verifies the behavior
described here, implemented as a planning context test for consistency
with how the other ignore_changes tests are handled.
2019-06-18 17:37:24 -07:00
petems 239c84ef4b Minor spelling fixes
`docker run    -v $(pwd):/scripts    --workdir=/scripts    nickg/misspell:latest    misspell -w -source=text website/`
2019-06-13 15:36:14 +01:00
Lars Eric Scheidler aa07806bfc lang/funcs: New "uuidv5" function
This generates name-based uuids, rather than pseudorandom uuids as with the
"uuid" function.
2019-06-07 14:38:22 -07:00
Alisdair McDiarmid 812ba80dae Remove links to legacy Terraform Enterprise docs
These docs are due to be removed, so these links will shortly break.
Removal is in hashicorp/terraform-website#812
2019-06-07 13:47:12 -04:00
Martin Atkins 8da3d269b0 website: Further elaboration on the "any" type constraint
There have been a few questions about this so far which indicated that the
previous docs for this feature were very lacking. This is an attempt to
describe more completely what "any" means, and in particular that it isn't
actually a type at all but rather a placeholder for a type to be selected
dynamically.
2019-06-06 13:31:17 -07:00
Martin Atkins 127cbeeda2 website: Additional information about "dynamic" blocks
Based on some common questions and feedback since the v0.12.0 release,
here we add some small additional content to the documentation for
"dynamic" blocks, covering how to access the keys of the collection being
iterated over and how to fold multiple collections into a single one to
achieve the effect of a nested iteration.
2019-06-05 06:49:16 -07:00
Martin Atkins 382e1ca821 lang: yamldecode and yamlencode functions
These follow the same principle as jsondecode and jsonencode, but use
YAML instead of JSON.

YAML has a much more complex information model than JSON, so we can only
support a subset of it during decoding, but hopefully the subset supported
here is a useful one.

Because there are many different ways to _generate_ YAML, the yamlencode
function is forced to make some decisions, and those decisions are likely
to affect compatibility with other real-world YAML parsers. Although the
format here is intended to be generic and compatible, we may find that
there are problems with it that'll we'll want to adjust for in a future
release, so yamlencode is therefore marked as experimental for now until
the underlying library is ready to commit to ongoing byte-for-byte
compatibility in serialization.

The main use-case here is met by yamldecode, which will allow reading in
files written in YAML format by humans for use in Terraform modules, in
situations where a higher-level input format than direct Terraform
language declarations is helpful.
2019-06-04 16:24:09 -07:00
Martin Atkins f9a73d48db lang: "range" function
This is similar to the function of the same name in Python, generating a
sequence of numbers as a list that can then be used in other
sequence-oriented operations.

The primary use-case for it is to turn a count expressed as a number into
a list of that length, which can then be iterated over or passed to a
collection function to produce that number of something else, as shown
in the example at the end of its documentation page.
2019-06-04 16:20:17 -07:00
Justin Weissig 7335f1fdc8 docs: fixed typo (#21297)
Spelling: varable/variable.
2019-05-21 15:55:44 -04:00
Justin Weissig 778cae91a8 website: fix typo in the 'terraform' block documentation page 2019-05-20 14:37:03 -07:00
Martin Atkins 5af8bcff2f
website: correct the synopsis on the formatdate function page
Was using "format" instead of "formatdate".
2019-05-17 14:42:00 -07:00
Peter 02d03d2d25 website: Fix odd spacing on the provider configuration syntax page 2019-05-17 08:45:08 -07:00
Alexis 00cc5781ab website: Fix typo in the configuration language introduction page 2019-05-08 16:31:37 -07:00
Justin Weissig aa4c43b341 website: Fix typo on the "expressions" documentation page 2019-05-08 10:58:22 -07:00
Nick Fagerlund 0172fed7d4 (website) Adjust intro of attr-blocks page
- Note that we intentionally omitted it from the sidebar, to reduce confusion.
- Write a summary up top so you can stop reading sooner if you don't actually need this.
2019-05-06 13:07:54 -07:00
Kristin Laemmert b1d0b1383f
lang/funcs: remove sethaselement function and documentation (#21164)
`contains` and `sethaselement` are effectively the same function, and
`contains` works with `sets` thanks to automatic HCL conversion.
2019-05-02 10:47:19 -04:00
Justin Weissig 299e0432bc
Fixed typo
Fixed typo: cafeful/careful.
2019-04-30 00:06:01 -07:00
Kristin Laemmert 394cf7f25e
lang/funcs: add acc tests for functions (#21112)
* lang/funcs: testing of functions through the lang package API
The function-specific unit tests do not cover the HCL conversion that happens when the functions are called in a terraform configuration. For e.g., HCL converts sets to lists before passing it to the function. This means that we could not test passing a set in the function _unit_ tests.
This adds a higher-level acceptance test, plus a check that every (pure) function has a test.

* website/docs: update function documentation
2019-04-29 13:11:28 -04:00
Justin Weissig 3d80aed6fe website/docs: Fixed Typo (#21137)
Fixed typo: separtely/separately.
2019-04-29 09:19:10 -04:00
Kit Ewbank efc08de5d6 lang/funcs: add 'strrev' interpolation function. (#21091) 2019-04-24 14:52:39 -04:00
Ross McKelvie ce1fba5817 website: update required_providers block for terraform 0.12 compatibility 2019-04-19 11:54:19 -07:00
Martin Atkins 533cbf4c3f
website: Update "Local Values" docs to use v0.12 syntax in example
There was some leftover v0.11-style interpolation syntax here.

We prefer to use a "naked" expression in situations like this where the result
isn't a string, because interpolations returning non-strings is a common source
of confusion for new users.
2019-04-18 09:03:34 -07:00
Kristin Laemmert d4669246c7
funcs/coalesce: return the first non-null, non-empty-string element from a sequence (#21002)
* funcs/coalesce: return the first non-null, non-empty element from a
sequence.

The go-cty coalesce function, which was originally used here, returns the
first non-null element from a sequence. Terraform 0.11's coalesce,
however, returns the first non-empty string from a list of strings.

This new coalesce function aims to preserve terraform's documented
functionality while adding support for additional argument types. The
tests include those in go-cty and adapted tests from the 0.11 version of
coalesce.

* website/docs: update coalesce function document
2019-04-12 13:57:52 -04:00
Martin Atkins ac2052f0bb website: correct the title of the "matchkeys" function page 2019-04-04 15:35:13 -07:00
Martin Atkins 99f2623d10 website: Documentation of the special "attributes as blocks" mode
The re-introduction of some of the ambiguity between argument and nested
block syntax (for compatibility with existing provider patterns)
unfortunately leads to some interesting consequences for attributes using
this mode.

While the behavior is generally as before in straightforward cases, this
page aims to spell out some of the different usage patterns explicitly
for the benefit of those writing more complex configurations, such as
generic re-usable modules where using argument vs. block syntax leads to
some real differences.

This page is intentionally not linked from anywhere in the part of the
website maintained in the Terraform repository. Instead, it can be linked
from the provider documentation for any argument where this pattern is
used, to help users understand the ways in which that argument might
deviate from the usual behaviors of arguments vs. nested blocks.
2019-04-04 13:49:37 -07:00
Jeff 3110dde1d1 Fix docs typo (#20924)
* fix docs typo

* restore trailing newline
2019-04-04 11:21:36 -04:00
Kristin Laemmert 39ef97beff
website: adding examples of complex variables on the command line (#20871) 2019-04-01 07:51:17 -04:00
Martin Atkins f302747077 website: Additional explanation for cidrsubnet function
Some users are not accustomed to thinking of IP addresses in a bitwise
fashion, so the hope here is to give enough of an introduction to that way
of thinking for the reader to understand what the "newbits" and "netnum"
arguments represent.
2019-03-26 10:04:29 -07:00
Nick Fagerlund 428a2c05e7
website: Expand output values docs (#20790)
For 0.11 I just specified the naming rules; for 0.12, I added some info about
referencing values and tightened up the layout of the optional arguments.

This commit also syncs up descriptions of `depends_on`.
2019-03-22 15:08:55 -07:00
Nick Fagerlund cb4f3004da website: Fix several spelling errors 2019-03-21 18:12:11 -07:00
Martin Atkins 096b1bb87b lang/funcs: Port the "reverse" function from the old functions set
This has the same functionality as the "reverse" function that was
implemented in the "config" package, but adapted to the new language type
system.
2019-03-19 17:32:19 -07:00
Tomas Chmelevskij 036a1e259e website: Typo fix (#20629) 2019-03-19 11:26:25 -07:00
PenelopeFudd cf0ed422b2 website: Added missing doublequotes. (#20696) 2019-03-19 11:23:24 -07:00
PenelopeFudd d27651b305 website: Typo in link to the templatefile function page 2019-03-15 14:12:26 -07:00
PenelopeFudd 247faca59d website: formatdate function in the navigation sidebar 2019-03-15 09:51:47 -07:00
Nick Fagerlund 34e90ff3c1 website: Fix broken links to modules/usage and modules/create
As part of this, I'm copying the entire text of the 0.12
docs/configuration/modules.html page into docs/configuration-0-11/modules.html —
some of the 0.11 pages needed to be able to link to the moved content, I
didn't want to jump versions jarringly, and a close reading didn't reveal
anything in there that's inaccurate for 0.11.
2019-03-14 10:38:52 +00:00
Nick Fagerlund 50f76dd566 website: fix broken anchor link (to #for-expressions) 2019-03-14 10:38:52 +00:00
Nick Fagerlund 71af3bc3ec website: Fix nav link activation for json syntax page 2019-03-14 10:38:07 +00:00
Gyorgy Hrabovszki 2b726a892f website: Fix typo in the Local Values documentation 2019-03-13 09:48:54 -07:00
Rupesh Reddy Tumu fddb52f05c website: Fix various typos in the config function documentation 2019-03-11 13:59:12 -07:00
Martin Atkins 36bb9b462c website: "for" expression examples to use canonical formatting
The "terraform fmt" command produces a different canonical form than we
were showing in our examples here. Our examples should always reflect the
conventions applied by "terraform fmt" to avoid confusion.

(This particular decision is a pragmatic one because the formatter design
needs to use the same rules for the colon in the ? : conditional operator
as for the colon in "for" expressions.)
2019-03-11 08:23:13 -07:00
Martin Atkins 0a9959cbe4 website: References to Resource Attributes
Since references to attributes of resources are by far the most common
reference type, and the mapping of resource type config to the attributes
is not always obvious, here we give some real examples of patterns for
accessing different configuration constructs within resource blocks along
with the resource type's exported attributes.

Since we don't have any real examples of labelled nested blocks yet (the
current SDK doesn't support them) I've included a hypothetical example for
now just to establish the patterns around them in preparation for
beginning to introduce them as we roll out this feature in the SDK.
2019-03-11 08:23:13 -07:00
Martin Atkins 9336c7fba3 website: Revamped module-authoring docs for Terraform v0.12
As well as some general consolidation and reorganizing, this also includes
some updated advice for making the best use of new Terraform v0.12
features to create infrastructure building-blocks.

In particular, the "Module Usage" documentation is now consolidated into
the configuration section in order to bring all of our general language
documentation together, and the top-level "Modules" section is now
primarily focused on module _authors_ as an audience, covering topics such
as publishing modules and designing them for reuse.
2019-03-05 14:14:06 -08:00
Kristin Laemmert 21f6e3dffd
Mildwonkey/012 docs updated (#20542)
* docs: update plan command documentation. Fixes #19235

* docs: added a missing reserved variable name. Fixes #19159.

* website: add note that resource names cannot start with a number

* website: add some notes to the 0.12 upgrade guide
2019-03-01 12:30:51 -08:00
John Slee 8f7b897d0c website: typo in outputs doc (#20520) 2019-03-01 08:25:49 -08:00
Martin Atkins 6cd6f0275c website: Fix some broken links
In all the shuffling of these docs for v0.12 some of the links ended up
not lining up quite right.
2019-02-28 16:21:09 -08:00
Nick Fagerlund 2c50808bbb website: Version notes: Add new -> old links to 0.12 language docs (function pages) 2019-02-01 17:20:54 -08:00
Nick Fagerlund 4a190127b9 website: Version notes: Add new -> old links to 0.12 language docs (except function pages) 2019-02-01 17:20:54 -08:00
Nick Fagerlund b726cc4ba9 website: Update H1 header of 0.12 index.html 2019-02-01 17:20:54 -08:00
Martin Atkins 954d38e870 lang: New file-hashing functions
In prior versions, we recommended using hash functions in conjunction with
the file function as an idiom for detecting changes to upstream blobs
without fetching and comparing the whole blob.

That approach relied on us being able to return raw binary data from
file(...). Since Terraform strings pass through intermediate
representations that are not binary-safe (e.g. the JSON state), there was
a risk of string corruption in prior versions which we have avoided for
0.12 by requiring that file(...) be used only with UTF-8 text files.

The specific case of returning a string and immediately passing it into
another function was not actually subject to that corruption risk, since
the HIL interpreter would just pass the string through verbatim, but this
is still now forbidden as a result of the stricter handling of file(...).

To avoid breaking these use-cases, here we introduce variants of the hash
functions a with "file" prefix that take a filename for a disk file to
hash rather than hashing the given string directly. The configuration
upgrade tool also now includes a rule to detect the documented idiom and
rewrite it into a single function call for one of these new functions.

This does cause a bit of function sprawl, but that seems preferable to
introducing more complex rules for when file(...) can and cannot read
binary files, making the behavior of these various functions easier to
understand in isolation.
2019-01-25 10:18:44 -08:00
Martin Atkins 2f8f7d6f4d lang/funcs: Type conversion functions
It's not normally necessary to make explicit type conversions in Terraform
because the language implicitly converts as necessary, but explicit
conversions are useful in a few specialized cases:

- When defining output values for a reusable module, it may be desirable
  to force a "cleaner" output type than would naturally arise from a
  computation, such as forcing a string containing digits into a number.
- Our 0.12upgrade mechanism will use some of these to replace use of the
  undocumented, hidden type conversion functions in HIL, and force
  particular type interpretations in some tricky cases.
- We've found that type conversion functions can be useful as _temporary_
  workarounds for bugs in Terraform and in providers where implicit type
  conversion isn't working correctly or a type constraint isn't specified
  precisely enough for the automatic conversion behavior.

These all follow the same convention of being named "to" followed by a
short type name. Since we've had a long-standing convention of running all
the words together in lowercase in function names, we stick to that here
even though some of these names are quite strange, because these should
be rarely-used functions anyway.
2019-01-17 10:01:47 -08:00
Martin Atkins da51e72cbb lang/functions: set functions from cty
The sethaselement, setintersection, and setunion functions are defined in
the cty stdlib. Making them available in Terraform will make it easier to
work with sets, and complement the currently-Terraform-specific setproduct
function.

In the long run setproduct should probably move into the cty stdlib too,
but since it was submitted as a Terraform function originally we'll leave
it here now for simplicity's sake and reorganize later.
2019-01-16 09:57:16 -08:00
Martin Atkins edb5f82de1 lang/funcs: Convert the "setproduct" function to the new approach
In our new world it produces either a set of a tuple type or a list of a
tuple type, depending on the given argument types.

The resulting collection's element tuple type is decided by the element
types of the given collections, allowing type information to propagate
even if unknown values are present.
2019-01-16 09:57:16 -08:00
Martin Atkins d0e6a4c69a lang: Add "formatdate" function
We missed this one on a previous pass of bringing in most of the cty
stdlib functions.

This will resolve #17625 by allowing conversion from Terraform's
conventional RFC 3339 timestamps into various other formats.
2019-01-07 09:10:14 -08:00
Martin Atkins c753df6a93 lang/funcs: templatefile function
This function is similar to the template_file data source offered by the
template provider, but having it built in to the language makes it more
convenient to use, allowing templates to be rendered from files anywhere
an inline template would normally be allowed:

    user_data = templatefile("${path.module}/userdata.tmpl", {
      hostname = format("petserver%02d", count.index)
    })

Unlike the template_file data source, this function allows values of any
type in its variables map, passing them through verbatim to the template.
Its tighter integration with Terraform also allows it to return better
error messages with source location information from the template itself.

The template_file data source was originally created to work around the
fact that HIL didn't have any support for map values at the time, and
even once map support was added it wasn't very usable. With HCL2
expressions, there's little reason left to use a data source to render
a template; the only remaining reason left to use template_file is to
render a template that is constructed dynamically during the Terraform
run, which is a very rare need.
2018-12-21 08:06:14 -08:00
Nick Fagerlund 17873ae61b website: Update functions section page titles 2018-12-20 14:20:42 -08:00
Nick Fagerlund 9f85e6d5cc website: Update configuration language section page titles 2018-12-20 14:20:42 -08:00
Nick Fagerlund d2abdc23ac website: Structural edit of configuration language docs
This commit is a wide-ranging set of edits to the pages under
/docs/configuration. Among other things, it

- Separates style conventions out into their own page.
- Separates type constraints and conversion info into their own page.
- Conflates similar complex types a little more freely, since the distinction is
  only relevant when restricting inputs for a reusable module or resource.
- Clarifies several concepts that confused me during edits.
2018-12-20 14:20:42 -08:00
Nick Fagerlund 7d5db9522f
website: Fix plugin path on Windows (#19423)
...and one other reference to the application data directory.

Context:

https://docs.microsoft.com/en-us/windows/desktop/shell/knownfolderid#folderid_roamingappdata

In newer Windows versions, the folder accessible as `%APPDATA%` (and via various
APIs) is actually at something like "documents and settings\user\application
data\roaming", while earlier versions omit the "\roaming" part of the path. This
means you can confuse people by referring to the "application data" directory by
its human name, because "roaming" is the real application data directory, but it
looks like a subdirectory of "application data".

Thus, it's less confusing to just use the `%APPDATA%` variable, with the added
benefit that you can copy and paste the path and it'll just work in most places.
2018-11-20 16:54:18 -08:00
Michael Irwin 47047aa637
Small grammar fix for lifecycle docs 2018-10-22 22:34:11 -04:00
Radek Simko edaa4bbc82
lang: Add fileexists function 2018-10-17 10:18:07 +01:00
Martin Atkins 1360948a41 website: document the functions "keys", "lookup", and "values"
I missed these on the first pass because in the legacy function table they
are, for some reason, added in a different place than the others.
2018-10-16 18:49:20 -07:00
Kristin Laemmert b6d3d69d3a port cidr functions 2018-10-16 18:49:20 -07:00
Kristin Laemmert 602b59cdc4 porting functions 2018-10-16 18:49:20 -07:00
Kristin Laemmert 9aa9b18658 porting crypto functions 2018-10-16 18:49:20 -07:00
Kristin Laemmert 1a5299efcb porting encoding functions 2018-10-16 18:49:20 -07:00
Martin Atkins 60ad24229f website: Link from Configuration index to Resource page
Since the index page is long, by the time the reader reaches the end of
it the relevant portion if the navigation is unlikely to be visible. To
compensate for this, we'll link to the first sub-section and thus give
the user an opportunity to notice the navigation structure for the rest
of the pages.
2018-10-16 18:48:28 -07:00
Martin Atkins 6549f24d88 website: Remove the "interpolation" docs page
This has now been superseded by the expressions.html.md file in the same
directory. As part of deploying this, the former URL for this page must
be redirected to the expressions page to retain a target for any
existing links on third-party sites.
2018-10-16 18:48:28 -07:00
Martin Atkins c060ecd0a5 website: Document the JSON configuration syntax 2018-10-16 18:47:33 -07:00
Martin Atkins a6749f9efc website: Expand documentation of Override Files
This kinda-weird feature was previously quite severely under-documented in
terms of exactly what effect it has. This new documentation for it first
attempts to frame it as something that should be rarely used, and then
explains in more detail exactly how it behaves for different top-level
block types within the configuration.
2018-10-16 18:47:33 -07:00
Martin Atkins b3239e8f1f website: Update the "Terraform Settings" page for new style
As part of revamping the "Configuration" portion of the website for the
v0.12 release, here we update the Terraform Settings page to use a similar
"guide-like" writing style as the other updated pages in this section.
2018-10-16 18:47:33 -07:00
Martin Atkins d72d9fde16 website: Document the index and attribute syntaxes 2018-10-16 18:47:33 -07:00
Martin Atkins 83a16e3deb website: Docs for all of the IP address calculation functions 2018-10-16 18:47:33 -07:00
Martin Atkins 7cb1de9f30 website: Docs for all of the hash/crypto functions 2018-10-16 18:47:33 -07:00
Martin Atkins 46f8208727 website: Docs for all of the Date and Time functions 2018-10-16 18:47:33 -07:00
Martin Atkins a35c0f3cbf website: Docs for all of the "filesystem" functions 2018-10-16 18:47:33 -07:00
Martin Atkins a491013054 website: Docs for all of the "encoding" functions 2018-10-16 18:47:33 -07:00
Martin Atkins e7d71995f6 website: Document the remaining "collection" functions
This also renames some of the existing function pages whose source
filenames were not matching the usual naming scheme (.html.md).
2018-10-16 18:47:33 -07:00
Martin Atkins 48d940323e website: Beginnings of "Functions" configuration section
Previously we just listed out all of the functions in alphabetical order
inside the "Interpolation Syntax" page, but that format doesn't leave much
room for details and usage examples.

Now we give each function its own page, and categorize them for easier
navigation. While many functions are very simple and don't really warrant
a full page, certain functions do have additional details that are worth
mentioning and this structure scales better for those more complicated
functions.

So far this includes only the numeric and string functions. Other
categories will follow in subsequent commits.
2018-10-16 18:47:33 -07:00
Martin Atkins 39579e8d0f website: revisions to the "Configuration Syntax" page and expressions
This rewrite of the "Configuration Syntax" page now gives some more detail
on the top-level structural constructs and de-emphasizes the name "HCL"
as subordinate to "the Terraform language".

It also now includes some commentary on valid identifiers and comments,
and issues around character encodings and line endings.

In addition, we now have a new "Expressions" page that replaces the old
"Interpolation Syntax" page, covering the expression language features
we inherit from HCL and how they behave in the context of Terraform.

The "Expressions" page currently links to a page about the built-in
functions which does not yet exist. This will be created in a later
commit.
2018-10-16 18:47:33 -07:00
Martin Atkins e1754970a8 website: Revise the "Data Sources" configuration docs section
This adopts a more guide-like writing style, similar to what prior commits
have done to some other subsections of this section.

The data sources page has not got any real attention since the feature
was first added, and our vocabulary for describing them and their
lifecycle hadn't quite settled when the page was originally written. This
new version is consistent in how it uses "data source" to describe the
feature that providers offer and "data resource" to describe what is
created by a "data" block in configuration, which then allows us to
draw on the many shared features between both data and managed resources.

For the moment this waits until "data resource" is defined in order to
first introduce the qualifier "managed resource". We may wish to revise
this again to mention that more specific nomenclature in passing on the
"Resources" page, in case a user encounters it elsewhere and wants to
learn what it means without needing to be familiar with data resources
first.
2018-10-16 18:47:33 -07:00
Martin Atkins eeb96b1e12 website: Revise the "Modules" configuration docs section
This adopts a more guide-like writing style, similar to what prior commits
have done to some other subsections of this section.

Since we already have a whole top-level section devoted to modules, there
is no need for full coverage of all of their features here. Instead, this
section focuses on an an initial introduction to what modules are and
the basics of their usage within the Terraform language. We then link
to the main modules section for the full details.
2018-10-16 18:47:33 -07:00
Martin Atkins fdc8bb6c00 website: Revise the "Local Values" configuration docs section
This adopts a more guide-like writing style, similar to what prior commits
have done to some other subsections of this section.
2018-10-16 18:47:33 -07:00
Martin Atkins e41883d972 website: Revise the "Output Values" configuration docs section
This adopts a more guide-like writing style, similar to what prior commits
have done to some other subsections of this section.

In the process of writing this, I identified some unclear statements in
the "Resources" subsection, and so these are also revised here for
consistency with the output values documentation.
2018-10-16 18:47:33 -07:00
Martin Atkins f8f2ff2202 website: Revise the "Input Variables" configuration docs section
This adopts a more guide-like writing style, similar to what prior commits
have done to the Resources and Providers sections.
2018-10-16 18:47:33 -07:00
Martin Atkins a6cf796873 website: Revise the "Providers" configuration docs section
These revisions reflect this sub-section's new earlier placement in the
sub-section list, leading to a more guide-like style for the initial
sections.

Also includes some minor copy-editing to align terminology with that
introduced in the prior commit for the "Resources" docs page.
2018-10-16 18:47:33 -07:00
Martin Atkins 6fa6a0d110 website: revise the "Resources" configuration docs section
This is now the leading subsection of the Configuration section of the
docs, and so this rewrite intends to make it more "guide-like" and as
accessible as possible to those who are not yet familiar with other
Terraform concepts.

This rewrite also attempts to introduce some consistency into our
vocabulary, which should eventually be reflected throughout our
documentation. In particular:

- "Resource" refers to the block the user writes in configuration, while
  "Resource _Type_" refers to what the provider defines. We previously
  used "resource" for both of these interchangeably.

- "Resource" is no longer used to refer to what gets created and managed
  in remote APIs as a result of a resource block in configuration. Lacking
  a good distinct name for these, this guide uses the word "object",
  qualifying it as "infrastructure object" or "remote object" where
  necessary to retain clarity. This distinction is important to enable
  a clear description of resource lifecycle.

- "Argument" refers to an element (attribute or block) within a resource
  block. This terminology was already being used in some places, so we
  embrace it here as a way to distinguish from "attribute", which is
  what a resource _exports_ for use in expressions.

- Since interpolation is no longer needed to use expressions in the
  language, the word "expression" is used to describe the definition of
  a value that might involve some computation. Where necessary, this is
  used with a modifier "arbitrary expression" to contrast with situations
  where the set of allowed expression constructs is constrained.
2018-10-16 18:46:46 -07:00
Martin Atkins 27429b61a9 website: Flesh out the intro to the "Configuration" section.
The prior content on this page was little more than an instruction to
begin navigating the sub-sections of this section.

The new content aims to give a broad overview of some of the language
concepts and a syntax example, in order to create some context to help
the user navigate the subsections more easily.

This also introduces for the first time usage of the term "the Terraform
language". This was previously left un-named, leading to some awkward
sentence constructions elsewhere in the docs. This new name gives us
some specific terminology to use in order to contrast the language that
exists at Terraform's level of abstraction, defining the semantics, from
the underlying grammar provided by HCL.
2018-10-16 18:46:46 -07:00
Martin Atkins e5e3452ffa website: Reorganize the "Configuration" docs section
With the additional configuration language features coming in Terraform
v0.12, our existing documentation structure is beginning to strain.

Here we reorganize the navigation slightly in order to introduce the
concepts in a more appropriate order so that we can reveal complexity
more gradually. Subsequent commits will revise the content of these
pages to better reflect the new sequencing.

The "Environment Variables" page is moved from the Configuration section
into the "Commands" section, since it is not considered a part of the
configuration language and thus more appropriate in the CLI documentation.
The old placement is reflective of the broader purpose that the
"Configuration" section had originally, but its new focus will be on
the Terraform language (.tf files) in particular, with other aspects of
customizing Terraforms behavior covered in other sections.
2018-10-16 18:46:46 -07:00
Nick Fagerlund b3935b29d7
website: Reconcile docs about plugin discovery and downloading (#18973)
website: Reconcile docs about plugin discovery and downloading

I'm attempting to keep things simple for normal users while making sure we've
got the full behavior written down somewhere for plugin developers.

This commit doesn't stand alone; it's paired with a commit in the
terraform-website repo, to deal with some related content in the "extend"
section.
2018-10-02 16:53:29 -07:00
saravanan palanisamy 517e28ee6e update uuid definition 2018-09-10 21:49:02 +04:00
Quinn Diggity c943caf1a5 website: fix for typo in resources.html.md (#18266)
should be provides, not provies
2018-06-18 08:37:57 -07:00
Paddy 931f8ecc41 Fix broken links to /docs/enterprise/run/api.html
We had a couple broken links pointing to the docs for the run API. This
updates them to the new location.
2018-06-13 12:19:07 -07:00
Jaye Doepke 596c7b2638 docs typo 2018-06-11 12:04:03 -07:00
SpencerBrown 3324de35b6 Fix typo in doc: "The support operators are" -> "The supported operators are" 2018-06-11 11:50:18 -07:00
Dominik-K 9da5f5a9f0 docs: no interpolations in `lifecycle` attribute (#3116) (#17695)
* docs: interpolations in `lifecycle` unsupported currently
2018-04-05 15:06:22 -04:00
James Bardin ff8d02cd25 remove old warning care create_before_destroy
Create-before-destroy dependencies are automatically ordered correctly
by terraform. Remove the old notice about requiring all dependencies to
have the same setting for create_before_destroy.
2018-04-03 17:37:36 -04:00
Andrei Ivanov 53110e5c1f - fixed a trivial typo 2018-03-07 17:57:25 +02:00
Nick Fagerlund 66ff8f8bed website: Deprecation notes about "terraform push"
Also:

- In the getting started guide, the TFE content was all tailored to the older
  run-locally workflow. I've replaced it with some brief explanation and a link
  to the dedicated TFE getting started guide.
- Fixed a sidebar link glitch in the configuration section. (Both "Terraform"
  and "Terraform Enterprise" were marked as active if you were on the TFE page.)
- Renamed the "Terraform Enterprise" page "Terraform Push." (Some people have
  gotten confused and landed on this page when trying to set up the `atlas`
  remote backend.)
2018-02-27 14:48:04 -08:00
Michael Mell 4b598860bb website: document the naming conventions for outputs 2018-02-12 19:33:57 -08:00
Blake Stoddard f918fb8583 website: fix ordering of interpolation functions 2018-01-31 11:50:00 -08:00
Brian Flad 1ff724f333
Merge pull request #17087 from hashicorp/f-versioning-docs-updates
Documentation: Add version specifier information to provider version docs and clarify pessimistic specifier
2018-01-25 14:56:08 -05:00
Rubén González 944a98f42d website: correct link from file interpolation function to path information variables 2018-01-22 11:35:33 -08:00
Brian Flad 939f20011e Documentation: Cleaner copy around pessimistic version specifiers for modules and providers 2018-01-11 12:46:00 -05:00
Brian Flad 4d4fe85227 Documentation: Add version specifier information to provider version docs and clarify pessimistic specifier 2018-01-11 12:38:43 -05:00
Clint a8f08faab5
copy doc note from terraform-providers/terraform-provider-aws/2162 (#16940) 2017-12-19 10:29:55 -06:00
Andrew 2b68f4393e website: explanation of TF_VAR_ precedence
Fixes #15595
2017-12-05 11:27:31 -08:00
David Meyer fe0cc3b0db config: new "rsadecrypt" interpolation function
The primary use-case is to decrypt windows passwords obtained from AWS, but this function is generic and may find other purposes too.
2017-12-05 11:06:32 -08:00
mizuno 01c1142589 config: new "timeadd" interpolation function 2017-12-05 10:46:12 -08:00
Cameron Childress ae33b68e68 website: An example of referencing resources with "count" 2017-12-04 09:43:40 -08:00
David Celis 714169502a website: note that plugin_cache_dir must already exist
This directory is not automatically created by Terraform
2017-11-29 15:04:08 -08:00
Alexandru Ungur 9f1a773655 website: fix broken link from resources to multiple provider instances 2017-11-20 17:05:35 -08:00
Dmitry Grigorenko (gitHUB) 27aa4cb6bf website: fix documented naming scheme for provider plugins 2017-11-18 18:44:57 -08:00
Jordi Pàmies 6786c1361f website: fix incorrect examples for the chunklist function 2017-11-16 16:07:44 -08:00
Martin Atkins f3a2165587 website: Use "Input Variable" as full term for var.foo
We've historically been somewhat inconsistent in how we refer to the
type of object defined by "variable" blocks in configuration. Parts of
our documentation refer to them as "input variables" or just "variables",
while our implementation refers to them as "user variables".

Since Terraform Registry is now also referring to these as "Inputs", here
we standardize on "Input Variable" as the fully-qualified name for this
concept, with "variable" being a shorthand for this where context is
obvious. Outside of this context, anything that can be referred to in
an interpolation expression is generically known as a "variable", with
Input Variables being just one kind, specified by the "var." prefix.

While this terminology shift is not critical yet, it will become more
important as we start to document the new version of the configuration
language so we can use the generic meaning of "variable" there.
2017-11-09 11:08:09 -08:00
Martin Atkins 3d33a36bf6 website: update terminology used in provider config docs
The bulk of the text on this page hasn't been revised for some time and
so parts of it were using non-idiomatic terminology or not defining terms
at all.

The main goal of this revision is to standardize on the following terms:

- "provider configuration" refers to a specific provider block in config,
  as a distinct idea from the provider _itself_, which is a singleton.

- "Default" vs. "additional" provider configurations, distinguishing
  those without and with "alias" arguments respectively. These are named
  here so that we can use this terminology to describe the different
  behaviors of each for the purposes of provider inheritance between
  modules.
2017-11-09 11:08:09 -08:00
Martin Atkins 3da5fefdc1 command: Allow TF_DATA_DIR env var to override data directory
This allows the user to customize the location where Terraform stores
the files normally placed in the ".terraform" subdirectory, if e.g. the
current working directory is not writable.
2017-11-01 16:55:23 -07:00
Benjamin Farley d6abdd14e7 website: correction of chunklist interpolation function example 2017-11-01 10:48:34 -07:00
Martin Atkins 91a4af9c8a website: rewrite modules usage documentation for new features
The modules mechanism has changed quite a bit for version 0.11 and so
although simple usage remains broadly compatible there are some
significant changes in the behavior of more complex modules.

Since large parts of this were rewritten anyway, I also took the
opportunity to do some copy-editing to make the prose on this page more
consistent with our usual editorial voice and to wrap the long
lines.
2017-11-01 07:22:20 -07:00
Aleksejs Sinicins ece099f453 website: fix "contains" interpolation example 2017-10-17 07:25:09 -07:00
Gauthier Wallet ed9ba576e3 core: New interpolation function "chunklist"
This turns a list into a list of lists with each element (apart from possibly the last) being the given length.
2017-10-10 11:56:13 -07:00
Patrick Decat 00c3367dda website: Replace `~` by `$HOME` in documentation of TF_PLUGIN_CACHE_DIR 2017-10-03 18:34:22 -07:00
James Bardin da0e74276a fix provider with local value test and docs
Make sure this fails during destroy

Add a note in the documentation that local values may fail during
destroy.
2017-09-29 17:14:07 -04:00
Martin Atkins 34956cd124 website: Document the plugin cache
Since we don't currently auto-install provisioner plugins this is
currently placed on the providers documentation page and referred to as
the "Provider Plugin Cache". In future this mechanism may also apply to
provisioners, in which case we'll figure out at that point where better
to place this information so it can be referenced from both the provider
and provisioner documentation pages.
2017-09-29 14:03:09 -07:00
Martin Atkins f19bf25945 website: don't recommend "providers" block in CLI config
This mechanism for configuring plugins is now deprecated, since it's not
capable of declaring plugin versions. Instead, we recommend just placing
plugins into a particular directory, which is now documented on the
main providers documentation page and linked from the more detailed docs
on plugins in general.
2017-09-29 14:03:09 -07:00
Martin Atkins c5d8f2ffd2 website: clarify that provider version does not accept interpolations
This fixes #15896.
2017-09-28 12:41:39 -07:00
Ariel Alonso 550ae05819 config: new "transpose" interpolation function
This function takes a map of lists of strings and inverts it so that
the string values become keys and the keys become items within the
corresponding lists.
2017-09-28 10:29:25 -07:00
Krzysztof Wilczynski 6e7e03f4ea config: new "abs" interpolation function
This new function returns the absolute value for a given number.
2017-09-25 14:19:18 -07:00
James Bardin 50005ec817 Merge branch 'f-registry-docs' into v0.10.6-release 2017-09-18 15:30:31 -05:00
Paul Banks 197bbc6114 Add screenshots, make registry the default module source example, remove dead support link in registry submenu 2017-09-15 17:50:22 +01:00
Micah Hausler 7fa4b648bb config: multi-line "indent" function
This function prepends a number of spaces on to all but the first line
of a string containing multiple lines of text.
2017-09-14 09:47:48 -07:00
Shih Oon Liong bcfb63098a website: Example of using maps with local values 2017-09-08 10:33:56 -07:00
Justin Campbell fd4cc78839 docs: Add local values usage example 2017-09-07 13:49:33 -04:00