Commit Graph

251 Commits

Author SHA1 Message Date
Kristin Laemmert 7111d8deb1
Merge pull request #25783 from nvogel/master
Fix documentation example for the indent function
2020-08-12 09:34:07 -04:00
Nick Fagerlund 2ffb71bcee
website: Fix several broken links (#25808) 2020-08-11 15:24:51 -07:00
Nicolas Vogel 8f42f0fa77
Fix documentation example for the indent function
We must use interpolation, using the %{} directive will trigger the following error  "indent" is not a valid template control keyword
2020-08-10 11:45:28 +02:00
Nick Fagerlund 0ab7c1b90e
website: Add links to relevant Learn guides in several docs pages (#25718)
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2020-07-31 13:16:35 -07:00
Nick Fagerlund 0e5651560b
Website: 0.13 docs edits, mostly around provider requirements (#25686)
* Make sidebar nav in language docs more intuitive
* Minor display fixes for registry docs
* Explain providers in the registry in the providers index
* Revise a bunch of language docs around provider reqs

This is mostly an effort to smooth out some of the explanations, make sure
things are presented in a helpful order, make sure terminology lines up, draw
connections between related concepts, make default behavior more apparent, and
the like. It shouldn't include very much new information, but there might be one
or two things that came out of a conversation somewhere.

Co-authored-by: Judith Malnick <judith@hashicorp.com>
2020-07-30 21:07:36 -07:00
Martin Atkins ef071f3d0e website: Generalized advice on modules with provider configs
As part of documenting the new module for_each capabilities we added a
section noting that shared modules using the legacy pattern of declaring
their own provider configurations would not be compatible with them.

However, that also applies to the new module depends_on and several folks
participating in the beta pointed out that the documentation wasn't
discussing that at all.

In order to generalize the advice, I've moved the old content we had
(since v0.11) recommending against provider configurations in shared
modules out into its own section, now being more explicit that it is
a legacy pattern and not recommended, and then folded the content about
for_each and count, now also including depends_on, into that expanded
section.

As is often the case, that had some knock-on effects on the content on
the rest of this page, so there's some general editing and reorganization
here. In particular, I moved the "Multiple Instances of a Module" section
much further up the page because it's content relevant to users of
shared modules, while the later content on this page is more aimed at
authors of shared modules, including the new section about the legacy
pattern.
2020-07-24 14:37:59 -07:00
MorganGeek 3b6c1ef156 Fix spelling mistakes/typos in documentation 2020-07-22 18:24:32 +02:00
Kristin Laemmert c4ce84269a
website/docs: document difference in formatting strings with width and precision (#25499) 2020-07-07 14:09:39 -04:00
Martin Atkins 02b130cd59 website: Terraform v0.13 upgrade guide 2020-06-25 09:24:41 -07:00
Alisdair McDiarmid c093c50c80
Merge pull request #25255 from unki/patch-1
fix yamldecode()-example, missing a file() call
2020-06-24 10:31:08 -04:00
jessica-ritter edbf59ed4c
what happens when prefix is not in string
https://github.com/hashicorp/terraform/blob/master/lang/functions.go#L126 shows that Terraform's Trimprefix comes directly from the standard go library. 
When prefix is absent in the go standard library, the original string is returned; https://golang.org/pkg/strings/#TrimPrefix.
2020-06-22 11:31:08 -07:00
Martin Atkins dc8fd14c1e website: "Provider Requirements" documentation
We previously covered everything about using providers on a single page,
but that was getting unwieldy already and we now have a lot more to
discuss with v0.13 introducing a new source address syntax and some other
concepts.

Here we split the provider-related content into two parts: "Provider
Requirements" covers how to find and declare dependencies on providers,
and then "Provider Configuration" (formerly just "Providers") then focuses
primarily on how to write zero or more provider configurations for a
particular provider.

Because "Provider Requirements" is now presented before "Provider
Configuration" in the navigation, I've also moved some of the introductory
content about providers in general onto the "Requirements" page. The
first paragraph of that content is duplicated onto the "Configuration"
page for discoverability, but we now link to the requirements page to get
the full story.
2020-06-18 09:31:52 -07:00
Nick Fagerlund b1eb9dcfcf website: Configuration Language navigation refactoring
The "Configuration Language" section was becoming rather unweildy, both
by having a lot of pages and by some of the pages being quite large in
themselves.

This is a first step towards breaking things up a little more, starting
with two changes:

 - The "Configuration Language" navigation is now split into two
   sub-headings "Configuration Blocks" and "Syntax".

 - Some of the information about sub-blocks of the "terraform" block are
   now given their own pages, because their content is quite complex
   in itself.

 - "Version Constraints" is now a page in its own right, rather than this
   content being duplicated in slightly different forms across multiple
   contexts that make use of user-specified version constraints.
2020-06-18 09:31:52 -07:00
unki 214009e0f3
fix yamldecode()-example, missing a file() call 2020-06-16 09:56:03 +02:00
Martin Atkins 67311f73fd website: Draw better attention to for and for_each patterns
When helping folks in the community forum, I commonly see questions around
more complex patterns in transforming deep data structures into different
shapes to work with for_each. We have examples of these patterns in the
docs for the functions that they rely on, but they were not previously
very discoverable in the main configuration language documentation
sections.

Here I've moved the "Using Expressions in for_each" subsection on the
Resources page above some of the other sub-sections to hopefully make it
easier to see, and written out in more detail the two specific patterns
that answer a significant number of for_each-related user questions in
the hope that readers will be more likely to realize that the links are
relevant to what their goals.

I also added some more elaboration about the behavior of converting from
list to set in the "Using Sets" subsection, because this feature is often
a user's first encounter with the set data type and I've inferred from
some of the questions I've answered that a number of Terraform users don't
have prior experience with set data types in other languages to draw
assumptions from.

Finally, I added some similar links to the for_each patterns within the
for expression documentation itself, to try to make those examples more
visible to those who might be discovering the documentation in a different
sequence, e.g. by following a deep link shared in an answer to a question
in the community forum.
2020-06-01 14:17:47 -07:00
James Bardin 866449a78a
Merge pull request #25069 from hashicorp/jbardin/depends-on-docs
depends_on doc updates
2020-05-29 16:50:39 -04:00
Martin Atkins d1bc412220 configs: Custom variable validation is no longer experimental
All of the feedback from the experiment described enhancements that can
potentially be added later without breaking changes, so this change simply
removes the experiment gate from the feature as originally implemented
with no changes to its functionality.

Further enhancements may follow in later releases, but the goal of this
change is just to ship the feature exactly as it was under the experiment.

Most of the changes here are cleaning up the experiment opt-ins from our
test cases. The most important parts are in configs/experiments.go and in
experiments/experiment.go .
2020-05-28 16:07:59 -07:00
James Bardin 5d64029275 depends_on doc updates
Update depends_on for modules and data sources.
2020-05-28 16:17:01 -04:00
Garron Kramer f3db1232a0
Update modules.html.md
the -module option is no longer present.
2020-05-25 15:41:45 +03:00
Daniel Dreier 44e3d99409
Merge pull request #24659 from hashicorp/timestamp-doc
specify that `timestamp` returns UTC
2020-05-21 14:30:16 -07:00
Daniel Dreier 5e35dedc2a
Update website/docs/configuration/functions/timestamp.html.md
Co-authored-by: Matthew Sanabria <24284972+sudomateo@users.noreply.github.com>
2020-05-21 14:29:38 -07:00
Daniel Dreier 5f80f6d49d
Merge pull request #24771 from bradleypmartin/issue-24198-update-docs-for-map-type
Update maps docs to reflect v0.12 colon behavior
2020-05-21 14:28:19 -07:00
Daniel Dreier 5ef80b35e3
Merge pull request #24996 from pcleddy/foreach_with_toset_and_list
Example of for_each with list -> set using toset
2020-05-21 14:22:06 -07:00
Pam Selle bfbdb4cb1d
Add docs for provider limitations when expanding modules (#25007)
* Add docs for provider limitations when expanding modules
2020-05-21 14:04:44 -04:00
Paul Leddy 3d17c87698 Example of for_each with list -> set using toset 2020-05-19 16:03:21 -07:00
Jean Dupouy a54bb124a9
website/docs: provider aliases in the JSON format
Fixes #24889
2020-05-13 15:52:26 +02:00
Robin Norwood af5c425360
website: Add link to new learn track in configuration/modules.html (#24847) 2020-05-07 15:52:22 -07:00
Daniel Dreier 7aa97f415d
Fix "additoinal" typo in web site
Fixes 24769
2020-04-27 10:14:27 -07:00
bradleypmartin 0b45a3c83d Update maps docs to reflect v0.12 colon behavior 2020-04-26 17:52:08 -06:00
Martin Atkins c6cbbcb79a website: Initial documentation for provider_installation in the CLI config
This is an initial draft of documentation for this new feature of the
CLI configuration. This is mainly intended as a placeholder for now,
because there are other documentation updates pending for the new provider
namespacing and installation scheme and we'll likely want to revise these
docs to better complement the broader documentation once it's written.
2020-04-23 10:52:01 -07:00
Noah Mercado d4d8812afa
Feature: Sum Function (#24666)
The sum function takes a list or set of numbers and returns the sum of those
numbers.
2020-04-15 14:27:06 -04:00
Namho Kim 9cc658b491 specify that `timestamp` returns UTC 2020-04-13 18:09:05 -07:00
Pam Selle ab101f99df
Merge pull request #24635 from hashicorp/pselle/docs-mod-count
Docs for count/for_each on modules
2020-04-13 18:39:59 -04:00
Pam Selle 608c17d518 Update providers block notes 2020-04-13 12:08:08 -04:00
Fred 76f583ac9f
website/docs: fix broken hcl json spec link (#24630) 2020-04-13 11:15:13 -04:00
Pam Selle 65c4ba9c85 First docs for count/for_each on modules 2020-04-10 15:14:06 -04:00
Eduard Tamsa 534ba630e4
docs(flatten): Fix typos (#24492) 2020-04-10 08:59:17 -04:00
Adam Leskis 4f85a1a6ba
website: fix simple typo (#24415) 2020-03-23 08:55:08 -04:00
Paddy e6592dc710
Add support for provider metadata to modules. (#22583)
Implement a new provider_meta block in the terraform block of modules, allowing provider-keyed metadata to be communicated from HCL to provider binaries.

Bundled in this change for minimal protocol version bumping is the addition of markdown support for attribute descriptions and the ability to indicate when an attribute is deprecated, so this information can be shown in the schema dump.

Co-authored-by: Paul Tyng <paul@paultyng.net>
2020-03-05 16:53:24 -08:00
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