Commit Graph

6640 Commits

Author SHA1 Message Date
Laura Pacilio 66dfb56d4f Update description metadata to include key words 2021-07-07 14:42:30 -04:00
Laura Pacilio 810543b997 Add description metadata to resources overview page 2021-07-07 14:42:30 -04:00
Laura Pacilio 08f1d6c9e0 Update description metadata for style page 2021-07-07 14:42:30 -04:00
Laura Pacilio c33970bfa4 Add description metadata to JSON syntax page 2021-07-07 14:42:30 -04:00
Laura Pacilio 5384aacb5e Update description metadata for key words 2021-07-07 14:42:30 -04:00
Laura Pacilio 887b019761 Fix capitalization on Terraform language 2021-07-07 14:42:30 -04:00
Laura Pacilio a62e2825c7 Add description metadata to syntax overview 2021-07-07 14:42:30 -04:00
Laura Pacilio f6b500379d Update description metadata to include Terraform key word 2021-07-07 14:42:30 -04:00
Laura Pacilio ab06843f1d Add description metadata to files and directories 2021-07-07 14:42:30 -04:00
Laura Pacilio 8525befc22 Add description metadata to index page 2021-07-07 14:42:30 -04:00
ritsok 595646916f Link refresh tutorial from plan and refresh docs pages 2021-07-06 15:52:16 -04:00
Laura Pacilio 19eaba888e
Merge pull request #29066 from hashicorp/add-compatibility-promises-toc
Add compatibility promises to sidebar toc
2021-07-06 14:08:05 -04:00
Brent Woodruff 3a66236c14 note that output of jsonencode is minified 2021-07-02 15:36:47 -04:00
Laura Pacilio a8600ca2e4 Fix numbering for second step 2021-07-02 14:02:03 -04:00
Laura Pacilio 13d690081c Fix numbering in first section 2021-07-02 13:52:15 -04:00
Laura Pacilio d3b9d5cdda
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:51:00 -04:00
Laura Pacilio b3736334f7
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:50:09 -04:00
Laura Pacilio 52e2094726
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:49:59 -04:00
Laura Pacilio f2d89464ef Revise grouping in steps 2021-07-02 12:29:35 -04:00
Laura Pacilio 10ccf2bd7f Add more context to run instructions 2021-07-02 12:26:33 -04:00
Laura Pacilio 0fc32e5858 Fix indentation 2021-07-02 12:19:28 -04:00
Laura Pacilio 03e6f0d385 Update formatting for terminal commands 2021-07-02 12:16:45 -04:00
Laura Pacilio c2b492a814 Add initial run local instructions to readme 2021-07-02 12:08:00 -04:00
Adrian 54a09b059f
error_count
# shouldn't it be true if the error count is zero

error_count (number): A zero or positive whole number giving the count of errors Terraform detected. If valid is 'true' then error_count will always be zero, because it is the presence of errors that indicates that a configuration is invalid.
2021-07-01 19:22:13 -04:00
Laura Pacilio dfc12a6a9e
Merge pull request #29051 from hashicorp/add-page-metadata
Add page metadata
2021-07-01 14:44:15 -04:00
Laura Pacilio e6f1255869 Update vs Cloudformation description 2021-07-01 11:07:23 -04:00
Laura Pacilio ab9b9a445f Update vs pages to address PR comments 2021-07-01 11:01:21 -04:00
Laura Pacilio 09c79994f5 Update use cases page for PR comments 2021-07-01 10:43:24 -04:00
Laura Pacilio 04385bb9fc
Update website/intro/use-cases.html.markdown
Co-authored-by: Judith Malnick <judith.patudith@gmail.com>
2021-07-01 10:39:15 -04:00
Laura Pacilio a9e09a3ed9 Edit copy to address PR comments 2021-07-01 10:34:41 -04:00
Alisdair McDiarmid 32210db0ab documentation: Add drift to machine readable UI 2021-06-30 15:00:43 -04:00
Laura Pacilio a8d949a590 Add compatibility promises to sidebar toc 2021-06-30 10:10:25 -04:00
Laura Pacilio 577c3653f2
Merge pull request #28983 from KurtLehnardt/patch-1
fixed typo
2021-06-30 08:54:04 -04:00
Laura Pacilio a7e24c384b
Merge pull request #28842 from iaoiui/patch-1
remove extra "be"
2021-06-30 08:52:51 -04:00
Laura Pacilio f9ec36383d
Merge pull request #29011 from vlad-ro/patch-1
Add back missing closing quote character
2021-06-30 08:51:47 -04:00
Laura Pacilio 4f12b8d917
Merge pull request #28863 from stensonb/patch-1
typo
2021-06-30 08:50:24 -04:00
Laura Pacilio de97a03528
Merge pull request #28908 from kondr57/patch-1
fix typo
2021-06-30 08:43:26 -04:00
Ben Moskovitz 21228e19df Fix broken links as pointed out by CI
See: https://app.circleci.com/pipelines/github/hashicorp/terraform/6853/workflows/cc37def1-6bf5-4f6c-89b1-10dfcc65ea5e/jobs/44887
2021-06-30 16:55:00 +12:00
Ben Moskovitz d29cdccb5b Add a note to the docs on the S3 backend around permissions needed for encrypted state storage 2021-06-30 16:45:17 +12:00
Laura Pacilio a2cab95dac
Update copy for active voice and concision 2021-06-29 09:15:01 -04:00
Laura Pacilio 740343cfd2
Update website/intro/use-cases.html.markdown
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-06-29 09:02:02 -04:00
Laura Pacilio 2cb8bbaacd
Update website/intro/use-cases.html.markdown
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-06-29 09:01:25 -04:00
Laura Pacilio 16bea6a949
Update website/intro/use-cases.html.markdown
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-06-29 09:01:13 -04:00
Laura Pacilio 7cb7d641b7
Remove top header and add provider language 2021-06-29 08:56:04 -04:00
Laura Pacilio 46708ea4bc
Update website/intro/vs/chef-puppet.html.markdown
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-06-29 08:44:53 -04:00
Laura Pacilio f526e6eadc Update page description metadata 2021-06-28 17:14:34 -04:00
Laura Pacilio 5e89ac590e Update page description metadata 2021-06-28 17:10:11 -04:00
Laura Pacilio 908ceec8c1 Update page description metadata 2021-06-28 17:06:50 -04:00
Laura Pacilio fc772aec86 Update page content for clarity, concision, and flow 2021-06-28 17:03:30 -04:00
Laura Pacilio 2f67c78821 Update page description metadata 2021-06-28 16:50:37 -04:00
Laura Pacilio 4111b1298d Update page description metadata 2021-06-28 16:47:37 -04:00
Laura Pacilio 5344ba0fa5 Update page description metadata 2021-06-28 16:00:16 -04:00
Laura Pacilio 0ab2012d77 Update page description metadata 2021-06-28 15:59:36 -04:00
Laura Pacilio e92f030662 Make get started bullet more concise 2021-06-28 11:38:21 -04:00
Laura Pacilio 60f240f8cf Update description and edit for concision and clarity 2021-06-28 11:33:06 -04:00
Martin Atkins a945b379d8 website: Explicit examples of -var escaping in various shells
The -var command line option comes with the disadvantage that a user must
contend both with Terraform's own parser and with the parser in whichever
shell they've decided to use, and different shells on different platforms
have different rules.

Previously we've largely just assumed that folks know the appropriate
syntax for the shell they chose, but it seems that command lines involving
spaces and other special characters arise rarely enough in other commands
that Terraform is often the first time someone needs to learn the
appropriate syntax for their shell.

We can't possibly capture all of the details of all shells in our docs,
because that's far outside of our own scope, but hopefully this new
section will go some way to give some real examples that will help folks
figure out how to write suitable escape sequences, if they choose to
set complex variable values on the command line rather than in .tfvars
as we recommend elsewhere on this page.
2021-06-22 14:10:04 -07:00
Robin Norwood 50fe980877
Merge pull request #28998 from hashicorp/rln-add-versions-tutorials-links
Add links to terraform versions tutorials
2021-06-22 11:50:18 -05:00
Vlad Romanenko d4d56a96b1
Add back missing closing quote character 2021-06-22 15:20:31 +01:00
Robin Norwood 2c71bb3a2e Add links to terraform versions tutorials 2021-06-21 14:26:43 -05:00
Radek Simko bb868606ea
docs: Document naming conventions for templates & backend configs (#28924)
* docs: Document naming conventions for templates & backend configs

* Update website/docs/cli/config/config-file.html.md

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>

* Update website/docs/language/functions/templatefile.html.md

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2021-06-18 17:20:00 +01:00
Kurt Lehnardt 165b2a2509
fixed typo 2021-06-18 09:59:56 -06:00
Kristin Laemmert 583859e510
commands: `terraform add` (#28874)
* command: new command, terraform add, generates resource templates

terraform add ADDRESS generates a resource configuration template with all required (and optionally optional) attributes set to null. This can optionally also pre-populate nonsesitive attributes with values from an existing resource of the same type in state (sensitive vals will be populated with null and a comment indicating sensitivity)

* website: terraform add documentation
2021-06-17 12:08:37 -04:00
Kristin Laemmert ac03d35997
jsonplan and jsonstate: include sensitive_values in state representations (#28889)
* jsonplan and jsonstate: include sensitive_values in state representations

A sensitive_values field has been added to the resource in state and planned values which is a map of all sensitive attributes with the values set to true.

It wasn't entirely clear to me if the values in state would suffice, or if we also need to consult the schema - I believe that this is sufficient for state files written since v0.15, and if that's incorrect or insufficient, I'll add in the provider schema check as well.

I also updated the documentation, and, since we've considered this before, bumped the FormatVersions for both jsonstate and jsonplan.
2021-06-14 09:19:13 -04:00
Kristin Laemmert 9ca3cb4233
website/docs: move type func docs to a useful location (#28940)
* website/docs: move type func docs to a useful location

* docs don't exist if you don't put them in the index (again)
2021-06-14 08:54:27 -04:00
J.D. Stone ce638c9231 Update 0-15.html.markdown
Fixed a typo.
2021-06-09 11:08:45 -07:00
Vladimir Kondratiev 58a5207dc4
fix typo 2021-06-09 13:13:08 +03:00
Martin Atkins f52aec8e3d website: Fix formatting of v1 compatibility promises
Seems like we lost a newline in some of the shuffling it took to get this
into the live website, and so it's formatting oddly in the rendered
website. This restores the intended formatting of this as the start of
a bullet list, rather than as a continuation of the previous paragraph.
2021-06-08 10:35:23 -07:00
Judith Malnick 044c439dbc
Gloss of top docs pages (#28891)
* clarify input variables opening sentence

* adjust variables description

* claraify providers text and add learn callout

* add description to providers page

* add desscription and clarify provider configuration

* add deprecation note to versions in proivder configs

* add hands on callout and clarify next steps in intro

* link to language collection from language docs

* give more context about configurtion language up front

* clarify output top page

* reorganize for each intro to present feature before notes

* move description before link out and remove passive voice

* fix typo

* clarify purpose of plan

* move explanation before learn link and fully spell boolean

* add a syntax heading  to separate intro from details

* add learn callout to module source docs

* clean up intro to provider requirements and add link

* Apply suggestions from code review

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-06-08 06:58:55 -07:00
Martin Atkins 07aa07f5b9 website: First Draft of Upgrade Guide 2021-06-07 17:23:39 -07:00
Bryan Stenson b487b9f8fb
typo 2021-06-02 12:27:40 -07:00
iaoiui 176cfad1dd
remove extra "be" 2021-05-29 15:51:33 +09:00
Judith Malnick d7f6000118 Revert "mclarify specifying provider versions"
This reverts commit 397494daca.
2021-05-28 14:34:05 -07:00
Judith Malnick 397494daca mclarify specifying provider versions 2021-05-28 13:51:16 -07:00
Martin Atkins 4e74a7a4f1 initwd: Error message for local paths escaping module packages
Our module installer has a somewhat-informal idea of a "module package",
which is some external thing we can go fetch in order to add one or more
modules to the current configuration. Our documentation doesn't talk much
about it because most users seem to have found the distinction between
external and local modules pretty intuitive without us throwing a lot of
funny terminology at them, but there are some situations where the
distinction between a module and a module package are material to the
end-user.

One such situation is when using an absolute rather than relative
filesystem path: we treat that as an external package in order to make the
resulting working directory theoretically "portable" (although users can
do various other things to defeat that), and so Terraform will copy the
directory into .terraform/modules in the same way as it would download and
extract a remote archive package or clone a git repository.

A consequence of this, though, is that any relative paths called from
inside a module loaded from an absolute path will fail if they try to
traverse upward into the parent directory, because at runtime we're
actually running from a copy of the directory that's been taking out of
its original context.

A similar sort of situation can occur in a truly remote module package if
the author accidentally writes a "../" source path that traverses up out
of the package root, and so this commit introduces a special error message
for both situations that tries to be a bit clearer about there being a
package boundary and use that to explain why installation failed.

We would ideally have made escaping local references like that illegal in
the first place, but sadly we did not and so when we rebuilt the module
installer for Terraform v0.12 we ended up keeping the previous behavior of
just trying it and letting it succeed if there happened to somehow be a
matching directory at the given path, in order to remain compatible with
situations that had worked by coincidence rather than intention. For that
same reason, I've implemented this as a replacement error message we will
return only if local module installation was going to fail anyway, and
thus it only modifies the error message for some existing error situations
rather than introducing new error situations.

This also includes some light updates to the documentation to say a little
more about how Terraform treats absolute paths, though aiming not to get
too much into the weeds about module packages since it's something that
most users can get away with never knowing.
2021-05-27 11:00:43 -07:00
Martin Atkins abf7f3416b website: "taint" command is deprecated from v0.15.2, not from v1.0.0
We got the replacement for this in earlier than anticipated, so these docs
were originally more pessimistic about when the alternative would be
available.
2021-05-26 10:16:38 -07:00
Martin Atkins 6d80088f51 website: More accurate release versions for new plan options
While we were working on and documenting these it wasn't clear exactly
what Terraform CLI version they would land in, and so we used
"Terraform v1.0" in the docs as a safe bound that was definitely going to
include all of them.

With everything now landed though, we can be more specific about which
v0.15.x minor release each of these appeared in.
2021-05-26 09:19:33 -07:00
Alisdair McDiarmid f9fc47c22e website: Add documentation for machine readable UI
Terraform 0.15.3 added support for a `-json` flag to the plan, apply,
and refresh commands, which renders the Terraform UI output in a
structured machine readable format. This commit adds documentation for
this interface.
2021-05-25 16:01:32 -04:00
Matthew Sanabria 1c3f4fe80f
Add examples to `terraform console` command (#28773)
These examples showcase come use cases for `terraform console`.
2021-05-25 10:06:23 -04:00
Matthew Sanabria a63ac81d0c
Example plugin location using XDG Base Directory (#28711)
The current documention was unclear about the full path of local mirrors
when using the XDG Base Directory Specification.

Also removed the trailing slashes for the other paths in this section.
2021-05-25 10:06:07 -04:00
TAY TS 511011335a
Update range.html.md
Fix the condition in the negative direction range pseudo code
2021-05-23 09:43:38 +08:00
James Bardin 65ee33a90d
Merge pull request #28748 from Bredoxon/patch-1
Fix typo in the docs
2021-05-19 12:18:21 -04:00
Bredoxon 06e756eb0c
Fix typo in the docs 2021-05-19 10:51:06 +10:00
James Bardin 760a59b3a7 negative substring 2021-05-18 16:04:47 -04:00
Karol Szczepański f684f91f3f
website/docs(plan): fix minor typos (#28713) 2021-05-18 11:05:42 -04:00
Kyle A. Matheny 3afa08b1bc
Remove duplicate word (#28716) 2021-05-18 11:04:54 -04:00
James Bardin 51a171c7f4 pg requires PostgreSQL 10 2021-05-18 09:39:05 -04:00
James Bardin 1b48636b42 update init docs for -migrate-state 2021-05-17 12:41:54 -04:00
Nick Fagerlund 65f3ddec52 website: Make apply's usage of plan options harder to miss
- I'm using distinct subheaders and smaller paragraphs to try and make the info
  about apply's two modes more skimmable.

- I'm also adding a separate "Plan Options" subheader (and keeping the section
  tiny so it stays snugged up right next to the "Apply Options" one) to make it
  extra-clear that Hey, There's More Options, They're Over There.
2021-05-14 13:26:33 -07:00
Alisdair McDiarmid 3e40a9a4eb
Merge pull request #28507 from stevematney/patch-1
Updating sensitive/nonsensitive docs with v0.14 specifics.
2021-05-14 13:46:12 -04:00
Steve Matney e27a927ba4 Updating sensitive and nonsensitive docs with correct v0.15 info. 2021-05-14 10:32:39 -06:00
Martin Atkins 3c8a4e6e05 command+backend/local: -refresh-only and drift detection
This is a light revamp of our plan output to make use of Terraform core's
new ability to report both the previous run state and the refreshed state,
allowing us to explicitly report changes made outside of Terraform.

Because whether a plan has "changes" or not is no longer such a
straightforward matter, this now merges views.Operation.Plan with
views.Operation.PlanNoChanges to produce a single function that knows how
to report all of the various permutations. This was also an opportunity
to fill some holes in our previous logic which caused it to produce some
confusing messages, including a new tailored message for when
"terraform destroy" detects that nothing needs to be destroyed.

This also allows users to request the refresh-only planning mode using a
new -refresh-only command line option. In that case, Terraform _only_
performs drift detection, and so applying a refresh-only plan only
involves writing a new state snapshot, without changing any real
infrastructure objects.
2021-05-13 09:05:06 -07:00
Martin Atkins 42e0985839 command: use -lock=false consistently in -help output
Previously the docs for this were rather confusing because they showed an
option to turn _on_ state locking, even though it's on by default.

Instead, we'll now show -lock=false in all cases and document it as
_disabling_ the default locking.

While working on this I also noticed that the equivalent docs on the
website were differently inconsistent. I've not made them fully consistent
here but at least moreso than they were before.
2021-05-12 09:27:37 -07:00
Martin Atkins ed121321c6 website: Revamp the "terraform state mv" page
My original motivation here was to add the previously-missing -dry-run
option to the list of options

However, while in the area I noticed that this command hasn't had a
documentation refresh for a while and so I took the opportunity to update
it to match with our current writing style and terminology used in other
parts of the documentation, and so I've rewritten prose elsewhere on the
page to hopefully give the same information in a way that fits in better
with concepts discussed elsewhere in the documentation, and also to try
to add some additional context to connect this information with what
we've described in other places.

This rewrite also drops the example of moving from one "state file" to
another, because that's a legacy usage pattern that isn't supported when
using remote backends, and we recommend most folks to use remote backends
so it's strange to show an example that therefore won't work for most
people. Rather than adding additional qualifiers to that example I chose
to just remove it altogether, because we've generally been working to
de-emphasize these legacy local backend command line options elsewhere in
the documentation.
2021-05-12 09:27:37 -07:00
Martin Atkins ea089d06f1 website: Revamp the "terraform state rm" page
My original motivation here was to add the previously-missing -dry-run
option to the list of options

However, while in the area I noticed that this command hasn't had a
documentation refresh for a while and so I took the opportunity to update
it to match with our current writing style and terminology used in other
parts of the documentation, and so I've rewritten prose elsewhere on the
page to hopefully give the same information in a way that fits in better
with concepts discussed elsewhere in the documentation, and also to try
to add some additional context to connect this information with what
we've described in other places.
2021-05-12 09:27:37 -07:00
Martin Atkins 0aa0e00fdc website: Backend docs link to new .gitignore anchor
The Git book seems to be using a different anchor format now, and so this
link was previously effectively linking to the page as a whole rather
than to the specific section we're trying to refer to.
2021-05-12 09:27:37 -07:00
Martin Atkins 874f1abb2b cli+website: -ignore-remote-version docs and other cleanup
We previously had only very short descriptions of what
-ignore-remote-version does due to having the documentation for it inline
on many different command pages and -help output.

Instead, we'll now centralize the documentation about this argument on
the remote backend page, and link to it or refer to it from all other
locations. This then allows us to spend more words on discussing what
Terraform normally does _without_ this option and warning about the
consequences of using it.

This continues earlier precedent for some local-backend-specific options
which we also don't recommend for typical use. While this does make these
options a little more "buried" than before, that feels justified given
that they are all "exceptional use only" sort of options where users ought
to learn about various caveats before using them.

While there I also took this opportunity to fix some earlier omissions
with the local-backend-specific options and a few other minor consistency
tweaks.
2021-05-12 09:27:37 -07:00
Roger Berlind b6885923d0
website: Add link to Modules in Package Sub-directories (#27980)
* Add link to Modules in Package Sub-directories

Add link to "Modules in Package Sub-directories" section at top of page

* Fix broken links

* Update aws link, fixes missing anchor linkcheck

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-05-11 12:15:09 -07:00
Martin Atkins 6f68065326 website: Explicit example of for_each chaining between resources
This pattern follows as a natural consequence of how for_each is defined,
but I've noticed from community forum Q&A that newcomers often don't
immediately notice the connection between what for_each expects as input
and what a for_each resource produces as a result, so my aim here is to
show a short example of that in the hope of helping folks see the link
here and get ideas on how to employ the technique in other situations.
2021-05-10 10:49:04 -07:00
Rachel Sharp 87c9e78666
Merge pull request #28604 from hashicorp/res-lifecycle-tutorial
Add link to lifecycle tutorial
2021-05-07 13:01:25 -05:00
Alisdair McDiarmid a5b7394f9a command/jsonplan: Add replace_paths
The set of paths which caused a resource update to require replacement
has been stored in the plan since 0.15.0 (#28201). This commit adds a
simple JSON representation of these paths, allowing consumers of this
format to determine exactly which paths caused the resource to be
replaced.

This representation is intentionally more loosely encoded than the JSON
state serialization of paths used for sensitive attributes. Instead of a
path step being represented by an object with type and value, we use a
more-JavaScripty heterogenous array of numbers and strings. Any
practical consumer of this format will likely traverse an object tree
using the index operator, which should work more easily with this
format. It also allows easy prefix comparison for consumers which are
tracking paths.

While updating the documentation to include this new field, I noticed
that some others were missing, so added them too.
2021-05-04 16:51:51 -04:00
Rachel Sharp c302fa507f
Add link to lifecycle tutorial 2021-05-04 14:20:22 -04:00
Martin Atkins 1d3e34e35e command: New -replace=... planning option
This allows a similar effect to pre-tainting an object but does the action
within the context of a normal plan and apply, avoiding the need for an
intermediate state where the old object still exists but is marked as
tainted.

The core functionality for this was already present, so this commit is
just the UI-level changes to make that option available for use and to
explain how it contributed to the resulting plan in Terraform's output.
2021-05-03 15:43:23 -07:00
Chad Bailey a303a03f2f
Added clarity: remote-exec connection requirement
This is a secondary change to PR #28578 

Details:
According to the [Provisioner Connection](https://www.terraform.io/docs/language/resources/provisioners/connection.html) page, provisioners require the connection block.

This change of behavior is shown prominently within a note on the [Provisioner Connection](https://www.terraform.io/docs/language/resources/provisioners/connection.html) page:

> Note: In Terraform 0.11 and earlier, providers could set default values for some connection settings, so that connection blocks could sometimes be omitted. This feature was removed in 0.12 in order to make Terraform's behavior more predictable.

However, this behavioral change is omitted from the [remote-exec provisioner](https://www.terraform.io/docs/language/resources/provisioners/remote-exec.html) page which is where a user will be if they are attempting to follow the prior behavior when this was permissible in versions prior to 0.12. This change prompts the user of that change and directs to the connection page.
2021-05-02 17:14:10 -05:00
Martin Atkins 6bed3008a5 website: Reworking of the "terraform plan" docs, and related pages
It's been a long time since we gave this page an overhaul, and with our
ongoing efforts to make plan and apply incorporate all of the side-effects
that might need to be done against a configuration it seems like a good
time for some restructuring in that vein.

The starting idea here is to formally split the many "terraform plan"
options into a few different categories:
 - Planning modes
 - Planning options
 - Other options

The planning modes and options are the subset that are also accepted by
"terraform apply" when it's running in its default mode of generating a
plan and then prompting for interactive approval of it. This then allows
us to avoid duplicating all of that information on the "terraform apply"
page, and thus allows us to spend more words discussing each of them.

This set of docs is intended as a fresh start into which we'll be able to
more surgically add in the information about -refresh-only and -replace=...
once we have those implemented. Consequently there are some parts of this
which may seem a little overwraught for what it's currently describing;
that's a result of my having prepared this by just deleting the
-refresh-only and -replace=... content from our initial docs draft and
submitted the result, in anticipation of re-adding the parts I've deleted
here in the very near future in other commits.
2021-04-30 14:27:36 -07:00
Sam Velie 5d04c4ea27
docs: correct spelling of normally (#28508) 2021-04-30 12:24:02 -04:00
Martin Atkins b802237e03 plans: Track an optional extra "reason" for some planned actions
Previously we were repeating some logic in the UI layer in order to
recover relevant additional context about a change to report to a user.
In order to help keep things consistent, and to have a clearer path for
adding more such things in the future, here we capture this user-facing
idea of an "action reason" within the plan model, and then use that
directly in order to decide how to describe the change to the user.

For the moment the "tainted" situation is the only one that gets a special
message, matching what we had before, but we can expand on this in future
in order to give better feedback about the other replace situations too.

This also preemptively includes the "replacing by request" reason, which
is currently not reachable but will be used in the near future as part of
implementing the -replace=... plan command line option to allow forcing
a particular object to be replaced.

So far we don't have any special reasons for anything other than replacing,
which makes sense because replacing is the only one that is in a sense
a special case of another action (Update), but this could expand to
other kinds of reasons in the future, such as explaining which of the
few different reasons a data source read might be deferred until the
apply step.
2021-04-29 17:50:46 -07:00
Kristin Laemmert f6af7b4f7a
lang/funcs: add (console-only) TypeFunction (#28501)
* lang/funcs: add (console-only) TypeFunction

The type() function, which is only available for terraform console,
prints out the type of a given value. This is mainly intended for
debugging - it's nice to be able to print out terraform's understanding
of a complex variable.

This introduces a new field for Scope: ConsoleMode. When ConsoleMode is true, any additional functions intended for use in the console (only) may be added.
2021-04-23 10:29:50 -04:00
joshschmitter 0c4e823ee6
setsubtract doc: use "Relative Complement" correctly
The explanation of the setsubtract function in terms of a Relative Complement is backwards.  Fixing it.
2021-04-22 08:26:50 -05:00
Rachel Sharp 98ce186be9
Merge pull request #28443 from hashicorp/res-add-learn-link-debug-1
Add Learn link to Debugging
2021-04-21 22:59:19 -04:00
John Houston fabdf0bea1
Add config_paths and drop KUBECONFIG env variable in kubernetes backend (#26997) 2021-04-20 10:05:45 -04:00
sanflores 751fba49a7
website: v0.15 upgrade guide had invalid example for tomap(...)
tomap expects an object value with braces, not a tuple value with brackets.
2021-04-19 10:20:03 -07:00
Rachel Sharp 56483d10d2
Update debugging.html.md 2021-04-19 12:18:02 -04:00
Kristin Laemmert 85adad0ec7
docs: small update for provider binary locations (#28413)
* docs: add note that provider binaries need to be placed in appropriate subdirectories under the default locations
2021-04-19 09:04:46 -04:00
Martin Atkins dedac2cdd6 website: v0.15 Upgrade Guide entry for Azure Backend arguments
Terraform v0.15 includes the conclusion of the deprecation cycle for some
renamed arguments in the "azure" backend.

We missed this on the first draft of the upgrade guide because this change
arrived along with various other more innocuous updates and so we didn't
spot it during our change review.
2021-04-15 10:30:11 -07:00
Martin Atkins 035d1648e4 website: Link to the v0.15 upgrade guide
Unfortunately it seems that this link got lost in a merge conflict when
we did the big nav refactor earlier in the v0.15 cycle, so here we'll
retoractively add it to the new location for upgrade guide nav, in the
language layout rather than the downloads layout.
2021-04-15 10:17:02 -07:00
Martin Atkins 5f5432e8ea
website: v0.15 upgrade guide for sensitive resource attributes (#28355)
* website: v0.15 upgrade guide for sensitive resource attributes

Our earlier draft of this guide didn't include a section about the
stabilization of the "provider_sensitive_attrs" language experiment. This
new section aims to address the situation where a module might previously
have been returning a sensitive value without having marked it as such,
and thus that module will begin returning an error after upgrading to
Terraform v0.15.

As part of that, I also reviewed the existing documentation about these
features and made some edits aiming to make these four different sections
work well together if users refer to them all at once, as they are likely
to do if they follow the new links from the upgrade guide. I aimed to
retain all of the content we had before, but some of it is now in a new
location.

In particular, I moved the discussion about the v0.14 language experiment
into the upgrade guide, because it seems like a topic only really relevant
to those upgrading from an earlier version and not something folks need to
know about if they are using Terraform for the first time in v0.15 or
later.

* minor fixups

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2021-04-14 09:04:40 -04:00
Yves Peter c6de87354a document that destroy provisioners don't run with create_before_destroy 2021-04-13 10:26:32 +02:00
Martin Atkins 140c613ae8 lang/funcs: "one" function
In the Terraform language we typically use lists of zero or one values in
some sense interchangably with single values that might be null, because
various Terraform language constructs are designed to work with
collections rather than with nullable values.

In Terraform v0.12 we made the splat operator [*] have a "special power"
of concisely converting from a possibly-null single value into a
zero-or-one list as a way to make that common operation more concise.

In a sense this "one" function is the opposite operation to that special
power: it goes from a zero-or-one collection (list, set, or tuple) to a
possibly-null single value.

This is a concise alternative to the following clunky conditional
expression, with the additional benefit that the following expression is
also not viable for set values, and it also properly handles the case
where there's unexpectedly more than one value:

    length(var.foo) != 0 ? var.foo[0] : null

Instead, we can write:

    one(var.foo)

As with the splat operator, this is a tricky tradeoff because it could be
argued that it's not something that'd be immediately intuitive to someone
unfamiliar with Terraform. However, I think that's justified given how
often zero-or-one collections arise in typical Terraform configurations.
Unlike the splat operator, it should at least be easier to search for its
name and find its documentation the first time you see it in a
configuration.

My expectation that this will become a common pattern is also my
justification for giving it a short, concise name. Arguably it could be
better named something like "oneornull", but that's a pretty clunky name
and I'm not convinced it really adds any clarity for someone who isn't
already familiar with it.
2021-04-12 15:32:03 -07:00
Paul Tyng b8a0929a5d
Add null to tostring docs 2021-04-10 15:55:29 -04:00
Paul Tyng b3fe8713e8
Add null to tonumber docs 2021-04-10 15:54:51 -04:00
Paul Tyng eb927958bd
Add null to tobool docs 2021-04-10 15:52:23 -04:00
Víctor Felipe Godoy Hernández a9487c7674
Fix yamldecode example from json to yaml (#28220)
* Fix yamldecode example from json to yaml

* inline yaml example
2021-04-05 13:41:07 -04:00
Martin Atkins f47c4efb1b website: Dynamic blocks can for_each any collection type
We previously added a hint to both resource for_each and dynamic blocks
about using the "flatten" and "setproduct" situations to construct
suitable collections to repeat over.

However, we used the same text in both places which ended up stating that
dynamic blocks can only accept map or set values, which is a constraint
that applies to resource for_each (because we need to assign a unique
identifier to each instance) and not to dynamic blocks (which don't have
any uniqueness enforced by Terraform Core itself).

To remove that contradiction with the text above which talks about what
is valid here, I've just generalized this to say "collection", because
the primary point of this paragraph is the "one element per desired nested
block" part, not specifically what sort of collections are permitted in
this location. (Text further up describes the supported types.)
2021-03-30 09:43:33 -07:00
Robin Norwood e3bd661470
Merge pull request #28164 from hashicorp/rln-add-resource-targeting-tutorial-callout
Add callout to resource targeting tutorial
2021-03-29 09:12:30 -05:00
Matthew Frahry 15779013da
backend/azurerm: Bug fixes and updated dependencies #28181 2021-03-26 14:07:56 -07:00
Judith Malnick 75fbbe8065
clarify version that pull upgrades local state to (#28204) 2021-03-26 13:57:44 -07:00
Martin Atkins 6f35c2847b command: Reorganize docs of the local backend's legacy CLI options
We have these funny extra options that date back to before Terraform even
had remote state, which we've preserved along the way by most recently
incorporating them as special-case overrides for the local backend.

The documentation we had for these has grown less accurate over time as
the details have shifted, and was in many cases missing the requisite
caveats that they are only for the local backend and that backend
configuration is the modern, preferred way to deal with the use-cases they
were intended for.

We always have a bit of a tension with this sort of legacy option because
we want to keep them documented just enough to be useful to someone who
finds an existing script/etc using them and wants to know what they do,
but not to take up so much space that they might distract users from
finding the modern alternative they should consider instead.

As a compromise in that vein here I've created a new section about these
options under the local backend documentation, which then gives us the
space to go into some detail about the various behaviors and interactions
and also to discuss their history and our recommended alternatives. I then
simplified all of the other mentions of these in command documentation
to just link to or refer to the local backend documentation. My hope then
is that folks who need to know what these do can still find the docs, but
that information can be kept out of the direct path of new users so they
can focus on learning about remote backends instead.

This is certainly not the most ideal thing ever, but it seemed like the
best compromise between the competing priorities I described above.
2021-03-25 13:56:48 -07:00
Matthew Frahry 13b41d59f5 Website Test Fix 2021-03-25 13:47:12 -07:00
Matthew Frahry 3546650ac6 backend/azurerm: adding the right role name 2021-03-22 10:51:01 -07:00
Robin Norwood 31323b911b Add callout to resource targeting tutorial 2021-03-22 11:55:41 -05:00
Matthew Frahry a978d4ee99 website: adding the new fields to azurerm 2021-03-22 09:53:52 -07:00
Tej-Singh-Rana 2a49d908b8
fix the typo (#28140) 2021-03-22 10:51:45 -04:00
Pam Selle 683422e54f
Merge pull request #28113 from hashicorp/pselle/provider_sensitive_attrs_docs
Update documentation for provider_sensitive_attrs experiment
2021-03-18 11:24:55 -04:00
James Bardin c6278bbe37
Merge pull request #28042 from jasons42/update-workspaces-docs
Indicate etcdv3 support for multiple workspaces in docs
2021-03-17 14:13:08 -04:00
Alisdair McDiarmid b6ca782993 documentation: Clarify JSON diagnostic traversal
The traversal value is normally a valid HCL string, but can be
simplified if a traversal step has a complex index value (e.g. an
object). This means it is not always parseable HCL, so this commit
updates the documentation to clarify this and explicitly record that we
do not guarantee its contents are stable. The purpose of these values is
purely for building human-readable UI.
2021-03-17 11:46:24 -04:00
Alisdair McDiarmid 53739f0aac
Merge pull request #28108 from hashicorp/alisdair/validate-json-format-version
cli: Add format version to validate -json output
2021-03-17 11:38:21 -04:00
Martin Atkins 89b2405080 lang/funcs: "sensitive" and "nonsensitive" functions
These aim to allow hinting to Terraform about situations where it's not
able to automatically infer value sensitivity.

"nonsensitive" is for situations where Terraform's behavior is too
conservative, such as when a new value is derived from a sensitive value
in such a way that all of the sensitive content is removed.

"sensitive", on the other hand, is for situations where Terraform can't
otherwise infer that a value is sensitive. These situations should be
pretty rare in a module that's making effective use of sensitive input
variables and output values, but the documentation shows one example of
an uncommon situation where a more direct hint via this function would
be needed.

Both of these functions are aimed at only occasional use in unusual
situations. They are here for reasons of pragmatism, not because we
expect them to be used routinely or recommend their use.
2021-03-16 16:26:22 -07:00
Paddy 0b5c4a6a2c
Accept TF_LOG=json to enable TRACE logs in JSON format
This is not currently a supported interface, but we plan to release
tool(s) that consume parts of it that are more dependable later,
separately from Terraform CLI itself.
2021-03-16 14:59:15 -07:00
Pam Selle 81e8167a4c Update documentation for provider_sensitive_attrs experiment
Update documentation to reference that this experiment is now
default in 0.15+
2021-03-16 13:31:43 -04:00
Alisdair McDiarmid 46a29b13ed cli: Add format version to validate -json output
In line with the other complex JSON output formats for plan and provider
schema, here we add an explicit `format_version` field to the JSON
output of terraform validate.
2021-03-16 09:46:36 -04:00
Jorge Nerín ede75a944f
Update expressions.html.md
Just correction of the link to operators.html.
2021-03-15 13:43:18 +00:00
Alisdair McDiarmid 2a85f0483f website: Update validate -json diags documentation
Updated to include details about the new "snippet" object in JSON
diagnostics.
2021-03-12 14:25:11 -05:00
Martin Atkins dc7f2b7314 website: docs for the terraform validate JSON output 2021-03-12 09:39:56 -08:00
Jason Smith 024035114a Fix broken link error
Link to https://consul.io/ is not actually broken but returns a 307
redirect to https://www.consul.io/ which the broken link test counts as a failure.
2021-03-10 15:38:22 -06:00
Jason Smith 8663b2100a Indicate etcdv3 support for multiple workspaces 2021-03-10 15:36:37 -06:00
Antoine Cotten 3442873cdb
docs: Update link to HCL native syntax spec 2021-03-10 17:47:21 +01:00
Masayuki Morita 31a5aa1878
command/init: Add a new flag `-lockfile=readonly` (#27630)
Fixes #27506

Add a new flag `-lockfile=readonly` to `terraform init`.
It would be useful to allow us to suppress dependency lockfile changes
explicitly.

The type of the `-lockfile` flag is string rather than bool, leaving
room for future extensions to other behavior variants.

The readonly mode suppresses lockfile changes, but should verify
checksums against the information already recorded. It should conflict
with the `-upgrade` flag.

Note: In the original use-case described in #27506, I would like to
suppress adding zh hashes, but a test code here suppresses adding h1
hashes because it's easy for testing.

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2021-03-09 11:12:00 -05:00
Aaron Lane f172585eaa Fix Kitchen-Terraform language in test experiment
This isn't incredibly important, but Kitchen-Terraform is written in and requires tests to be written in Ruby.
2021-02-25 14:12:00 -08:00
Kristin Laemmert 106bcd3bf0
update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
James Bardin b735d80f1f website: Provider configuration notes for the v0.15 upgrade guide 2021-02-24 09:37:55 -08:00
Martin Atkins 9508ff2630 website: Terraform v0.15 upgrade guide first draft
As usual, we'll continue to iterate on this based on feedback and
questions during the beta period, but this is a first draft intended to
help those who are trying out the first beta.
2021-02-24 09:37:55 -08:00
Alisdair McDiarmid 79f855b83b
Merge pull request #27840 from OJFord/docs-27554
Document `inline` & `on_failure` behaviour
2021-02-23 13:15:56 -05:00
Rachel Sharp 3cb4918739
Merge pull request #27862 from hashicorp/add-state-learn-tutorial
Add State Learn tutorial to State docs
2021-02-23 13:11:27 -05:00
James Bardin c103242bef
Merge pull request #27885 from hashicorp/jbardin/show-json
jsonstate: indicate schema version mismatch during encoding
2021-02-23 12:57:06 -05:00
James Bardin c7995b7d4b update show -json docs 2021-02-23 11:45:50 -05:00
Martin Atkins 8d37a70987 website: Initial docs for the module integration testing experiment
Since this is still at an early phase and likely to change significantly
in future iterations, rather than attempting to guess on a suitable final
location for documenting the testing feature I've instead taken the
unusual approach of adding a new page that is explicitly about the
experiment. My expectation is that once we conclude the experiment we'll
replace this new page with a stub that just explains that there was once
an experiment and then links to whatever final feature unfolded from the
research.

The URL for this page is hard-coded into the warning message in the
"terraform test" command, so as we continue to evolve this feature in
future releases we'll need to update the callout note on the page about
which Terraform CLI version it's currently talking about, so users of
older versions can clearly see when they'd need to upgrade in order to
participate in a later incarnation of the experiment.
2021-02-22 14:21:45 -08:00
Rachel Sharp 2f287b41de
Add State Learn tutorial to State docs 2021-02-22 11:39:18 -05:00
Oliver Ford 2f7c368d91
Document `inline` & `on_failure` behaviour
cf. #27554
2021-02-19 17:56:48 +00:00
Pam Selle 84696eae33
Merge pull request #27816 from jessicastenning/fix-docs-grammatical-mistake
Fix sentence in v0.14 upgrade guide
2021-02-18 12:37:53 -05:00
Pam Selle 8d2fbd4cd8
Remove deprecation on undeclared variable, docs, and summary adjustment (#27795)
* Remove deprecation on undeclared variable

Remove deprecation and add docs specific to the behavior around
undeclared variable values

* Limit full warnings to 2 instances, then summary

This way, the third warning is a summary, rather than the fourth
warning being the summary
2021-02-18 11:11:52 -05:00
Jessica Stenning 24e7a5596b Fix sentence in v0.14 upgrade guide 2021-02-18 14:34:04 +00:00
Andy Slezak 0639054683
sentence refactor - consistently -> consistency 2021-02-16 18:29:31 -05:00
James Bardin d54a9b176b
Update website/docs/language/providers/configuration.html.md
Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2021-02-12 14:57:51 -05:00
James Bardin e40727076f
Update website/docs/language/modules/develop/providers.html.md
Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2021-02-12 14:57:26 -05:00
James Bardin 9859d4e70b
Update website/docs/language/modules/develop/providers.html.md
Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2021-02-12 14:55:57 -05:00
James Bardin dfd8424392 link configuration aliases between pages 2021-02-12 14:54:55 -05:00
James Bardin 1bb602859a update docs for configuration_aliases
Remove references to the "proxy configuration block" concept, and add
examples showing the usage of `configuration_aliases`.
2021-02-12 11:45:41 -05:00
Pam Selle f97f8c2a9b
Merge pull request #27708 from philipsahli/patch-1
Fix typo
2021-02-09 11:14:16 -05:00
Stephen e39abbf6f0
fix regex logical or documentation (#27637)
* fix regex logical or documentation

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2021-02-08 11:04:38 -05:00
Philip Sahli d7cbf8f1fc
Fix typo 2021-02-08 16:56:19 +01:00
Robin Norwood 181048b913 Add crosslink to new Learn tutorial 2021-02-04 13:43:03 -06:00
Alisdair McDiarmid 888f36aebb cli: Remove positional plan argument from graph
To make the command arguments easier to understand and extend, we are
moving away from positional arguments. This commit changes the graph
command to take a `-plan` flag instead of an optional trailing path.
2021-02-02 13:21:26 -05:00
Pam Selle 6da55c0521 Update grammar for flags 2021-01-26 11:35:44 -05:00
Andor Markus f658531883 Updating terraform workspace website list.html.md new.html.md select.html.md files thus it reflect the current version of Terraform CLI 2021-01-26 11:35:43 -05:00
Pam Selle e1b0e3ce92 Remove -module option for taint and untaint
This has been an error with help text, and can be removed.
2021-01-25 18:19:17 -05:00
Alisdair McDiarmid 75d38b50b1 docs: Note: state pull upgrades to current version 2021-01-25 10:31:11 -05:00
Nick Fagerlund 6d016af7c5 website: Remove links to legacy provider docs for GitHub, ksyun
These providers are now published to the registry, as planned.
2021-01-22 12:51:35 -08:00
Nick Fagerlund 4e4f6b3f42 website: Restore note about standard vs. enhanced backends 2021-01-22 12:22:21 -08:00
Nick Fagerlund 33d2d9abb5 website: CLI: Remove several ghost pages, update old links
- /docs/plugins/*
- /docs/commands/state/addressing.html

These were redundant pages.
2021-01-22 12:22:21 -08:00
Nick Fagerlund d1e8537b33 website: CLI: Update links to moved docs pages 2021-01-22 12:22:21 -08:00
Nick Fagerlund a8332703c9 website: CLI: Move docs files to match new URLs 2021-01-22 12:22:21 -08:00
Nick Fagerlund 01a449e335 website: CLI: Update sidebar nav with new URLs 2021-01-22 12:22:21 -08:00
Nick Fagerlund b909a4a3a1 website: Move hidden attr-as-blocks page into new URL structure
This is a "ghost page" that remains relevant and useful, under certain rare
circumstances.
2021-01-22 12:22:21 -08:00
Nick Fagerlund 8cfcd82be3 website: Language: Remove several ghost pages, update links
During the language/CLI docs reorg, we noticed several pages that were no longer
viable; some were redundant, some useless, and some just very obsolete.

Since we were trying to avoid breaking links at the time, we opted to remove
them from the navs and leave them as "ghost pages" — still accessible, but not
findable.

This commit finally cleans these ghosts up and updates any remaining links to
relevant modern pages. Bustin' makes me feel good. 👻🚫
2021-01-22 12:22:21 -08:00
Nick Fagerlund 7a8dd326c6 website: Language: Update links to moved pages 2021-01-22 12:22:21 -08:00
Nick Fagerlund 78dcc8dc1b website: Language: Move files to match new URL structure 2021-01-22 12:22:21 -08:00
Nick Fagerlund b71786d9de website: Language: Update sidebar nav with new URLs
The files aren't moved as of this commit, but this serves as a map for the
subsequent changes.
2021-01-22 12:22:20 -08:00
Nick Fagerlund 22d7c11d8a website: Language: Remove the "this is 0.12+" message from language docs
The sun has set on 0.11, so the value of maintaining this message on nearly
every page has crashed to almost zero. Time to pull it.
2021-01-22 12:22:20 -08:00
fredtrimble 7b3b401da4
Update index.html.md
Change the word "date" to "data"
2021-01-16 10:49:37 -05:00
Pam Selle 61f9d2177b
Merge pull request #27486 from hashicorp/pselle/version-doc
Add documentation page for version
2021-01-13 12:44:11 -05:00
Rémy Léone edb4c00a86
website: add links to the registry provider documentation (#27416)
* docs: add links to the registry provider documentation

* Adjust wording/link URL

Co-authored-by: Nick Fagerlund <nick@hashicorp.com>
2021-01-12 16:06:50 -08:00
Nick Fagerlund 303b326008
Merge pull request #27279 from kowshikRoy/add-var-multiple-example
website: add example of multiple var cli
2021-01-12 15:58:31 -08:00
Nick Fagerlund 66f2c82d33 website: Add version command to sidebar nav and to plugins overview page 2021-01-12 14:40:45 -08:00
Nick Fagerlund ccb205896d website: Fix alphabetical ordering of commands 2021-01-12 14:34:45 -08:00
Pam Selle cf0c54f834 Add documentation page for version
The version command, although not the mightiest of our commands,
did not have a page among our docs.
2021-01-12 17:06:53 -05:00
Pam Selle ae52190c01
Merge pull request #27415 from techsolx/patch-1
Chage backend.tmpl to config.tmpl in Maps example,
2021-01-12 10:43:08 -05:00
Pam Selle 516ad2c8e4
Merge pull request #27432 from bulletinmybeard/patch-1
Update gcs.html.md
2021-01-11 16:19:13 -05:00
Pam Selle e22ccd424c Add note about removal to web docs 2021-01-11 14:55:49 -05:00
Cladius Fernando 25003a0caa
Corrected minor typo
On Windows, the file must be named named terraform.rc => On Windows, the file must be named terraform.rc
2021-01-09 10:52:59 +05:30
Robin Schulz 64f9180a3c
Update gcs.html.md
Just a typo
2021-01-07 12:21:29 +01:00
Chris Arcand 5440d9653b [skip-ci] Remove documentation on 'CONFIRM_DESTROY'
This variable mechanism was replaced long ago with a explicit `Allow
destroy plans` setting on a Terraform Cloud workspace, and no longer
does anything: https://www.terraform.io/docs/cloud/workspaces/settings.html#destruction-and-deletion

Rather than mention this new mechanism at all though, I've removed the
requisite from here entirely - the reason being that a consideration
like this is no different from other permission concerns (e.g. "You must
have Apply permission on a workspace to `apply`"), and without
enumerating _all_ of these here - which doesn't seem appropriate - we
just remove this concern entirely.
2021-01-06 10:07:31 -06:00
JohnM 72e657edcc
Chage backend.tmpl to config.tmpl in Maps example,
Reference file in Maps example is named config.tmpl, example used backend.tmpl from previous section.
2021-01-05 21:55:06 -08:00
Nick Fagerlund 5ceb8b2b98 website: Adopt `terraform_remote_state` into language docs
...and also shrink the explanation for alternate sharing approaches, a bit.

Actually, it looks like I already half-adopted it by accident. 😬 But this
commit adds it to the sidebar under "State", so users can browse to it. I'm
leaving the URL alone, because it's not urgent and we'll need to adjust a large
swath of URLs at some point anyway.

This change effectively stops presenting `terraform` as a provider in the normal
sense, and reduces /docs/providers/terraform/index.html to a ghost page in the
language section (to avoid breaking links for the time being). The message a
reader should get is that Terraform has one special built-in data source where
you don't need to think about the provider or its version.
2021-01-04 12:08:09 -08:00
stakiran 3ce7edc018
website: Fix wrong link of operators.
not "references.html" but "operators.html".
2020-12-27 21:15:13 +09:00
Nick Fagerlund cc6a226bcf website: Remove provider category indexes, reduce main list
As of December 18, 2020, we've redirected nearly all of the provider
documentation that used to live on terraform.io:

- For providers that got published on the Registry, we redirected each docs page
to the corresponding Registry docs page.

- For providers that never got adopted by a new publisher, we archived the
GitHub repository and redirected each docs page to the corresponding Markdown
source file on github.com. (For an example of these redirects, see
https://www.terraform.io/docs/providers/telefonicaopencloud/r/s3_bucket.html)

There are ten providers left that we haven't redirected. These ones got adopted
by new publishers and _will_ end up on the Registry, but they aren't quite ready
to ship and get their permanent redirects, and we don't want to sabotage their
SEO by 301ing to a temporary destination.
2020-12-18 13:13:45 -08:00
Robin Norwood 235c141565 Add links to outputs and locals tutorials 2020-12-17 12:24:53 -08:00
Nick Fagerlund 85d477aee9 website: Fix numerous links with redirects or broken anchors
These links largely still go somewhere useful, but they have some kind of issue
revealed by our new link checker:

- Some of them point to a stale URL that redirects, and can be updated to the
  new destination.
- Some of them point to anchors that don't exist (anymore?) in the destination.
- Some of them end up redirecting unnecessarily due to how the server handles
  directory URLs without trailing slashes. Sorry, I know that's pointless, just,
  humor me for the time being so we can get our CI green. 😭

In a couple cases, I've added invisible anchors to destination pages, either to
preserve an old habit or because the current anchors kind of suck due to being
particularly long or meandering.
2020-12-17 12:23:50 -08:00
Nick Fagerlund 1fff4e2690 website: Update links to redirected provider docs pages
This commit intentionally leaves the indexes of provider docs alone, to avoid
merge conflicts when we delete those.
2020-12-17 12:23:50 -08:00
Pam Selle 1970c14a53
[docs] Add limitations section to for_each (#27299)
* Add limitations section to for_each

Move limitations from a note to their own section,
to allow for expansion on disallowing sensitive values
in for_each
2020-12-17 11:03:14 -05:00
Pam Selle d7f3239c51 Document sensitivity + function call behavior 2020-12-14 15:38:47 -05:00
Repon Kumar Roy 7d093cbede website: add example of multiple var cli
This PR updates the documentation of input variable of terraform. It's
mentioned that multiple `-var` is possible, but no example is given.
This PR adds an example of multiple `-var` option
2020-12-15 02:09:30 +08:00
Kristin Laemmert 8bab3dd374
command/state list: list resources in nested and expanded modules (#27268)
* command/state list: list resources in nested and expaneded modules

A few distinct bugs fixed in here:

There was a bug in the logic checking if a given module was the child of
the targetAddr, now fixed. That resolved the basic issue where resources
in nested submodules were not listed.

The logic around allowMissing needed some tweaking to allow for empty
modules, as long as those modules had submodules with resources. state
list is the only command using allowMissing with false so this felt safe
to do.

Finally I extended the logic so list would included expanded modules,
which is to say giving module.foo would result in resources from
module.foo[1], module.foo[0], etc.

* update state list docs to show that module filtering includes any nested
modules
2020-12-14 11:07:15 -05:00
James Bardin cd4cb3f8d2 add implied data depends_on caveat 2020-12-11 13:42:09 -05:00
Nick Fagerlund 48d35b9332 website: Fix a stray broken link to 0.8 -> 0.9 backend upgrade doc
I missed this earlier because my link checker was collapsing the two links from
this page to that page into a single report.

For posterity's sake, I'm linking directly to the markdown file in GitHub at an
appropriate tag version. I do not expect anyone to ever click this link again,
though.
2020-12-09 13:28:01 -08:00
Martin Atkins 3268a7eaba command/output: Raw output mode
So far the output command has had a default output format intended for
human consumption and a JSON output format intended for machine
consumption.

However, until Terraform v0.14 the default output format for primitive
types happened to be _almost_ a raw string representation of the value,
and so users started using that as a more convenient way to access
primitive-typed output values from shell scripts, avoiding the need to
also use a tool like "jq" to decode the JSON.

Recognizing that primitive-typed output values are common and that
processing them with shell scripts is common, this commit introduces a new
-raw mode which is explicitly intended for that use-case, guaranteeing
that the result will always be the direct result of a string conversion
of the output value, or an error if no such conversion is possible.

Our policy elsewhere in Terraform is that we always use JSON for
machine-readable output. We adopted that policy because our other
machine-readable output has typically been complex data structures rather
than single primitive values. A special mode seems justified for output
values because it is common for root module output values to be just
strings, and so it's pragmatic to offer access to the raw value directly
rather than requiring a round-trip through JSON.
2020-12-09 10:10:02 -08:00
Pam Selle aa044bdd39 Fix docs for 0.15 for vendor provisioners 2020-12-08 16:51:50 -05:00
Hyunsuk Shin 16f8baa40e
Update setproduct.html.md (#27184)
fill wrong syntax
2020-12-08 10:05:37 -04:00
Martin Atkins 776b33db32 website: Recommend against making JSON/YAML with heredocs
This is a repeated cause of confusion and questions in the community
forum, because both JSON and YAML valid syntax are hard to generate using
just string concatenation. Terraform has built-in functions for both of
these common serializations to avoid those problems, and so this will
hopefully make these better alternatives more discoverable.
2020-12-07 15:39:37 -08:00
Martin Atkins ab1dd87540 website: Elaborate the "expressions" sub-pages in the language section
When we did the earlier documentation rework for Terraform v0.12 we still
had one big "Expressions" page talking about the various operators and
constructs, and so we had to be a bit economical with the details about
some more complicated constructs in order to avoid the page becoming even
more overwhelming.

However, we've recently reorganized the language documentation again so
that the expressions section is split across several separate pages, and
that gives some freedom to go into some more detail about and show longer
examples for certain features.

My changes here are not intended to be an exhaustive rewrite but I did
try to focus on some areas I've commonly seen questions about when helping
in the community forum and elsewhere, and also to create a little more
connectivity between the different content so readers can hopefully find
what they are looking for more easily when they're not yet sure what
terminology to look for.
2020-12-07 15:39:37 -08:00
Pam Selle b963ea8594 Update docs and add warning for -get-plugins
As of Terraform 0.13+, the get-plugins command has been
superceded by new provider installation mechanisms, and
general philosophy (providers are always installed, but
the sources may be customized). Updat the init command
to give users a warning if they are setting this flag,
to encourage them to remove it from their workflow, and
update relevant docs and docstrings as well
2020-12-07 14:13:52 -05:00
Pam Selle 0c0ea09546
Merge pull request #27134 from tillepille/patch-1
documentation: fix small typo
2020-12-04 11:15:14 -05:00
Dmitry Tokarev 8d1c416a53
website: Fix link to external documentation "Git URLs" 2020-12-03 13:24:56 -08:00
Petros Kolyvas 2ce71ab43c
Upgrade guide link fix (#27124) 2020-12-03 15:21:58 -04:00
Masayuki Morita 93b6f15c9d
website: Fix typo in docs/commands/cli-config (#27038) 2020-12-03 14:30:24 -04:00
Petros Kolyvas 20a5db1c86
Website: 0.14 Upgrade guide additions (#27112)
* Update 0-14.html.markdown

Spelling again. Thanks @pselle
2020-12-03 14:21:31 -04:00
Nick Fagerlund 0c0749edcf
website: Fix several broken links (#27091) 2020-12-03 13:54:38 -04:00
Martin Atkins 323cd4364b website: Correct formatting for lists in dependency lock docs
I originally drafted these docs in a context where I was relying on
GitHub's Markdown renderer, and carelessly imported them into the
Terraform website without verifying that the website's Markdown renderer
could process it. This particular quirk has bitten us before: the website
Markdown parser expects follow-on paragraphs in a list item to be indented
at least four spaces, and with less than that it ignores the leading
whitespace altogether and just understands a normal paragraph.

This change will cause the follow-on paragraphs to now correctly render
as part of the bullet points they are intended to be attached to.
2020-12-03 09:16:58 -08:00
Mark Lewis 9935138e1c
Update for_each.html.md
minor grammar improvement.
2020-12-03 16:45:52 +00:00
Mark Lewis ffea7a4cda
Update for_each.html.md 2020-12-03 16:45:04 +00:00
Tim Schrumpf e102465e91
fix small typo 2020-12-03 16:05:19 +01:00
Connor Osborn 2c2ed53ff3
Fix apt install typo (#27074)
Apt install expects a `name=version` NOT `name==version`
2020-12-03 10:23:14 -04:00
Petros Kolyvas 5cb2d4894c
Anytrue alltrue docs clarification. (#27108)
* Anytrue alltrue docs clarification.

* Update alltrue.html.md

I can't spell.

* Update anytrue.html.md

Yes, I can't spell.
2020-12-03 10:13:20 -04:00
Nick Fagerlund cca1bc91c3 website: fix bad layout in defaults function page
This layout no longer exists.
2020-12-02 14:11:44 -08:00
Nick Fagerlund 5cff04b3ab website: fix malformed yaml in a few function pages 2020-12-02 14:11:32 -08:00
Pam Selle c6ab9b1553
Merge pull request #26938 from hashicorp/pselle/remove-vendor-provisioners
Remove vendor provisioners
2020-12-02 11:48:40 -05:00
Martin Atkins 832bd5f41f website: Initial docs for the provider_sensitive_attrs experiment
This is under a heading "Sensitive Resource Attributes" on the assumption
that if we later stabilize this feature then this heading will live on
with some different content that describes the propagation of sensitive
values from resource attributes, rather than describing the experiment.
2020-12-02 08:06:08 -08:00
Pam Selle 67fe3bfd69
Merge pull request #27058 from hashicorp/paultyng-patch-1
Add comments about this URL being linked to in the CLI
2020-12-02 09:42:16 -05:00
Nick Fagerlund 83ebb9b178 website: Add big whitespace separators to recovery landing pages
The resources, expressions, and modules pages were all split into smaller, more
navigable pages, but the old URLs had accumulated a large number of deep links
to their section headers. To help people recover when they click an old link, we
converted those old URLs to landing pages, which preserve all of the old in-page
anchors and point readers to the appropriate new destinations.

However, because the new link-to-new-page sections are so small, it was kind of
hard to tell which section you had clicked into! Especially if you were near the
bottom of the page and the browser wasn't able to position the desired section
at the very top of the window.

This commit aims to improve that by putting one full screen of whitespace in
between every linkable section on these landing pages. Yes, it's a hack, but
you're meant to only view these pages for three seconds or so before moving on
to the place you wanted to be, and this should help dispel any confusion about
which place that is.
2020-12-01 15:38:25 -08:00
Nick Fagerlund d5950b7fd2 website: link to dependency lock file tutorial 2020-12-01 15:20:14 -08:00
Nick Fagerlund 652b48bb49 website: link to sensitive variables tutorial 2020-12-01 15:16:16 -08:00
Nick Fagerlund a1e73ade61 website: link to expressions tutorial where applicable
This tutorial uses references to local values, conditional expressions,
and splat expressions, so I've added it to those pages as well as the
expressions overview.
2020-12-01 13:12:12 -08:00
Nick Fagerlund 5895472c93 website: link to functions tutorial where applicable 2020-12-01 13:10:05 -08:00
Paul Tyng c4b46a5c98
Update signing.html.md 2020-11-30 16:13:49 -05:00
Martin Atkins 111825da45 website: More words about "terraform fmt"
We've historically made statements like this in response to requests for
more customization to the "terraform fmt" behavior, but the documentation
itself was somewhat vague about the intended goals of this command.

This is an attempt to be more explicit that consistency between codebases
is the primary goal of this command, and that the examples in the
Terraform documentation are our main guide for what is "idiomatic style"
when adding additional rules over time.

Nothing here is intended to be new policy, but instead as codifying
positions we've taken elsewhere in the past in the hope of allowing users
to decide how (and whether) they wish to make use of this tool.
2020-11-25 08:03:37 -08:00
Alisdair McDiarmid 42437482e5
Merge pull request #26947 from hashicorp/alisdair/backend-validate-remote-backend-terraform-version
backend: Validate remote backend Terraform version
2020-11-20 13:50:05 -05:00
Alisdair McDiarmid c5c1f31db3 backend: Validate remote backend Terraform version
When using the enhanced remote backend, a subset of all Terraform
operations are supported. Of these, only plan and apply can be executed
on the remote infrastructure (e.g. Terraform Cloud). Other operations
run locally and use the remote backend for state storage.

This causes problems when the local version of Terraform does not match
the configured version from the remote workspace. If the two versions
are incompatible, an `import` or `state mv` operation can cause the
remote workspace to be unusable until a manual fix is applied.

To prevent this from happening accidentally, this commit introduces a
check that the local Terraform version and the configured remote
workspace Terraform version are compatible. This check is skipped for
commands which do not write state, and can also be disabled by the use
of a new command-line flag, `-ignore-remote-version`.

Terraform version compatibility is defined as:

- For all releases before 0.14.0, local must exactly equal remote, as
  two different versions cannot share state;
- 0.14.0 to 1.0.x are compatible, as we will not change the state
  version number until at least Terraform 1.1.0;
- Versions after 1.1.0 must have the same major and minor versions, as
  we will not change the state version number in a patch release.

If the two versions are incompatible, a diagnostic is displayed,
advising that the error can be suppressed with `-ignore-remote-version`.
When this flag is used, the diagnostic is still displayed, but as a
warning instead of an error.

Commands which will not write state can assert this fact by calling the
helper `meta.ignoreRemoteBackendVersionConflict`, which will disable the
checks. Those which can write state should instead call the helper
`meta.remoteBackendVersionCheck`, which will return diagnostics for
display.

In addition to these explicit paths for managing the version check, we
have an implicit check in the remote backend's state manager
initialization method. Both of the above helpers will disable this
check. This fallback is in place to ensure that future code paths which
access state cannot accidentally skip the remote version check.
2020-11-19 13:19:40 -05:00
Nick Fagerlund 2014e8ef64 website: Remove registry docs (adopted into terraform-website)
The Registry is a web service whose behavior isn't directly tied to Terraform
core's release cycle; therefore, its docs should be decoupled from that release
cycle as well.

https://github.com/hashicorp/terraform-website/pull/1517 adopts the registry
docs into hashicorp/terraform-website, which already hosts several other
corpuses of documentation that aren't tied to Terraform core's version (like
Terraform Cloud, Terraform Enterprise, and Extending Terraform). Once that PR is
merged, we should remove the registry docs from this repository to avoid
confusing anyone.
2020-11-18 11:12:35 -08:00
Nick Fagerlund db82b80c9d website: Fix a random typo in azurerm backend 2020-11-18 10:47:52 -08:00
Nick Fagerlund f2f47c3c9f
website: Fix title of `terraform providers lock` page (#26956)
Probably a copy/paste error.

Co-authored-by: Petros Kolyvas <petros@hashicorp.com>
2020-11-18 10:45:27 -08:00
Martin Atkins af3f78975e website: Fix confusing example for local-exec provisioner
The local-exec provisioner documentation includes an example which refers
to an attribute of the current resource using its full traversal path,
rather than using "self" as we typically expect.

Due to some coincidences in how Terraform builds the dependency graph,
referring to the resource in this way happens to work when the resource
has only a single instance (the graph builder just skips that
self-referential dependency edge), but it fails if the user later tries
to add "count" or "for_each" to the resource, because at that point all
of the instances become dependent on one another, which creates a
dependency cycle.

Using "self" to access the current instance attributes is the usual
approach, so I've updated the documentation to show that.
2020-11-18 08:04:41 -08:00