diff --git a/website/docs/backends/config.html.md b/website/docs/backends/config.html.md index 5940a82d0..ec1b017e6 100644 --- a/website/docs/backends/config.html.md +++ b/website/docs/backends/config.html.md @@ -129,7 +129,7 @@ the reinitialization process, Terraform will ask if you'd like to migrate your existing state to the new configuration. This allows you to easily switch from one backend to another. -If you're using multiple [workspaces](/docs/state/workspaces.html), +If you're using multiple [workspaces](/docs/language/state/workspaces.html), Terraform can copy all workspaces to the destination. If Terraform detects you have multiple workspaces, it will ask if this is what you want to do. diff --git a/website/docs/backends/types/index.html.md b/website/docs/backends/types/index.html.md index 5ec60ee6f..17dcd48dd 100644 --- a/website/docs/backends/types/index.html.md +++ b/website/docs/backends/types/index.html.md @@ -17,7 +17,7 @@ these by calling a backend either **standard** or **enhanced**. All backends must implement **standard** functionality. These are defined below: * **Standard**: State management, functionality covered in - [State Storage & Locking](/docs/backends/state.html) + [State Storage & Locking](/docs/language/state/backends.html) * **Enhanced**: Everything in standard plus [remote operations](/docs/backends/operations.html). diff --git a/website/docs/cli-index.html.md b/website/docs/cli-index.html.md index 43854ee7d..6d66974e5 100644 --- a/website/docs/cli-index.html.md +++ b/website/docs/cli-index.html.md @@ -17,4 +17,4 @@ Cloud or Terraform Enterprise. Notably, this documentation does not cover the syntax and usage of the Terraform language. For that, see the -[Terraform Language Documentation](/docs/configuration/index.html). +[Terraform Language Documentation](/docs/language/index.html). diff --git a/website/docs/cli/code/index.html.md b/website/docs/cli/code/index.html.md index 3c72083c4..7c3c78a01 100644 --- a/website/docs/cli/code/index.html.md +++ b/website/docs/cli/code/index.html.md @@ -5,7 +5,7 @@ page_title: "Writing and Modifying Code - Terraform CLI" # Writing and Modifying Terraform Code -The [Terraform language](/docs/configuration/index.html) is Terraform's primary +The [Terraform language](/docs/language/index.html) is Terraform's primary user interface, and all of Terraform's workflows rely on configurations written in the Terraform language. @@ -15,7 +15,7 @@ potentially save you time and effort. - [The `terraform console` command](/docs/commands/console.html) starts an interactive shell for evaluating Terraform - [expressions](/docs/configuration/expressions/index.html), which can be a faster way + [expressions](/docs/language/expressions/index.html), which can be a faster way to verify that a particular resource argument results in the value you expect. diff --git a/website/docs/cli/init/index.html.md b/website/docs/cli/init/index.html.md index f72a0921b..11bb27649 100644 --- a/website/docs/cli/init/index.html.md +++ b/website/docs/cli/init/index.html.md @@ -7,7 +7,7 @@ page_title: "Initializing Working Directories - Terraform CLI" Terraform expects to be invoked from a working directory that contains configuration files written in -[the Terraform language](/docs/configuration/index.html). Terraform uses +[the Terraform language](/docs/language/index.html). Terraform uses configuration content from this directory, and also uses the directory to store settings, cached plugins and modules, and sometimes state data. diff --git a/website/docs/cli/inspect/index.html.md b/website/docs/cli/inspect/index.html.md index de6899107..070842c69 100644 --- a/website/docs/cli/inspect/index.html.md +++ b/website/docs/cli/inspect/index.html.md @@ -18,7 +18,7 @@ or just to gain a deeper or more holistic understanding of your infrastructure. - [The `terraform graph` command](/docs/commands/graph.html) creates a visual representation of a configuration or a set of planned changes. - [The `terraform output` command](/docs/commands/output.html) can get the - values for the top-level [output values](/docs/configuration/outputs.html) of + values for the top-level [output values](/docs/language/values/outputs.html) of a configuration, which are often helpful when making use of the infrastructure Terraform has provisioned. - [The `terraform show` command](/docs/commands/show.html) can generate diff --git a/website/docs/cli/plugins/index.html.md b/website/docs/cli/plugins/index.html.md index bae835eea..f7424023c 100644 --- a/website/docs/cli/plugins/index.html.md +++ b/website/docs/cli/plugins/index.html.md @@ -7,7 +7,7 @@ page_title: "Managing Plugins - Terraform CLI" Terraform relies on plugins called "providers" in order to manage various types of resources. (For more information about providers, see -[Providers](/docs/configuration/blocks/providers/index.html) in the Terraform +[Providers](/docs/language/providers/index.html) in the Terraform language docs.) -> **Note:** Providers are currently the only plugin type most Terraform users @@ -15,7 +15,7 @@ will interact with. Terraform also supports third-party provisioner plugins, but we discourage their use. Terraform downloads and/or installs any providers -[required](/docs/configuration/provider-requirements.html) by a configuration +[required](/docs/language/providers/requirements.html) by a configuration when [initializing](/docs/cli/init/index.html) a working directory. By default, this works without any additional interaction but requires network access to download providers from their source registry. diff --git a/website/docs/cli/run/index.html.md b/website/docs/cli/run/index.html.md index d7fec11ce..c54c6d5a0 100644 --- a/website/docs/cli/run/index.html.md +++ b/website/docs/cli/run/index.html.md @@ -7,7 +7,7 @@ page_title: "Provisioning Infrastructure - Terraform CLI" Terraform's primary function is to create, modify, and destroy infrastructure resources to match the desired state described in a -[Terraform configuration](/docs/configuration/index.html). +[Terraform configuration](/docs/language/index.html). When people refer to "running Terraform," they generally mean performing these provisioning actions in order to affect real infrastructure objects. The diff --git a/website/docs/cli/state/index.html.md b/website/docs/cli/state/index.html.md index 3a35e4fe5..63e7d0bd7 100644 --- a/website/docs/cli/state/index.html.md +++ b/website/docs/cli/state/index.html.md @@ -5,7 +5,7 @@ page_title: "Manipulating State - Terraform CLI" # Manipulating Terraform State -Terraform uses [state data](/docs/state/index.html) to remember which +Terraform uses [state data](/docs/language/state/index.html) to remember which real-world object corresponds to each resource in the configuration; this allows it to modify an existing object when its resource declaration changes. diff --git a/website/docs/cli/state/taint.html.md b/website/docs/cli/state/taint.html.md index 433e80591..7a9b89435 100644 --- a/website/docs/cli/state/taint.html.md +++ b/website/docs/cli/state/taint.html.md @@ -22,4 +22,4 @@ configuration changes. - [The `terraform untaint` command](/docs/commands/untaint.html) undoes a previous taint, or can preserve a resource that was automatically tainted due - to failed [provisioners](/docs/provisioners/index.html). + to failed [provisioners](/docs/language/resources/provisioners/syntax.html). diff --git a/website/docs/cli/workspaces/index.html.md b/website/docs/cli/workspaces/index.html.md index afb7d164c..aabce80f2 100644 --- a/website/docs/cli/workspaces/index.html.md +++ b/website/docs/cli/workspaces/index.html.md @@ -6,7 +6,7 @@ page_title: "Managing Workspaces - Terraform CLI" # Managing Workspaces In Terraform CLI, _workspaces_ are separate instances of -[state data](/docs/state/index.html) that can be used from the same working +[state data](/docs/language/state/index.html) that can be used from the same working directory. You can use workspaces to manage multiple non-overlapping groups of resources with the same configuration. @@ -34,11 +34,11 @@ Since most of the resources you can manage with Terraform don't include a unique name as part of their configuration, it's common to use the same Terraform configuration to provision multiple groups of similar resources. -Terraform relies on [state](/docs/state/index.html) to associate resources with +Terraform relies on [state](/docs/language/state/index.html) to associate resources with real-world objects, so if you run the same configuration multiple times with completely separate state data, Terraform can manage many non-overlapping groups of resources. In some cases you'll want to change -[variable values](/docs/configuration/variables.html) for these different +[variable values](/docs/language/values/variables.html) for these different resource collections (like when specifying differences between staging and production deployments), and in other cases you might just want many instances of a particular infrastructure pattern. @@ -46,7 +46,7 @@ of a particular infrastructure pattern. The simplest way to maintain multiple instances of a configuration with completely separate state data is to use multiple [working directories](/docs/cli/init/index.html) (with different -[backend](/docs/configuration/backend.html) configurations per directory, if you +[backend](/docs/language/settings/backends/configuration.html) configurations per directory, if you aren't using the default `local` backend). However, this isn't always the most _convenient_ way to handle separate states. @@ -70,7 +70,7 @@ data, run history, and settings. These two kinds of workspaces are different, but related. When using Terraform CLI as a frontend for Terraform Cloud, you associate the current working directory with one or more remote workspaces by configuring -[the `remote` backend](/docs/backends/types/remote.html). If you associate the +[the `remote` backend](/docs/language/settings/backends/remote.html). If you associate the directory with multiple workspaces (using a name prefix), you can use the `terraform workspace` commands to select which remote workspace to use. diff --git a/website/docs/commands/0.12upgrade.html.markdown b/website/docs/commands/0.12upgrade.html.markdown index d5354d82a..59ff0de44 100644 --- a/website/docs/commands/0.12upgrade.html.markdown +++ b/website/docs/commands/0.12upgrade.html.markdown @@ -71,13 +71,13 @@ the change. Once upgraded the configuration will no longer be compatible with Terraform v0.11 and earlier. When upgrading a shared module that is called from multiple configurations, you may need to -[fix existing configurations to a previous version](/docs/configuration/blocks/modules/syntax.html#version) +[fix existing configurations to a previous version](/docs/language/modules/syntax.html#version) to allow for a gradual upgrade. If the module is published via [a Terraform registry](/docs/registry/), assign a new _major_ version number to the upgraded module source to represent the fact that this is a breaking change for v0.11 callers. If a module is installed directly from a version control system such as Git, -[use specific revisions](https://www.terraform.io/docs/modules/sources.html#selecting-a-revision) +[use specific revisions](https://www.terraform.io/docs/language/modules/sources.html#selecting-a-revision) to control which version is used by which caller. The command-line options are all optional. The available options are: diff --git a/website/docs/commands/0.13upgrade.html.markdown b/website/docs/commands/0.13upgrade.html.markdown index 28d948155..52ff42067 100644 --- a/website/docs/commands/0.13upgrade.html.markdown +++ b/website/docs/commands/0.13upgrade.html.markdown @@ -23,7 +23,7 @@ providers are in use for a module, detect the source address for those providers where possible, and record this information in a [`required_providers` block][required-providers]. -[required-providers]: /docs/configuration/provider-requirements.html +[required-providers]: /docs/language/providers/requirements.html ~> Note: the command ignores `.tf.json` files and override files in the module. diff --git a/website/docs/commands/apply.html.markdown b/website/docs/commands/apply.html.markdown index fe15702fc..31c5b7ad1 100644 --- a/website/docs/commands/apply.html.markdown +++ b/website/docs/commands/apply.html.markdown @@ -56,14 +56,14 @@ The command-line flags are all optional. The list of available flags are: apply. * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. This setting + Ignored when [remote state](/docs/language/state/remote.html) is used. This setting does not persist and other commands, such as init, may not be aware of the alternate statefile. To configure an alternate statefile path which is - available to all terraform commands, use the [local backend](/docs/backends/types/local.html). + available to all terraform commands, use the [local backend](/docs/language/settings/backends/local.html). * `-state-out=path` - Path to write updated state file. By default, the `-state` path will be used. Ignored when - [remote state](/docs/state/remote.html) is used. + [remote state](/docs/language/state/remote.html) is used. * `-target=resource` - A [Resource Address](/docs/internals/resource-addressing.html) to target. For more @@ -72,11 +72,11 @@ The command-line flags are all optional. The list of available flags are: * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag can be set multiple times. Variable values are interpreted as - [literal expressions](/docs/configuration/expressions/types.html) in the + [literal expressions](/docs/language/expressions/types.html) in the Terraform language, so list and map values can be specified via this flag. * `-var-file=foo` - Set variables in the Terraform configuration from - a [variable file](/docs/configuration/variables.html#variable-definitions-tfvars-files). If + a [variable file](/docs/language/values/variables.html#variable-definitions-tfvars-files). If a `terraform.tfvars` or any `.auto.tfvars` files are present in the current directory, they will be automatically loaded. `terraform.tfvars` is loaded first and the `.auto.tfvars` files after in alphabetical order. Any files diff --git a/website/docs/commands/cli-config.html.markdown b/website/docs/commands/cli-config.html.markdown index d2c4aeaaf..0f710bb10 100644 --- a/website/docs/commands/cli-config.html.markdown +++ b/website/docs/commands/cli-config.html.markdown @@ -11,7 +11,7 @@ description: |- The CLI configuration file configures per-user settings for CLI behaviors, which apply across all Terraform working directories. This is separate from -[your infrastructure configuration](/docs/configuration/index.html). +[your infrastructure configuration](/docs/language/index.html). ## Location @@ -394,7 +394,7 @@ provider_installation { With development overrides in effect, the `terraform init` command will still attempt to select a suitable published version of your provider to install and record in -[the dependency lock file](/docs/configuration/dependency-lock.html) +[the dependency lock file](/docs/language/dependency-lock.html) for future use, but other commands like `terraform apply` will disregard the lock file's entry for `hashicorp/null` and will use the given directory instead. Once your new changes are included in a diff --git a/website/docs/commands/console.html.markdown b/website/docs/commands/console.html.markdown index 5e146c791..7d300078c 100644 --- a/website/docs/commands/console.html.markdown +++ b/website/docs/commands/console.html.markdown @@ -10,27 +10,27 @@ description: |- # Command: console The `terraform console` command provides an interactive console for -evaluating [expressions](/docs/configuration/expressions/index.html). +evaluating [expressions](/docs/language/expressions/index.html). ## Usage Usage: `terraform console [options]` This command provides an interactive command-line console for evaluating and -experimenting with [expressions](/docs/configuration/expressions/index.html). +experimenting with [expressions](/docs/language/expressions/index.html). This is useful for testing interpolations before using them in configurations, and for interacting with any values currently saved in -[state](/docs/state/index.html). +[state](/docs/language/state/index.html). If the current state is empty or has not yet been created, the console can be used to experiment with the expression syntax and -[built-in functions](/docs/configuration/functions.html). +[built-in functions](/docs/language/functions/index.html). The supported options are: * `-state=path` - Path to a local state file. Expressions will be evaluated using values from this state file. If not specified, the state associated - with the current [workspace](/docs/state/workspaces.html) is used. + with the current [workspace](/docs/language/state/workspaces.html) is used. You can close the console with the `exit` command or by pressing Control-C or Control-D. @@ -50,6 +50,6 @@ $ echo "1 + 5" | terraform console ## Remote State -If [remote state](/docs/state/remote.html) is used by the current backend, +If [remote state](/docs/language/state/remote.html) is used by the current backend, Terraform will read the state for the current workspace from the backend before evaluating any expressions. diff --git a/website/docs/commands/environment-variables.html.md b/website/docs/commands/environment-variables.html.md index ed003332e..e2af8e0aa 100644 --- a/website/docs/commands/environment-variables.html.md +++ b/website/docs/commands/environment-variables.html.md @@ -59,7 +59,7 @@ export TF_VAR_alist='[1,2,3]' export TF_VAR_amap='{ foo = "bar", baz = "qux" }' ``` -For more on how to use `TF_VAR_name` in context, check out the section on [Variable Configuration](/docs/configuration/variables.html). +For more on how to use `TF_VAR_name` in context, check out the section on [Variable Configuration](/docs/language/values/variables.html). ## TF_CLI_ARGS and TF_CLI_ARGS_name @@ -114,7 +114,7 @@ export TF_WORKSPACE=your_workspace Using this environment variable is recommended only for non-interactive usage, since in a local shell environment it can be easy to forget the variable is set and apply changes to the wrong state. For more information regarding workspaces, check out the section on [Using Workspaces] -(https://www.terraform.io/docs/state/workspaces.html). +(https://www.terraform.io/docs/language/state/workspaces.html). ## TF_IN_AUTOMATION @@ -159,4 +159,4 @@ If `TF_IGNORE` is set to "trace", Terraform will output debug messages to displa export TF_IGNORE=trace ``` -For more details on `.terraformignore`, please see [Excluding Files from Upload with .terraformignore](/docs/backends/types/remote.html#excluding-files-from-upload-with-terraformignore). +For more details on `.terraformignore`, please see [Excluding Files from Upload with .terraformignore](/docs/language/settings/backends/remote.html#excluding-files-from-upload-with-terraformignore). diff --git a/website/docs/commands/fmt.html.markdown b/website/docs/commands/fmt.html.markdown index 5003fe9d3..b07a97df7 100644 --- a/website/docs/commands/fmt.html.markdown +++ b/website/docs/commands/fmt.html.markdown @@ -10,7 +10,7 @@ description: |- The `terraform fmt` command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of -the [Terraform language style conventions](/docs/configuration/style.html), +the [Terraform language style conventions](/docs/language/syntax/style.html), along with other minor adjustments for readability. Other Terraform commands that generate Terraform configuration will produce diff --git a/website/docs/commands/get.html.markdown b/website/docs/commands/get.html.markdown index 80cbf4a5e..b847fecd6 100644 --- a/website/docs/commands/get.html.markdown +++ b/website/docs/commands/get.html.markdown @@ -9,7 +9,7 @@ description: |- # Command: get The `terraform get` command is used to download and update -[modules](/docs/modules/index.html) mentioned in the root module. +[modules](/docs/language/modules/develop/index.html) mentioned in the root module. ## Usage diff --git a/website/docs/commands/import.html.md b/website/docs/commands/import.html.md index 5a8e1b72f..20e9372cc 100644 --- a/website/docs/commands/import.html.md +++ b/website/docs/commands/import.html.md @@ -37,7 +37,7 @@ itself having created all objects. If you import existing objects into Terraform be careful to import each remote object to only one Terraform resource address. If you import the same object multiple times, Terraform may exhibit unwanted behavior. For more information on this assumption, see -[the State section](/docs/state/). +[the State section](/docs/language/state/index.html). The command-line flags are all optional. The list of available flags are: @@ -75,12 +75,12 @@ in the configuration for the target resource, and that is the best behavior in m * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag can be set multiple times. Variable values are interpreted as - [literal expressions](/docs/configuration/expressions/types.html) in the + [literal expressions](/docs/language/expressions/types.html) in the Terraform language, so list and map values can be specified via this flag. This is only useful with the `-config` flag. * `-var-file=foo` - Set variables in the Terraform configuration from - a [variable file](/docs/configuration/variables.html#variable-definitions-tfvars-files). If + a [variable file](/docs/language/values/variables.html#variable-definitions-tfvars-files). If a `terraform.tfvars` or any `.auto.tfvars` files are present in the current directory, they will be automatically loaded. `terraform.tfvars` is loaded first and the `.auto.tfvars` files after in alphabetical order. Any files @@ -139,7 +139,7 @@ $ terraform import module.foo.aws_instance.bar i-abcd1234 ## Example: Import into Resource configured with count The example below will import an AWS instance into the first instance of the `aws_instance` resource named `baz` configured with -[`count`](/docs/configuration/meta-arguments/count.html): +[`count`](/docs/language/meta-arguments/count.html): ```shell $ terraform import 'aws_instance.baz[0]' i-abcd1234 @@ -148,7 +148,7 @@ $ terraform import 'aws_instance.baz[0]' i-abcd1234 ## Example: Import into Resource configured with for_each The example below will import an AWS instance into the `"example"` instance of the `aws_instance` resource named `baz` configured with -[`for_each`](/docs/configuration/meta-arguments/for_each.html): +[`for_each`](/docs/language/meta-arguments/for_each.html): Linux, Mac OS, and UNIX: diff --git a/website/docs/commands/init.html.markdown b/website/docs/commands/init.html.markdown index 3863f3ce2..840100919 100644 --- a/website/docs/commands/init.html.markdown +++ b/website/docs/commands/init.html.markdown @@ -98,7 +98,7 @@ be statically specified in the configuration file. ## Child Module Installation During init, the configuration is searched for `module` blocks, and the source -code for referenced [modules](/docs/modules/) is retrieved from the locations +code for referenced [modules](/docs/language/modules/develop/index.html) is retrieved from the locations given in their `source` arguments. Re-running init with modules already installed will install the sources for @@ -126,10 +126,10 @@ Terraform installs providers using [the provider installation settings in the CLI configuration](./cli-config.html#provider-installation). For more information about specifying which providers are required for each -of your modules, see [Provider Requirements](/docs/configuration/provider-requirements.html). +of your modules, see [Provider Requirements](/docs/language/providers/requirements.html). After successful installation, Terraform writes information about the selected -providers to [the dependency lock file](/docs/configuration/dependency-lock.html). +providers to [the dependency lock file](/docs/language/dependency-lock.html). You should commit this file to your version control system to ensure that when you run `terraform init` again in future Terraform will select exactly the same provider versions. Use the `-upgrade` option if you want Terraform diff --git a/website/docs/commands/output.html.markdown b/website/docs/commands/output.html.markdown index 8d58e6515..1a828612d 100644 --- a/website/docs/commands/output.html.markdown +++ b/website/docs/commands/output.html.markdown @@ -31,7 +31,7 @@ The command-line flags are all optional. The list of available flags are: for processing complex data types. * `-no-color` - If specified, output won't contain any color. * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. ## Examples diff --git a/website/docs/commands/plan.html.markdown b/website/docs/commands/plan.html.markdown index 8f7f9ebe7..63d0937ca 100644 --- a/website/docs/commands/plan.html.markdown +++ b/website/docs/commands/plan.html.markdown @@ -70,7 +70,7 @@ The available options are: * `-refresh=true` - Update the state prior to checking for differences. * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. * `-target=resource` - A [Resource Address](/docs/internals/resource-addressing.html) to target. This flag can @@ -78,11 +78,11 @@ The available options are: * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag can be set multiple times. Variable values are interpreted as - [literal expressions](/docs/configuration/expressions/types.html) in the + [literal expressions](/docs/language/expressions/types.html) in the Terraform language, so list and map values can be specified via this flag. * `-var-file=foo` - Set variables in the Terraform configuration from - a [variable file](/docs/configuration/variables.html#variable-definitions-tfvars-files). If + a [variable file](/docs/language/values/variables.html#variable-definitions-tfvars-files). If a `terraform.tfvars` or any `.auto.tfvars` files are present in the current directory, they will be automatically loaded. `terraform.tfvars` is loaded first and the `.auto.tfvars` files after in alphabetical order. Any files @@ -115,7 +115,7 @@ of resources relates to configuration. Instead of using `-target` as a means to operate on isolated portions of very large configurations, prefer instead to break large configurations into several smaller configurations that can each be independently applied. -[Data sources](/docs/configuration/data-sources.html) can be used to access +[Data sources](/docs/language/data-sources/index.html) can be used to access information about resources created in other configurations, allowing a complex system architecture to be broken down into more manageable parts that can be updated independently. diff --git a/website/docs/commands/providers.html.markdown b/website/docs/commands/providers.html.markdown index 4da6a4e3b..3c3bb7d0b 100644 --- a/website/docs/commands/providers.html.markdown +++ b/website/docs/commands/providers.html.markdown @@ -10,7 +10,7 @@ description: |- # Command: providers The `terraform providers` command shows information about the -[provider requirements](/docs/configuration/provider-requirements.html) of the +[provider requirements](/docs/language/providers/requirements.html) of the configuration in the current working directory, as an aid to understanding where each requirement was detected from. diff --git a/website/docs/commands/providers/lock.html.md b/website/docs/commands/providers/lock.html.md index 0a570a1b4..345e591bd 100644 --- a/website/docs/commands/providers/lock.html.md +++ b/website/docs/commands/providers/lock.html.md @@ -11,7 +11,7 @@ description: |- The `terraform providers lock` consults upstream registries (by default) in order to write provider dependency information into -[the dependency lock file](/docs/configuration/dependency-lock.html). +[the dependency lock file](/docs/language/dependency-lock.html). The common way to update the dependency lock file is as a side-effect of normal provider installation during @@ -35,7 +35,7 @@ automatic approach may not be sufficient: on both Windows and Linux) and the upstream registry for a provider is unable to provide signed checksums using the latest hashing scheme, subsequent runs of Terraform on other platforms may - [add additional checksums to the lock file](/docs/configuration/dependency-lock.html#new-provider-package-checksums). + [add additional checksums to the lock file](/docs/language/dependency-lock.html#new-provider-package-checksums). You can avoid that by pre-populating hashes for all of the platforms you intend to use, using the `terraform providers lock` command. @@ -49,7 +49,7 @@ With no additional command line arguments, `terraform providers lock` will analyze the configuration in the current working directory to find all of the providers it depends on, and it will fetch the necessary data about those providers from their origin registries and then update -[the dependency lock file](/docs/configuration/dependency-lock.html) to +[the dependency lock file](/docs/language/dependency-lock.html) to include a selected version for each provider and all of the package checksums that are covered by the provider developer's cryptographic signature. diff --git a/website/docs/commands/push.html.markdown b/website/docs/commands/push.html.markdown index 927920b35..bc093a85c 100644 --- a/website/docs/commands/push.html.markdown +++ b/website/docs/commands/push.html.markdown @@ -8,7 +8,7 @@ description: |- # Command: push -!> **Important:** The `terraform push` command is no longer functional. Its functionality was replaced and surpassed by [the `remote` backend](/docs/backends/types/remote.html), which works with current versions of Terraform Cloud. The `remote` backend allows you to run remote operations directly from the command line, and displays real-time output from the remote run environment. +!> **Important:** The `terraform push` command is no longer functional. Its functionality was replaced and surpassed by [the `remote` backend](/docs/language/settings/backends/remote.html), which works with current versions of Terraform Cloud. The `remote` backend allows you to run remote operations directly from the command line, and displays real-time output from the remote run environment. The `terraform push` command was an early implementation of remote Terraform runs. It allowed teams to push a configuration to a remote run environment in a discontinued version of Terraform Enterprise. diff --git a/website/docs/commands/refresh.html.markdown b/website/docs/commands/refresh.html.markdown index d8f44c8d7..c1ba75804 100644 --- a/website/docs/commands/refresh.html.markdown +++ b/website/docs/commands/refresh.html.markdown @@ -43,11 +43,11 @@ The `terraform refresh` command accepts the following options: to 10. * `-state=path` - Path to read and write the state file to. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. * `-state-out=path` - Path to write updated state file. By default, the `-state` path will be used. Ignored when - [remote state](/docs/state/remote.html) is used. + [remote state](/docs/language/state/remote.html) is used. * `-target=resource` - A [Resource Address](/docs/internals/resource-addressing.html) to target. Operation will @@ -56,11 +56,11 @@ The `terraform refresh` command accepts the following options: * `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag can be set multiple times. Variable values are interpreted as - [literal expressions](/docs/configuration/expressions/types.html) in the + [literal expressions](/docs/language/expressions/types.html) in the Terraform language, so list and map values can be specified via this flag. * `-var-file=foo` - Set variables in the Terraform configuration from - a [variable file](/docs/configuration/variables.html#variable-definitions-tfvars-files). If + a [variable file](/docs/language/values/variables.html#variable-definitions-tfvars-files). If a `terraform.tfvars` or any `.auto.tfvars` files are present in the current directory, they will be automatically loaded. `terraform.tfvars` is loaded first and the `.auto.tfvars` files after in alphabetical order. Any files diff --git a/website/docs/commands/show.html.markdown b/website/docs/commands/show.html.markdown index bb0cd7c41..3c78d6d00 100644 --- a/website/docs/commands/show.html.markdown +++ b/website/docs/commands/show.html.markdown @@ -18,7 +18,7 @@ flag. -> **Note:** When using the `-json` command-line flag, any sensitive values in Terraform state will be displayed in plain text. For more information, see -[Sensitive Data in State](/docs/state/sensitive-data.html). +[Sensitive Data in State](/docs/language/state/sensitive-data.html). ## JSON Output diff --git a/website/docs/commands/state/index.html.md b/website/docs/commands/state/index.html.md index e3faf2460..31d74b43b 100644 --- a/website/docs/commands/state/index.html.md +++ b/website/docs/commands/state/index.html.md @@ -10,7 +10,7 @@ description: |- The `terraform state` command is used for advanced state management. As your Terraform usage becomes more advanced, there are some cases where -you may need to modify the [Terraform state](/docs/state/index.html). +you may need to modify the [Terraform state](/docs/language/state/index.html). Rather than modify the state directly, the `terraform state` commands can be used in many cases instead. diff --git a/website/docs/commands/state/list.html.md b/website/docs/commands/state/list.html.md index 23d637128..80210ac17 100644 --- a/website/docs/commands/state/list.html.md +++ b/website/docs/commands/state/list.html.md @@ -9,7 +9,7 @@ description: |- # Command: state list The `terraform state list` command is used to list resources within a -[Terraform state](/docs/state/index.html). +[Terraform state](/docs/language/state/index.html). ## Usage @@ -30,7 +30,7 @@ in [resource addressing format](/docs/commands/state/addressing.html). The command-line flags are all optional. The list of available flags are: * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. * `-id=id` - ID of resources to show. Ignored when unset. ## Example: All Resources diff --git a/website/docs/commands/state/mv.html.md b/website/docs/commands/state/mv.html.md index 683bbcbc6..ecfc64d16 100644 --- a/website/docs/commands/state/mv.html.md +++ b/website/docs/commands/state/mv.html.md @@ -9,7 +9,7 @@ description: |- # Command: state mv The `terraform state mv` command is used to move items in a -[Terraform state](/docs/state/index.html). This command can move +[Terraform state](/docs/language/state/index.html). This command can move single resources, single instances of a resource, entire modules, and more. This command can also move items to a completely different state file, enabling efficient refactoring. @@ -100,7 +100,7 @@ $ terraform state mv -state-out=other.tfstate 'module.app' 'module.app' ## Example: Move a Resource configured with count The example below moves the first instance of a `packet_device` resource named `worker` configured with -[`count`](/docs/configuration/meta-arguments/count.html) to +[`count`](/docs/language/meta-arguments/count.html) to the first instance of a resource named `helper` also configured with `count`: ```shell @@ -110,7 +110,7 @@ $ terraform state mv 'packet_device.worker[0]' 'packet_device.helper[0]' ## Example: Move a Resource configured with for_each The example below moves the `"example123"` instance of a `packet_device` resource named `worker` configured with -[`for_each`](/docs/configuration/meta-arguments/for_each.html) +[`for_each`](/docs/language/meta-arguments/for_each.html) to the `"example456"` instance of a resource named `helper` also configuring `for_each`: Linux, Mac OS, and UNIX: diff --git a/website/docs/commands/state/pull.html.md b/website/docs/commands/state/pull.html.md index f6aa69b97..af2122668 100644 --- a/website/docs/commands/state/pull.html.md +++ b/website/docs/commands/state/pull.html.md @@ -9,7 +9,7 @@ description: |- # Command: state pull The `terraform state pull` command is used to manually download and output -the state from [remote state](/docs/state/remote.html). This command also +the state from [remote state](/docs/language/state/remote.html). This command also works with local state. ## Usage diff --git a/website/docs/commands/state/push.html.md b/website/docs/commands/state/push.html.md index bbd295d60..1481e6bfe 100644 --- a/website/docs/commands/state/push.html.md +++ b/website/docs/commands/state/push.html.md @@ -9,7 +9,7 @@ description: |- # Command: state push The `terraform state push` command is used to manually upload a local -state file to [remote state](/docs/state/remote.html). This command also +state file to [remote state](/docs/language/state/remote.html). This command also works with local state. This command should rarely be used. It is meant only as a utility in case @@ -20,7 +20,7 @@ manual intervention is necessary with the remote state. Usage: `terraform state push [options] PATH` This command will push the state specified by PATH to the currently -configured [backend](/docs/configuration/blocks/backends/index.html). +configured [backend](/docs/language/settings/backends/index.html). If PATH is "-" then the state data to push is read from stdin. This data is loaded completely into memory and verified prior to being written to diff --git a/website/docs/commands/state/replace-provider.html.md b/website/docs/commands/state/replace-provider.html.md index f950943d2..e98373729 100644 --- a/website/docs/commands/state/replace-provider.html.md +++ b/website/docs/commands/state/replace-provider.html.md @@ -9,7 +9,7 @@ description: |- # Command: state replace-provider The `terraform state replace-provider` command is used to replace the provider -for resources in a [Terraform state](/docs/state/index.html). +for resources in a [Terraform state](/docs/language/state/index.html). ## Usage diff --git a/website/docs/commands/state/rm.html.md b/website/docs/commands/state/rm.html.md index 60f88f337..d3a84a0d0 100644 --- a/website/docs/commands/state/rm.html.md +++ b/website/docs/commands/state/rm.html.md @@ -9,7 +9,7 @@ description: |- # Command: state rm The `terraform state rm` command is used to remove items from the -[Terraform state](/docs/state/index.html). This command can remove +[Terraform state](/docs/language/state/index.html). This command can remove single resources, single instances of a resource, entire modules, and more. @@ -83,7 +83,7 @@ $ terraform state rm 'module.foo.packet_device.worker' ## Example: Remove a Resource configured with count The example below removes the first instance of a `packet_device` resource named `worker` configured with -[`count`](/docs/configuration/meta-arguments/count.html): +[`count`](/docs/language/meta-arguments/count.html): ```shell $ terraform state rm 'packet_device.worker[0]' @@ -92,7 +92,7 @@ $ terraform state rm 'packet_device.worker[0]' ## Example: Remove a Resource configured with for_each The example below removes the `"example"` instance of a `packet_device` resource named `worker` configured with -[`for_each`](/docs/configuration/meta-arguments/for_each.html): +[`for_each`](/docs/language/meta-arguments/for_each.html): Linux, Mac OS, and UNIX: diff --git a/website/docs/commands/state/show.html.md b/website/docs/commands/state/show.html.md index 85f53d95c..d7d21dcc3 100644 --- a/website/docs/commands/state/show.html.md +++ b/website/docs/commands/state/show.html.md @@ -10,7 +10,7 @@ description: |- The `terraform state show` command is used to show the attributes of a single resource in the -[Terraform state](/docs/state/index.html). +[Terraform state](/docs/language/state/index.html). ## Usage @@ -26,7 +26,7 @@ in [resource addressing format](/docs/commands/state/addressing.html). The command-line flags are all optional. The list of available flags are: * `-state=path` - Path to the state file. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. The output of `terraform state show` is intended for human consumption, not programmatic consumption. To extract state data for use in other software, use @@ -61,7 +61,7 @@ $ terraform state show 'module.foo.packet_device.worker' ## Example: Show a Resource configured with count The example below shows the first instance of a `packet_device` resource named `worker` configured with -[`count`](/docs/configuration/meta-arguments/count.html): +[`count`](/docs/language/meta-arguments/count.html): ```shell $ terraform state show 'packet_device.worker[0]' @@ -70,7 +70,7 @@ $ terraform state show 'packet_device.worker[0]' ## Example: Show a Resource configured with for_each The example below shows the `"example"` instance of a `packet_device` resource named `worker` configured with -[`for_each`](/docs/configuration/meta-arguments/for_each.html): +[`for_each`](/docs/language/meta-arguments/for_each.html): Linux, Mac OS, and UNIX: diff --git a/website/docs/commands/taint.html.markdown b/website/docs/commands/taint.html.markdown index 14dbf039c..5191e9699 100644 --- a/website/docs/commands/taint.html.markdown +++ b/website/docs/commands/taint.html.markdown @@ -59,11 +59,11 @@ The command-line flags are all optional. The list of available flags are: * `-lock-timeout=0s` - Duration to retry a state lock. * `-state=path` - Path to read and write the state file to. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. * `-state-out=path` - Path to write updated state file. By default, the `-state` path will be used. Ignored when - [remote state](/docs/state/remote.html) is used. + [remote state](/docs/language/state/remote.html) is used. * `-ignore-remote-version` - When using the enhanced remote backend with Terraform Cloud, continue even if remote and local Terraform versions differ. @@ -104,7 +104,7 @@ Resource instance module.couchbase.aws_instance.cb_node[9] has been marked as ta ``` Although we recommend that most configurations use only one level of nesting -and employ [module composition](/docs/modules/composition.html), it's possible +and employ [module composition](/docs/language/modules/develop/composition.html), it's possible to have multiple levels of nested modules. In that case the resource instance address must include all of the steps to the target instance, as in the following example: diff --git a/website/docs/commands/untaint.html.markdown b/website/docs/commands/untaint.html.markdown index 520795fc6..85aab17d8 100644 --- a/website/docs/commands/untaint.html.markdown +++ b/website/docs/commands/untaint.html.markdown @@ -52,11 +52,11 @@ certain cases, see above note). The list of available flags are: * `-no-color` - Disables output with coloring * `-state=path` - Path to read and write the state file to. Defaults to "terraform.tfstate". - Ignored when [remote state](/docs/state/remote.html) is used. + Ignored when [remote state](/docs/language/state/remote.html) is used. * `-state-out=path` - Path to write updated state file. By default, the `-state` path will be used. Ignored when - [remote state](/docs/state/remote.html) is used. + [remote state](/docs/language/state/remote.html) is used. * `-ignore-remote-version` - When using the enhanced remote backend with Terraform Cloud, continue even if remote and local Terraform versions differ. diff --git a/website/docs/commands/workspace/index.html.md b/website/docs/commands/workspace/index.html.md index 354d96e25..cf60ded67 100644 --- a/website/docs/commands/workspace/index.html.md +++ b/website/docs/commands/workspace/index.html.md @@ -9,7 +9,7 @@ description: |- # Command: workspace The `terraform workspace` command is used to manage -[workspaces](/docs/state/workspaces.html). +[workspaces](/docs/language/state/workspaces.html). This command is a container for further subcommands. These subcommands are listed in the navigation bar. diff --git a/website/docs/configuration-0-11/data-sources.html.md b/website/docs/configuration-0-11/data-sources.html.md index 908a24d4b..90f3463e3 100644 --- a/website/docs/configuration-0-11/data-sources.html.md +++ b/website/docs/configuration-0-11/data-sources.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Configuring Data Sources](../configuration/data-sources.html). +[Configuration Language: Configuring Data Sources](/docs/language/data-sources/index.html). *Data sources* allow data to be fetched or computed for use elsewhere in Terraform configuration. Use of data sources allows a Terraform diff --git a/website/docs/configuration-0-11/index.html.md b/website/docs/configuration-0-11/index.html.md index f804ba11d..35982822a 100644 --- a/website/docs/configuration-0-11/index.html.md +++ b/website/docs/configuration-0-11/index.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language](../configuration/index.html). +[Configuration Language](/docs/language/index.html). Terraform uses text files to describe infrastructure and to set variables. These text files are called Terraform _configurations_ and end in diff --git a/website/docs/configuration-0-11/interpolation.html.md b/website/docs/configuration-0-11/interpolation.html.md index aac18e5af..baae61021 100644 --- a/website/docs/configuration-0-11/interpolation.html.md +++ b/website/docs/configuration-0-11/interpolation.html.md @@ -10,8 +10,8 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Expressions](/docs/configuration/expressions/index.html) and -[Configuration Language: Functions](../configuration/functions.html). +[Configuration Language: Expressions](/docs/language/expressions/index.html) and +[Configuration Language: Functions](/docs/language/functions/index.html). Embedded within strings in Terraform, whether you're using the Terraform syntax or JSON syntax, you can interpolate other values. These @@ -77,7 +77,7 @@ syntax to get a list of all the attributes: `${data.aws_subnet.example.*.cidr_bl The syntax is `module..`. For example `${module.foo.bar}` will interpolate the `bar` output from the `foo` -[module](/docs/modules/index.html). +[module](/docs/language/modules/develop/index.html). #### Count information diff --git a/website/docs/configuration-0-11/load.html.md b/website/docs/configuration-0-11/load.html.md index b2831c471..b95adffab 100644 --- a/website/docs/configuration-0-11/load.html.md +++ b/website/docs/configuration-0-11/load.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language](../configuration/index.html). +[Configuration Language](/docs/language/index.html). When invoking any command that loads the Terraform configuration, Terraform loads all configuration files within the directory diff --git a/website/docs/configuration-0-11/locals.html.md b/website/docs/configuration-0-11/locals.html.md index a72f6a79a..b23a5b3a1 100644 --- a/website/docs/configuration-0-11/locals.html.md +++ b/website/docs/configuration-0-11/locals.html.md @@ -11,7 +11,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Configuring Local Values](../configuration/locals.html). +[Configuration Language: Configuring Local Values](/docs/language/values/locals.html). Local values assign a name to an expression, that can then be used multiple times within a module. diff --git a/website/docs/configuration-0-11/modules.html.md b/website/docs/configuration-0-11/modules.html.md index 180f88571..552dc80c7 100644 --- a/website/docs/configuration-0-11/modules.html.md +++ b/website/docs/configuration-0-11/modules.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Modules](../configuration/modules.html). +[Configuration Language: Modules](/docs/language/modules/index.html). A _module_ is a container for multiple resources that are used together. @@ -27,7 +27,7 @@ and re-used. This page describes how to call one module from another. Other pages in this section of the documentation describe the different elements that make up modules, and there is further information about how modules can be used, -created, and published in [the dedicated _Modules_ section](/docs/modules/index.html). +created, and published in [the dedicated _Modules_ section](/docs/language/modules/develop/index.html). ## Calling a Child Module @@ -62,7 +62,7 @@ Terraform CLI. Its value is either the path to a local directory of the module's configuration files, or a remote module source that Terraform should download and use. This value must be a literal string with no template sequences; interpolations are not allowed. For more information on -possible values for this argument, see [Module Sources](/docs/modules/sources.html). +possible values for this argument, see [Module Sources](/docs/language/modules/sources.html). The same source address can be specified in multiple `module` blocks to create multiple copies of the resources defined within, possibly with different @@ -161,7 +161,7 @@ future features. Since modules are a complex feature in their own right, further detail about how modules can be used, created, and published is included in -[the dedicated section on modules](/docs/modules/index.html). +[the dedicated section on modules](/docs/language/modules/develop/index.html). ## Providers within Modules diff --git a/website/docs/configuration-0-11/outputs.html.md b/website/docs/configuration-0-11/outputs.html.md index 565f1b6f8..1b9510605 100644 --- a/website/docs/configuration-0-11/outputs.html.md +++ b/website/docs/configuration-0-11/outputs.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Output Values](../configuration/outputs.html). +[Configuration Language: Output Values](/docs/language/values/outputs.html). Outputs define values that will be highlighted to the user when Terraform applies, and can be queried easily using the diff --git a/website/docs/configuration-0-11/override.html.md b/website/docs/configuration-0-11/override.html.md index 7ae4036d1..83411f592 100644 --- a/website/docs/configuration-0-11/override.html.md +++ b/website/docs/configuration-0-11/override.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Override Files](../configuration/override.html). +[Configuration Language: Override Files](/docs/language/files/override.html). Terraform loads all configuration files within a directory and appends them together. Terraform also has a concept of _overrides_, diff --git a/website/docs/configuration-0-11/providers.html.md b/website/docs/configuration-0-11/providers.html.md index 5fbcecbec..fbdc3e87e 100644 --- a/website/docs/configuration-0-11/providers.html.md +++ b/website/docs/configuration-0-11/providers.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Providers](../configuration/providers.html). +[Configuration Language: Providers](/docs/language/providers/index.html). Providers are responsible in Terraform for managing the lifecycle of a [resource](./resources.html): create, diff --git a/website/docs/configuration-0-11/resources.html.md b/website/docs/configuration-0-11/resources.html.md index db0172781..8b31603f4 100644 --- a/website/docs/configuration-0-11/resources.html.md +++ b/website/docs/configuration-0-11/resources.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Resources](../configuration/resources.html). +[Configuration Language: Resources](/docs/language/resources/index.html). The most important thing you'll configure with Terraform are resources. Resources are a component of your infrastructure. @@ -176,7 +176,7 @@ could automatically do this a better way. Within a resource, you can optionally have a **connection block**. Connection blocks describe to Terraform how to connect to the resource for -[provisioning](/docs/provisioners/index.html). This block doesn't +[provisioning](/docs/language/resources/provisioners/syntax.html). This block doesn't need to be present if you're using only local provisioners, or if you're not provisioning at all. @@ -184,13 +184,13 @@ Resources provide some data on their own, such as an IP address, but other data must be specified by the user. The full list of settings that can be specified are listed on -the [provisioner connection page](/docs/provisioners/connection.html). +the [provisioner connection page](/docs/language/resources/provisioners/connection.html). ### Provisioners Within a resource, you can specify zero or more **provisioner blocks**. Provisioner blocks configure -[provisioners](/docs/provisioners/index.html). +[provisioners](/docs/language/resources/provisioners/syntax.html). Within the provisioner block is provisioner-specific configuration, much like resource-specific configuration. diff --git a/website/docs/configuration-0-11/syntax.html.md b/website/docs/configuration-0-11/syntax.html.md index c40ee1713..8c0e57d31 100644 --- a/website/docs/configuration-0-11/syntax.html.md +++ b/website/docs/configuration-0-11/syntax.html.md @@ -14,7 +14,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Syntax](../configuration/syntax.html). +[Configuration Language: Syntax](/docs/language/syntax/configuration.html). The syntax of Terraform configurations is called [HashiCorp Configuration Language (HCL)](https://github.com/hashicorp/hcl). It is meant to strike a diff --git a/website/docs/configuration-0-11/terraform.html.md b/website/docs/configuration-0-11/terraform.html.md index 42cc563d4..f5e9d035f 100644 --- a/website/docs/configuration-0-11/terraform.html.md +++ b/website/docs/configuration-0-11/terraform.html.md @@ -10,7 +10,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Terraform Settings](../configuration/terraform.html). +[Configuration Language: Terraform Settings](/docs/language/settings/index.html). The `terraform` configuration section is used to configure Terraform itself, such as requiring a minimum Terraform version to execute a configuration. diff --git a/website/docs/configuration-0-11/variables.html.md b/website/docs/configuration-0-11/variables.html.md index cc2f4aa86..6fbcf5451 100644 --- a/website/docs/configuration-0-11/variables.html.md +++ b/website/docs/configuration-0-11/variables.html.md @@ -11,7 +11,7 @@ description: |- -> **Note:** This page is about Terraform 0.11 and earlier. For Terraform 0.12 and later, see -[Configuration Language: Input Variables](../configuration/variables.html). +[Configuration Language: Input Variables](/docs/language/values/variables.html). Input variables serve as parameters for a Terraform module. diff --git a/website/docs/configuration/attr-as-blocks.html.md b/website/docs/configuration/attr-as-blocks.html.md index de4778675..ad7759a25 100644 --- a/website/docs/configuration/attr-as-blocks.html.md +++ b/website/docs/configuration/attr-as-blocks.html.md @@ -25,14 +25,14 @@ is set to an empty list (` = []`). Most users do not need to know any further details of this "nested block or empty list" behavior. However, read further if you need to: -- Use Terraform's [JSON syntax](/docs/configuration/syntax-json.html) with this +- Use Terraform's [JSON syntax](/docs/language/syntax/json.html) with this type of resource. - Create a reusable module that wraps this type of resource. ## Details In Terraform v0.12 and later, the language makes a distinction between -[argument syntax and nested block syntax](/docs/configuration/syntax.html#arguments-and-blocks) +[argument syntax and nested block syntax](/docs/language/syntax/configuration.html#arguments-and-blocks) within blocks: * Argument syntax sets a named argument for the containing object. If the @@ -46,7 +46,7 @@ within blocks: merging in with any explicitly-defined arguments. The distinction between these is particularly important for -[JSON syntax](/docs/configuration/syntax-json.html) +[JSON syntax](/docs/language/syntax/json.html) because the same primitive JSON constructs (lists and objects) will be interpreted differently depending on whether a particular name is an argument or a nested block type. @@ -153,7 +153,7 @@ example = [ For the arguments that use the attributes-as-blocks usage mode, the above is a better pattern than using -[`dynamic` blocks](/docs/configuration/expressions/dynamic-blocks.html) +[`dynamic` blocks](/docs/language/expressions/dynamic-blocks.html) because the case where the caller provides an empty list will result in explicitly assigning an empty list value, rather than assigning no value at all and thus retaining and @@ -163,7 +163,7 @@ dynamically-generating _normal_ nested blocks, though. ## In JSON syntax Arguments that use this special mode are specified in JSON syntax always using -the [JSON expression mapping](/docs/configuration/syntax-json.html#expression-mapping) +the [JSON expression mapping](/docs/language/syntax/json.html#expression-mapping) to produce a list of objects. The interpretation of these values in JSON syntax is, therefore, equivalent diff --git a/website/docs/configuration/expressions.html.md b/website/docs/configuration/expressions.html.md index c9e9afd04..9aa59acde 100644 --- a/website/docs/configuration/expressions.html.md +++ b/website/docs/configuration/expressions.html.md @@ -21,7 +21,7 @@ Terraform's types are `string`, `number`, `bool`, `list`, `tuple`, `map`, `object`, and `null`. This information has moved to -[Types and Values](/docs/configuration/expressions/types.html). +[Types and Values](/docs/language/expressions/types.html).
@@ -40,7 +40,7 @@ You can refer to certain values by name, like `var.some_variable` or `aws_instance.example.ami`. This information has moved to -[References to Values](/docs/configuration/expressions/references.html). +[References to Values](/docs/language/expressions/references.html).
@@ -57,7 +57,7 @@ Operators are expressions that transform other expressions, like adding two numbers (`+`) or comparing two values to get a bool (`==`, `>=`, etc.). This information has moved to -[Operators](/docs/configuration/expressions/references.html). +[Operators](/docs/language/expressions/references.html).
@@ -69,7 +69,7 @@ The `condition ? true_val : false_val` expression chooses between two expressions based on a bool condition. This information has moved to -[Conditional Expressions](/docs/configuration/expressions/conditionals.html). +[Conditional Expressions](/docs/language/expressions/conditionals.html).
@@ -83,7 +83,7 @@ This information has moved to Terraform's functions can be called like `function_name(arg1, arg2)`. This information has moved to -[Function Calls](/docs/configuration/expressions/function-calls.html). +[Function Calls](/docs/language/expressions/function-calls.html).
@@ -97,7 +97,7 @@ Expressions like `[for s in var.list : upper(s)]` can transform a complex type value into another complex type value. This information has moved to -[For Expressions](/docs/configuration/expressions/for.html). +[For Expressions](/docs/language/expressions/for.html).
@@ -112,7 +112,7 @@ Expressions like `var.list[*].id` can extract simpler collections from complex collections. This information has moved to -[Splat Expressions](/docs/configuration/expressions/splat.html). +[Splat Expressions](/docs/language/expressions/splat.html).
@@ -127,7 +127,7 @@ The special `dynamic` block type serves the same purpose as a `for` expression, except it creates multiple repeatable nested blocks instead of a complex value. This information has moved to -[Dynamic Blocks](/docs/configuration/expressions/dynamic-blocks.html). +[Dynamic Blocks](/docs/language/expressions/dynamic-blocks.html).
@@ -152,6 +152,6 @@ Strings can also include escape sequences like `\n`, interpolation sequences (`${ ... }`), and template sequences (`%{ ... }`). This information has moved to -[Strings and Templates](/docs/configuration/expressions/strings.html). +[Strings and Templates](/docs/language/expressions/strings.html).
diff --git a/website/docs/configuration/modules.html.md b/website/docs/configuration/modules.html.md index d5575436b..1dbcf06a1 100644 --- a/website/docs/configuration/modules.html.md +++ b/website/docs/configuration/modules.html.md @@ -18,7 +18,7 @@ pages. ## Syntax and Elements of Module Blocks This information has moved to -[Module Blocks](/docs/configuration/blocks/modules/syntax.html). +[Module Blocks](/docs/language/modules/syntax.html).
@@ -29,8 +29,8 @@ This information has moved to ## Multiple Instances with `count` and `for_each` This information has moved to -[`count`](/docs/configuration/meta-arguments/count.html) and -[`for_each`](/docs/configuration/meta-arguments/for_each.html). +[`count`](/docs/language/meta-arguments/count.html) and +[`for_each`](/docs/language/meta-arguments/for_each.html).
@@ -46,9 +46,9 @@ This information has moved to ## Handling Provider Configurations in Re-usable Modules This information has moved to -[The `providers` Meta-Argument](/docs/configuration/meta-arguments/module-providers.html) +[The `providers` Meta-Argument](/docs/language/meta-arguments/module-providers.html) (for users of re-usable modules) and -[Providers Within Modules](/docs/modules/providers.html) +[Providers Within Modules](/docs/language/modules/develop/providers.html) (for module developers).
diff --git a/website/docs/configuration/resources.html.md b/website/docs/configuration/resources.html.md index 013b9c115..87ae1bf5f 100644 --- a/website/docs/configuration/resources.html.md +++ b/website/docs/configuration/resources.html.md @@ -20,7 +20,7 @@ pages. ## Syntax and Elements of Resource Blocks This information has moved to -[Resource Blocks](/docs/configuration/blocks/resources/syntax.html). +[Resource Blocks](/docs/language/resources/syntax.html).
@@ -34,7 +34,7 @@ This information has moved to ## Details of Resource Behavior This information has moved to -[Resource Behavior](/docs/configuration/blocks/resources/behavior.html). +[Resource Behavior](/docs/language/resources/behavior.html).
@@ -44,12 +44,12 @@ This information has moved to Each resource meta-argument has moved to its own page: -- [`depends_on`](/docs/configuration/meta-arguments/depends_on.html) -- [`count`](/docs/configuration/meta-arguments/count.html) -- [`for_each`](/docs/configuration/meta-arguments/for_each.html) -- [`provider`](/docs/configuration/meta-arguments/resource-provider.html) -- [`lifecycle`](/docs/configuration/meta-arguments/lifecycle.html) -- [Provisioners](/docs/configuration/blocks/resources/provisioners/index.html) +- [`depends_on`](/docs/language/meta-arguments/depends_on.html) +- [`count`](/docs/language/meta-arguments/count.html) +- [`for_each`](/docs/language/meta-arguments/for_each.html) +- [`provider`](/docs/language/meta-arguments/resource-provider.html) +- [`lifecycle`](/docs/language/meta-arguments/lifecycle.html) +- [Provisioners](/docs/language/resources/provisioners/index.html)
@@ -60,7 +60,7 @@ Each resource meta-argument has moved to its own page: ### `depends_on` This information has moved to -[`depends_on`](/docs/configuration/meta-arguments/depends_on.html). +[`depends_on`](/docs/language/meta-arguments/depends_on.html).
@@ -77,7 +77,7 @@ This information has moved to ### `count` This information has moved to -[`count`](/docs/configuration/meta-arguments/count.html). +[`count`](/docs/language/meta-arguments/count.html).
@@ -94,7 +94,7 @@ This information has moved to ### `for_each` This information has moved to -[`for_each`](/docs/configuration/meta-arguments/for_each.html). +[`for_each`](/docs/language/meta-arguments/for_each.html).
@@ -105,7 +105,7 @@ This information has moved to ### `provider` This information has moved to -[`provider`](/docs/configuration/meta-arguments/resource-provider.html). +[`provider`](/docs/language/meta-arguments/resource-provider.html).
@@ -119,7 +119,7 @@ This information has moved to ### `lifecycle` This information has moved to -[`lifecycle`](/docs/configuration/meta-arguments/lifecycle.html). +[`lifecycle`](/docs/language/meta-arguments/lifecycle.html).
@@ -130,6 +130,6 @@ This information has moved to ### Provisioners This information has moved to -[Provisioners](/docs/configuration/blocks/resources/provisioners/index.html). +[Provisioners](/docs/language/resources/provisioners/index.html).
diff --git a/website/docs/import/index.html.md b/website/docs/import/index.html.md index 5127e076c..10eb64fb6 100644 --- a/website/docs/import/index.html.md +++ b/website/docs/import/index.html.md @@ -26,12 +26,12 @@ itself having created all objects. If you import existing objects into Terraform be careful to import each remote object to only one Terraform resource address. If you import the same object multiple times, Terraform may exhibit unwanted behavior. For more information on this assumption, see -[the State section](/docs/state/). +[the State section](/docs/language/state/index.html). ## Currently State Only The current implementation of Terraform import can only import resources -into the [state](/docs/state/). It does not generate configuration. A future +into the [state](/docs/language/state/index.html). It does not generate configuration. A future version of Terraform will also generate configuration. Because of this, prior to running `terraform import` it is necessary to write @@ -44,7 +44,7 @@ importing existing resources. ## Remote Backends When using Terraform import on the command line with a [remote -backend](/docs/backends/types/remote.html), such as Terraform Cloud, the import +backend](/docs/language/settings/backends/remote.html), such as Terraform Cloud, the import command runs locally, unlike commands such as apply, which run inside your Terraform Cloud environment. Because of this, the import command will not have access to information from the remote backend, such as workspace variables. diff --git a/website/docs/import/usage.html.md b/website/docs/import/usage.html.md index 57fdb4d76..e5bd85a17 100644 --- a/website/docs/import/usage.html.md +++ b/website/docs/import/usage.html.md @@ -23,7 +23,7 @@ itself having created all objects. If you import existing objects into Terraform be careful to import each remote object to only one Terraform resource address. If you import the same object multiple times, Terraform may exhibit unwanted behavior. For more information on this assumption, see -[the State section](/docs/state/). +[the State section](/docs/language/state/index.html). To import a resource, first write a resource block for it in your configuration, establishing the name by which it will be known to Terraform: diff --git a/website/docs/internals/json-format.html.md b/website/docs/internals/json-format.html.md index 48a7b28e0..9420f2b00 100644 --- a/website/docs/internals/json-format.html.md +++ b/website/docs/internals/json-format.html.md @@ -244,7 +244,7 @@ The following example illustrates the structure of a ``: } ``` -The translation of attribute and output values is the same intuitive mapping from HCL types to JSON types used by Terraform's [`jsonencode`](/docs/configuration/functions/jsonencode.html) function. This mapping does lose some information: lists, sets, and tuples all lower to JSON arrays while maps and objects both lower to JSON objects. Unknown values and null values are both treated as absent or null. +The translation of attribute and output values is the same intuitive mapping from HCL types to JSON types used by Terraform's [`jsonencode`](/docs/language/functions/jsonencode.html) function. This mapping does lose some information: lists, sets, and tuples all lower to JSON arrays while maps and objects both lower to JSON objects. Unknown values and null values are both treated as absent or null. Only the "current" object for each resource instance is described. "Deposed" objects are not reflected in this structure at all; in plan representations, you can refer to the change representations for further details. diff --git a/website/docs/internals/module-registry-protocol.html.md b/website/docs/internals/module-registry-protocol.html.md index 3d8f17d22..4da947214 100644 --- a/website/docs/internals/module-registry-protocol.html.md +++ b/website/docs/internals/module-registry-protocol.html.md @@ -213,10 +213,10 @@ A successful response has no body, and includes the location from which the module version's source can be downloaded in the `X-Terraform-Get` header. The value of this header accepts the same values as the `source` argument in a `module` block in Terraform configuration, as described in -[Module Sources](https://www.terraform.io/docs/modules/sources.html), +[Module Sources](https://www.terraform.io/docs/language/modules/sources.html), except that it may not recursively refer to another module registry address. The value of `X-Terraform-Get` may instead be a relative URL, indicated by beginning with `/`, `./` or `../`, in which case it is resolved relative to the full URL of the download endpoint to produce -[an HTTP URL module source](/docs/modules/sources.html#http-urls). +[an HTTP URL module source](/docs/language/modules/sources.html#http-urls). diff --git a/website/docs/internals/provider-network-mirror-protocol.html.md b/website/docs/internals/provider-network-mirror-protocol.html.md index 3ad4895bb..0afe196bb 100644 --- a/website/docs/internals/provider-network-mirror-protocol.html.md +++ b/website/docs/internals/provider-network-mirror-protocol.html.md @@ -36,7 +36,7 @@ instead. Each Terraform provider has an associated address which uniquely identifies it within Terraform. A provider address has the syntax `hostname/namespace/type`, which is described in more detail in -[the Provider Requirements documentation](/docs/configuration/provider-requirements.html). +[the Provider Requirements documentation](/docs/language/providers/requirements.html). By default, the `hostname` portion of a provider address serves both as part of its unique identifier _and_ as the location of the registry to retrieve it diff --git a/website/docs/language/data-sources/index.html.md b/website/docs/language/data-sources/index.html.md index 18c5dd0f7..a7caf83b6 100644 --- a/website/docs/language/data-sources/index.html.md +++ b/website/docs/language/data-sources/index.html.md @@ -13,8 +13,8 @@ in Terraform configuration. Use of data sources allows a Terraform configuration to make use of information defined outside of Terraform, or defined by another separate Terraform configuration. -Each [provider](./providers.html) may offer data sources -alongside its set of [resource](/docs/configuration/blocks/resources/index.html) +Each [provider](/docs/language/providers/index.html) may offer data sources +alongside its set of [resource](/docs/language/resources/index.html) types. ## Using Data Sources @@ -61,14 +61,14 @@ Each data resource is associated with a single data source, which determines the kind of object (or objects) it reads and what query constraint arguments are available. -Each data source in turn belongs to a [provider](./providers.html), +Each data source in turn belongs to a [provider](/docs/language/providers/index.html), which is a plugin for Terraform that offers a collection of resource types and data sources that most often belong to a single cloud or on-premises infrastructure platform. Most of the items within the body of a `data` block are defined by and specific to the selected data source, and these arguments can make full -use of [expressions](/docs/configuration/expressions/index.html) and other dynamic +use of [expressions](/docs/language/expressions/index.html) and other dynamic Terraform language features. However, there are some "meta-arguments" that are defined by Terraform itself @@ -110,7 +110,7 @@ operation, and is re-calculated each time a new plan is created. ## Data Resource Dependencies Data resources have the same dependency resolution behavior -[as defined for managed resources](/docs/configuration/blocks/resources/behavior.html#resource-dependencies). +[as defined for managed resources](/docs/language/resources/behavior.html#resource-dependencies). Setting the `depends_on` meta-argument within `data` blocks defers reading of the data source until after all changes to the dependencies have been applied. @@ -125,8 +125,8 @@ referencing the managed resource values through a `local` value. ## Multiple Resource Instances -Data resources support [`count`](/docs/configuration/meta-arguments/count.html) -and [`for_each`](/docs/configuration/meta-arguments/for_each.html) +Data resources support [`count`](/docs/language/meta-arguments/count.html) +and [`for_each`](/docs/language/meta-arguments/for_each.html) meta-arguments as defined for managed resources, with the same syntax and behavior. As with managed resources, when `count` or `for_each` is present it is important to @@ -136,7 +136,7 @@ own variant of the constraint arguments, producing an indexed result. ## Selecting a Non-default Provider Configuration -Data resources support [the `provider` meta-argument](/docs/configuration/meta-arguments/resource-provider.html) +Data resources support [the `provider` meta-argument](/docs/language/meta-arguments/resource-provider.html) as defined for managed resources, with the same syntax and behavior. ## Lifecycle Customizations @@ -190,13 +190,13 @@ resource "aws_instance" "web" { ## Meta-Arguments As data sources are essentially a read only subset of resources, they also -support the same [meta-arguments](/docs/configuration/blocks/resources/syntax.html#meta-arguments) of resources +support the same [meta-arguments](/docs/language/resources/syntax.html#meta-arguments) of resources with the exception of the -[`lifecycle` configuration block](/docs/configuration/meta-arguments/lifecycle.html). +[`lifecycle` configuration block](/docs/language/meta-arguments/lifecycle.html). ### Non-Default Provider Configurations -Similarly to [resources](/docs/configuration/blocks/resources/index.html), when +Similarly to [resources](/docs/language/resources/index.html), when a module has multiple configurations for the same provider you can specify which configuration to use with the `provider` meta-argument: @@ -209,7 +209,7 @@ data "aws_ami" "web" { ``` See -[The Resource `provider` Meta-Argument](/docs/configuration/meta-arguments/resource-provider.html) +[The Resource `provider` Meta-Argument](/docs/language/meta-arguments/resource-provider.html) for more information. ## Data Source Lifecycle diff --git a/website/docs/language/dependency-lock.html.md b/website/docs/language/dependency-lock.html.md index 5b0248647..c7242b7df 100644 --- a/website/docs/language/dependency-lock.html.md +++ b/website/docs/language/dependency-lock.html.md @@ -14,9 +14,9 @@ information here is not relevant to those versions. A Terraform configuration may refer to two different kinds of external dependency that come from outside of its own codebase: -* [Providers](./provider-requirements.html), which are plugins for Terraform +* [Providers](/docs/language/providers/requirements.html), which are plugins for Terraform that extend it with support for interacting with various external systems. -* [Modules](/docs/configuration/blocks/modules/index.html), which allow +* [Modules](/docs/language/modules/index.html), which allow splitting out groups of Terraform configuration constructs (written in the Terraform language) into reusable abstractions. @@ -26,7 +26,7 @@ reason, Terraform must determine which versions of those dependencies are potentially compatible with the current configuration and which versions are currently selected for use. -[Version constraints](./version-constraints.html) within the configuration +[Version constraints](/docs/language/expressions/version-constraints.html) within the configuration itself determine which versions of dependencies are _potentially_ compatible, but after selecting a specific version of each dependency Terraform remembers the decisions it made in a _dependency lock file_ so that it can (by default) @@ -157,7 +157,7 @@ propsed changes. The following sections will describe these common situations. ### Dependency on a new provider If you add a new entry to the -[provider requirements](./provider-requirements.html) for any module in your +[provider requirements](/docs/language/providers/requirements.html) for any module in your configuration, or if you add an external module that includes a new provider dependency itself, `terraform init` will respond to that by selecting the newest version of that provider which meets all of the version constraints diff --git a/website/docs/language/expressions/conditionals.html.md b/website/docs/language/expressions/conditionals.html.md index 1ef7baae2..138e2b0e5 100644 --- a/website/docs/language/expressions/conditionals.html.md +++ b/website/docs/language/expressions/conditionals.html.md @@ -60,7 +60,7 @@ be some uncertainty about the expected result type. The following example is contrived because it would be easier to write the constant `"12"` instead of the type conversion in this case, but shows how to -use [`tostring`](../functions/tostring.html) to explicitly convert a number to +use [`tostring`](/docs/language/functions/tostring.html) to explicitly convert a number to a string. ```hcl diff --git a/website/docs/language/expressions/dynamic-blocks.html.md b/website/docs/language/expressions/dynamic-blocks.html.md index 2c87c427a..b6117b4a0 100644 --- a/website/docs/language/expressions/dynamic-blocks.html.md +++ b/website/docs/language/expressions/dynamic-blocks.html.md @@ -83,9 +83,9 @@ nested block. If you need to declare resource instances based on a nested data structure or combinations of elements from multiple data structures you can use Terraform expressions and functions to derive a suitable value. For some common examples of such situations, see the -[`flatten`](/docs/configuration/functions/flatten.html) +[`flatten`](/docs/language/functions/flatten.html) and -[`setproduct`](/docs/configuration/functions/setproduct.html) +[`setproduct`](/docs/language/functions/setproduct.html) functions. ## Multi-level Nested Block Structures @@ -150,5 +150,5 @@ nested blocks using directly-corresponding attributes from an input variable then that might suggest that your module is not creating a useful abstraction. It may be better for the calling module to define the resource itself then pass information about it into your module. For more information on this design -tradeoff, see [When to Write a Module](/docs/modules/#when-to-write-a-module) -and [Module Composition](/docs/modules/composition.html). +tradeoff, see [When to Write a Module](/docs/language/modules/develop/index.html#when-to-write-a-module) +and [Module Composition](/docs/language/modules/develop/composition.html). diff --git a/website/docs/language/expressions/for.html.md b/website/docs/language/expressions/for.html.md index 04ab3a0ab..77ba0a3cd 100644 --- a/website/docs/language/expressions/for.html.md +++ b/website/docs/language/expressions/for.html.md @@ -129,7 +129,7 @@ For sets of other types, Terraform uses an arbitrary ordering that may change in future versions of Terraform. For that reason, we recommend converting the result of such an expression to itself be a set so that it's clear elsewhere in the configuration that the result is unordered. You can use -[the `toset` function](../functions/toset.html) +[the `toset` function](/docs/language/functions/toset.html) to concisely convert a `for` expression result to be of a set type. ```hcl diff --git a/website/docs/language/expressions/function-calls.html.md b/website/docs/language/expressions/function-calls.html.md index b0deb2b99..26e230350 100644 --- a/website/docs/language/expressions/function-calls.html.md +++ b/website/docs/language/expressions/function-calls.html.md @@ -8,7 +8,7 @@ page_title: "Function Calls - Configuration Language" > **Hands-on:** Try the [Perform Dynamic Operations with Functions](https://learn.hashicorp.com/tutorials/terraform/functions?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. The Terraform language has a number of -[built-in functions](/docs/configuration/functions.html) that can be used +[built-in functions](/docs/language/functions/index.html) that can be used in expressions to transform and combine values. These are similar to the operators but all follow a common syntax: @@ -33,7 +33,7 @@ A function call expression evaluates to the function's return value. ## Available Functions For a full list of available functions, see -[the function reference](/docs/configuration/functions.html). +[the function reference](/docs/language/functions/index.html). ## Expanding Function Arguments @@ -50,8 +50,8 @@ The expansion symbol is three periods (`...`), not a Unicode ellipsis character ## Using Sensitive Data as Function Arguments -When using sensitive data, such as [an input variable](https://www.terraform.io/docs/configuration/variables.html#suppressing-values-in-cli-output) -or [an output defined](https://www.terraform.io/docs/configuration/outputs.html#sensitive-suppressing-values-in-cli-output) as sensitive +When using sensitive data, such as [an input variable](https://www.terraform.io/docs/language/values/variables.html#suppressing-values-in-cli-output) +or [an output defined](https://www.terraform.io/docs/language/values/outputs.html#sensitive-suppressing-values-in-cli-output) as sensitive as function arguments, the result of the function call will be marked as sensitive. This is a conservative behavior that is true irrespective of the function being @@ -80,10 +80,10 @@ those it can be helpful to know when Terraform will call them in relation to other events that occur in a Terraform run. The small set of special functions includes -[`file`](../functions/file.html), -[`templatefile`](../functions/templatefile.html), -[`timestamp`](../functions/timestamp.html), -and [`uuid`](../functions/uuid.html). +[`file`](/docs/language/functions/file.html), +[`templatefile`](/docs/language/functions/templatefile.html), +[`timestamp`](/docs/language/functions/timestamp.html), +and [`uuid`](/docs/language/functions/uuid.html). If you are not working with these functions then you don't need to read this section, although the information here may still be interesting background information. diff --git a/website/docs/language/expressions/index.html.md b/website/docs/language/expressions/index.html.md index 4aee75658..ae98e9f67 100644 --- a/website/docs/language/expressions/index.html.md +++ b/website/docs/language/expressions/index.html.md @@ -16,7 +16,7 @@ and a number of built-in functions. Expressions can be used in a number of places in the Terraform language, but some contexts limit which expression constructs are allowed, such as requiring a literal value of a particular type or forbidding -[references to resource attributes](/docs/configuration/expressions/references.html#references-to-resource-attributes). +[references to resource attributes](/docs/language/expressions/references.html#references-to-resource-attributes). Each language feature's documentation describes any restrictions it places on expressions. @@ -27,43 +27,43 @@ the Terraform expression console, by running The other pages in this section describe the features of Terraform's expression syntax. -- [Types and Values](/docs/configuration/expressions/types.html) +- [Types and Values](/docs/language/expressions/types.html) documents the data types that Terraform expressions can resolve to, and the literal syntaxes for values of those types. -- [Strings and Templates](/docs/configuration/expressions/strings.html) +- [Strings and Templates](/docs/language/expressions/strings.html) documents the syntaxes for string literals, including interpolation sequences and template directives. -- [References to Values](/docs/configuration/expressions/references.html) +- [References to Values](/docs/language/expressions/references.html) documents how to refer to named values like variables and resource attributes. -- [Operators](/docs/configuration/expressions/operators.html) +- [Operators](/docs/language/expressions/operators.html) documents the arithmetic, comparison, and logical operators. -- [Function Calls](/docs/configuration/expressions/function-calls.html) +- [Function Calls](/docs/language/expressions/function-calls.html) documents the syntax for calling Terraform's built-in functions. -- [Conditional Expressions](/docs/configuration/expressions/conditionals.html) +- [Conditional Expressions](/docs/language/expressions/conditionals.html) documents the ` ? : ` expression, which chooses between two values based on a bool condition. -- [For Expressions](/docs/configuration/expressions/for.html) +- [For Expressions](/docs/language/expressions/for.html) documents expressions like `[for s in var.list : upper(s)]`, which can transform a complex type value into another complex type value. -- [Splat Expressions](/docs/configuration/expressions/splat.html) +- [Splat Expressions](/docs/language/expressions/splat.html) documents expressions like `var.list[*].id`, which can extract simpler collections from more complicated expressions. -- [Dynamic Blocks](/docs/configuration/expressions/dynamic-blocks.html) +- [Dynamic Blocks](/docs/language/expressions/dynamic-blocks.html) documents a way to create multiple repeatable nested blocks within a resource or other construct. -- [Type Constraints](/docs/configuration/types.html) +- [Type Constraints](/docs/language/expressions/type-constraints.html) documents the syntax for referring to a type, rather than a value of that type. Input variables expect this syntax in their `type` argument. -- [Version Constraints](/docs/configuration/version-constraints.html) +- [Version Constraints](/docs/language/expressions/version-constraints.html) documents the syntax of special strings that define a set of allowed software versions. Terraform uses version constraints in several places. diff --git a/website/docs/language/expressions/operators.html.md b/website/docs/language/expressions/operators.html.md index 330573590..542232680 100644 --- a/website/docs/language/expressions/operators.html.md +++ b/website/docs/language/expressions/operators.html.md @@ -56,7 +56,7 @@ as results: Terraform supports some other less-common numeric operations as [functions](function-calls.html). For example, you can calculate exponents using -[the `pow` function](../functions/pow.html). +[the `pow` function](/docs/language/functions/pow.html). ## Equality Operators diff --git a/website/docs/language/expressions/references.html.md b/website/docs/language/expressions/references.html.md index 86d562108..26eed0fb5 100644 --- a/website/docs/language/expressions/references.html.md +++ b/website/docs/language/expressions/references.html.md @@ -36,7 +36,7 @@ instance resource. ### Resources -`.` represents a [managed resource](/docs/configuration/blocks/resources/index.html) of +`.` represents a [managed resource](/docs/language/resources/index.html) of the given type and name. The value of a resource reference can vary, depending on whether the resource @@ -58,7 +58,7 @@ For more information about how to use resource references, see ### Input Variables -`var.` is the value of the [input variable](/docs/configuration/variables.html) of the given name. +`var.` is the value of the [input variable](/docs/language/values/variables.html) of the given name. If the variable has a type constraint (`type` argument) as part of its declaration, Terraform will automatically convert the caller's given value @@ -76,7 +76,7 @@ constraint all of the attributes you intend to use elsewhere in your module. ### Local Values -`local.` is the value of the [local value](/docs/configuration/locals.html) of the given name. +`local.` is the value of the [local value](/docs/language/values/locals.html) of the given name. Local values can refer to other local values, even within the same `locals` block, as long as you don't introduce circular dependencies. @@ -84,12 +84,12 @@ block, as long as you don't introduce circular dependencies. ### Child Module Outputs `module.` is an value representing the results of -[a `module` block](../blocks/modules/). +[a `module` block](/docs/language/modules/syntax.html). If the corresponding `module` block does not have either `count` nor `for_each` set then the value will be an object with one attribute for each output value defined in the child module. To access one of the module's -[output values](../outputs.html), use `module..`. +[output values](/docs/language/values/outputs.html), use `module..`. If the corresponding `module` uses `for_each` then the value will be a map of objects whose keys correspond with the keys in the `for_each` expression, @@ -103,7 +103,7 @@ elements, each one representing one module instance. ### Data Sources `data..` is an object representing a -[data resource](/docs/configuration/data-sources.html) of the given data +[data resource](/docs/language/data-sources/index.html) of the given data source type and name. If the resource has the `count` argument set, the value is a list of objects representing its instances. If the resource has the `for_each` argument set, the value is a map of objects representing its instances. @@ -123,7 +123,7 @@ to mark the reference as for a data resource. uses of Terraform run it from a directory other than the root module directory, causing these paths to be different. * `terraform.workspace` is the name of the currently selected - [workspace](/docs/state/workspaces.html). + [workspace](/docs/language/state/workspaces.html). Use the values in this section carefully, because they include information about the context in which a configuration is being applied and so may @@ -163,15 +163,15 @@ These local names are described in the documentation for the specific contexts where they appear. Some of most common local names are: - `count.index`, in resources that use - [the `count` meta-argument](/docs/configuration/meta-arguments/count.html). + [the `count` meta-argument](/docs/language/meta-arguments/count.html). - `each.key` / `each.value`, in resources that use - [the `for_each` meta-argument](/docs/configuration/meta-arguments/for_each.html). -- `self`, in [provisioner](/docs/provisioners/index.html) and - [connection](/docs/provisioners/connection.html) blocks. + [the `for_each` meta-argument](/docs/language/meta-arguments/for_each.html). +- `self`, in [provisioner](/docs/language/resources/provisioners/syntax.html) and + [connection](/docs/language/resources/provisioners/connection.html) blocks. -> **Note:** Local names are often referred to as _variables_ or _temporary variables_ in their documentation. These are not [input -variables](/docs/configuration/variables.html); they are just arbitrary names +variables](/docs/language/values/variables.html); they are just arbitrary names that temporarily represent a value. The names in this section relate to top-level configuration blocks only. @@ -254,7 +254,7 @@ for use in references, as follows: `{for k, device in aws_instance.example.device : k => device.size}`. When a resource has the -[`count`](/docs/configuration/meta-arguments/count.html) +[`count`](/docs/language/meta-arguments/count.html) argument set, the resource itself becomes a _list_ of instance objects rather than a single object. In that case, access the attributes of the instances using either [splat expressions](./splat.html) or index syntax: @@ -264,7 +264,7 @@ either [splat expressions](./splat.html) or index syntax: * `aws_instance.example[0].id` returns just the id of the first instance. When a resource has the -[`for_each`](/docs/configuration/meta-arguments/for_each.html) +[`for_each`](/docs/language/meta-arguments/for_each.html) argument set, the resource itself becomes a _map_ of instance objects rather than a single object, and attributes of instances must be specified by key, or can be accessed using a [`for` expression](./for.html). @@ -327,9 +327,9 @@ a plan involving that attribute. The treatment of these particular sensitive values is currently different than for values in -[input variables](/docs/configuration/variables.html) +[input variables](/docs/language/values/variables.html) and -[output values](/docs/configuration/outputs.html) +[output values](/docs/language/values/outputs.html) that have `sensitive = true` set. Sensitive resource attributes will be obscured in the plan when they appear directly, but other values that you _derive_ from a sensitive resource attribute will not themselves be considered @@ -337,7 +337,7 @@ sensitive, and so Terraform will include those derived values in its output without redacting them. Terraform v0.14.0 and later has an -[experimental feature](/docs/configuration/terraform.html#experimental-language-features) +[experimental feature](/docs/language/settings/index.html#experimental-language-features) to treat resource attributes that are marked as sensitive in the same way as sensitive input variables and output values, so that Terraform will consider any derived values as sensitive too. You can activate that experiment for your diff --git a/website/docs/language/expressions/splat.html.md b/website/docs/language/expressions/splat.html.md index 6ae8017f7..731aa767f 100644 --- a/website/docs/language/expressions/splat.html.md +++ b/website/docs/language/expressions/splat.html.md @@ -48,7 +48,7 @@ tuples. To get a similar result with a map or object value you must use Resources that use the `for_each` argument will appear in expressions as a map of objects, so you can't use splat expressions with those resources. For more information, see -[Referring to Resource Instances](/docs/configuration/meta-arguments/for_each.html#referring-to-instances). +[Referring to Resource Instances](/docs/language/meta-arguments/for_each.html#referring-to-instances). ## Single Values as Lists diff --git a/website/docs/language/expressions/strings.html.md b/website/docs/language/expressions/strings.html.md index d4f15d742..72cd0bba0 100644 --- a/website/docs/language/expressions/strings.html.md +++ b/website/docs/language/expressions/strings.html.md @@ -75,8 +75,8 @@ allowed, but conventionally this identifier is in all-uppercase and begins with ### Generating JSON or YAML Don't use "heredoc" strings to generate JSON or YAML. Instead, use -[the `jsonencode` function](../functions/jsonencode.html) or -[the `yamlencode` function](../functions/yamlencode.html) so that Terraform +[the `jsonencode` function](/docs/language/functions/jsonencode.html) or +[the `yamlencode` function](/docs/language/functions/yamlencode.html) so that Terraform can be responsible for guaranteeing valid JSON or YAML syntax. ```hcl diff --git a/website/docs/language/expressions/type-constraints.html.md b/website/docs/language/expressions/type-constraints.html.md index e9a7e352d..43d7f938c 100644 --- a/website/docs/language/expressions/type-constraints.html.md +++ b/website/docs/language/expressions/type-constraints.html.md @@ -27,9 +27,9 @@ function-like constructs called _type constructors._ represent a type; instead, it represents a _kind_ of similar types. Type constraints look like other kinds of Terraform -[expressions](/docs/configuration/expressions/index.html), but are a special syntax. Within the +[expressions](/docs/language/expressions/index.html), but are a special syntax. Within the Terraform language, they are only valid in the `type` argument of an -[input variable](./variables.html). +[input variable](/docs/language/values/variables.html). ## Primitive Types @@ -155,7 +155,7 @@ like the following: The Terraform language has literal expressions for creating tuple and object values, which are described in -[Expressions: Literal Expressions](/docs/configuration/expressions/types.html#literal-expressions) as +[Expressions: Literal Expressions](/docs/language/expressions/types.html#literal-expressions) as "list/tuple" literals and "map/object" literals, respectively. Terraform does _not_ provide any way to directly represent lists, maps, or sets. diff --git a/website/docs/language/expressions/types.html.md b/website/docs/language/expressions/types.html.md index 285c0a08d..c197a7f8e 100644 --- a/website/docs/language/expressions/types.html.md +++ b/website/docs/language/expressions/types.html.md @@ -93,7 +93,7 @@ The values in a map can be arbitrary expressions. The keys in a map must be strings; they can be left unquoted if -they are a valid [identifier](/docs/configuration/syntax.html#identifiers), but must be quoted +they are a valid [identifier](/docs/language/syntax/configuration.html#identifiers), but must be quoted otherwise. You can use a non-literal string expression as a key by wrapping it in parentheses, like `(var.business_unit_tag_name) = "SRE"`. @@ -124,7 +124,7 @@ offer different ways to restrict the allowed values for input variables and resource arguments. For complete details about these types (and an explanation of why the difference -usually doesn't matter), see [Type Constraints](/docs/configuration/types.html). +usually doesn't matter), see [Type Constraints](/docs/language/expressions/type-constraints.html). ## Type Conversion diff --git a/website/docs/language/expressions/version-constraints.html.md b/website/docs/language/expressions/version-constraints.html.md index 41c148911..0f7ebba54 100644 --- a/website/docs/language/expressions/version-constraints.html.md +++ b/website/docs/language/expressions/version-constraints.html.md @@ -9,9 +9,9 @@ Anywhere that Terraform lets you specify a range of acceptable versions for something, it expects a specially formatted string known as a version constraint. Version constraints are used when configuring: -- [Modules](/docs/configuration/blocks/modules/index.html) -- [Provider requirements](./provider-requirements.html) -- [The `required_version` setting](./terraform.html#specifying-a-required-terraform-version) in the `terraform` block. +- [Modules](/docs/language/modules/index.html) +- [Provider requirements](/docs/language/providers/requirements.html) +- [The `required_version` setting](/docs/language/settings/index.html#specifying-a-required-terraform-version) in the `terraform` block. ## Version Constraint Syntax @@ -22,7 +22,7 @@ other dependency management systems like Bundler and NPM. version = ">= 1.2.0, < 2.0.0" ``` -A version constraint is a [string literal](/docs/configuration/expressions/strings.html) +A version constraint is a [string literal](/docs/language/expressions/strings.html) containing one or more conditions, which are separated by commas. Each condition consists of an operator and a version number. diff --git a/website/docs/language/files/index.html.md b/website/docs/language/files/index.html.md index 6c1361d10..109c60f73 100644 --- a/website/docs/language/files/index.html.md +++ b/website/docs/language/files/index.html.md @@ -9,7 +9,7 @@ page_title: "Files and Directories - Configuration Language" Code in the Terraform language is stored in plain text files with the `.tf` file extension. There is also -[a JSON-based variant of the language](/docs/configuration/syntax-json.html) that is named with +[a JSON-based variant of the language](/docs/language/syntax/json.html) that is named with the `.tf.json` file extension. Files containing Terraform code are often called _configuration files._ @@ -34,7 +34,7 @@ treating the entire module as a single document. Separating various blocks into different files is purely for the convenience of readers and maintainers, and has no effect on the module's behavior. -A Terraform module can use [module calls](/docs/configuration/blocks/modules/index.html) to +A Terraform module can use [module calls](/docs/language/modules/index.html) to explicitly include other modules into the configuration. These child modules can come from local directories (nested in the parent module's directory, or anywhere else on disk), or from external sources like the diff --git a/website/docs/language/functions/can.html.md b/website/docs/language/functions/can.html.md index f3c885db3..8c05a304e 100644 --- a/website/docs/language/functions/can.html.md +++ b/website/docs/language/functions/can.html.md @@ -19,7 +19,7 @@ fallback values for failing expressions. The primary purpose of `can` is to turn an error condition into a boolean validation result when writing -[custom variable validation rules](../variables.html#custom-validation-rules). +[custom variable validation rules](/docs/language/values/variables.html#custom-validation-rules). For example: ``` diff --git a/website/docs/language/functions/cidrsubnets.html.md b/website/docs/language/functions/cidrsubnets.html.md index fde6b4506..4f43635c7 100644 --- a/website/docs/language/functions/cidrsubnets.html.md +++ b/website/docs/language/functions/cidrsubnets.html.md @@ -66,7 +66,7 @@ platforms. ``` You can use nested `cidrsubnets` calls with -[`for` expressions](/docs/configuration/expressions/for.html) +[`for` expressions](/docs/language/expressions/for.html) to concisely allocate groups of network address blocks: ``` diff --git a/website/docs/language/functions/csvdecode.html.md b/website/docs/language/functions/csvdecode.html.md index ef06d03cb..be3016286 100644 --- a/website/docs/language/functions/csvdecode.html.md +++ b/website/docs/language/functions/csvdecode.html.md @@ -42,7 +42,7 @@ number of fields, or this function will produce an error. ## Use with the `for_each` meta-argument You can use the result of `csvdecode` with -[the `for_each` meta-argument](/docs/configuration/meta-arguments/for_each.html) +[the `for_each` meta-argument](/docs/language/meta-arguments/for_each.html) to describe a collection of similar objects whose differences are described by the rows in the given CSV file. @@ -90,7 +90,7 @@ create or destroy associated instances as appropriate. If there is no reasonable value you can use as a unique identifier in your CSV then you could instead use -[the `count` meta-argument](/docs/configuration/meta-arguments/count.html) +[the `count` meta-argument](/docs/language/meta-arguments/count.html) to define an object for each CSV row, with each one identified by its index into the list returned by `csvdecode`. However, in that case any future updates to the CSV may be disruptive if they change the positions of particular objects in diff --git a/website/docs/language/functions/defaults.html.md b/website/docs/language/functions/defaults.html.md index b967d6a37..b4d684780 100644 --- a/website/docs/language/functions/defaults.html.md +++ b/website/docs/language/functions/defaults.html.md @@ -11,7 +11,7 @@ description: |- -> **Note:** This function is available only in Terraform 0.15 and later. ~> **Experimental:** This function is part of -[the optional attributes experiment](../types.html#experimental-optional-object-type-attributes) +[the optional attributes experiment](/docs/language/expressions/type-constraints.html#experimental-optional-object-type-attributes) and is only available in modules where the `module_variable_optional_attrs` experiment is explicitly enabled. @@ -30,7 +30,7 @@ defaults(input_value, defaults) ``` The `defaults` function expects that the `input_value` argument will be the -value of an input variable with an exact [type constraint](../types.html) +value of an input variable with an exact [type constraint](/docs/language/expressions/types.html) (not containing `any`). The function will then visit every attribute in the data structure, including attributes of nested objects, and apply the default values given in the defaults object. diff --git a/website/docs/language/functions/fileset.html.md b/website/docs/language/functions/fileset.html.md index 969efbfce..147ac08ba 100644 --- a/website/docs/language/functions/fileset.html.md +++ b/website/docs/language/functions/fileset.html.md @@ -65,7 +65,7 @@ before Terraform takes any actions. ``` A common use of `fileset` is to create one resource instance per matched file, using -[the `for_each` meta-argument](/docs/configuration/meta-arguments/for_each.html): +[the `for_each` meta-argument](/docs/language/meta-arguments/for_each.html): ```hcl resource "example_thing" "example" { diff --git a/website/docs/language/functions/flatten.html.md b/website/docs/language/functions/flatten.html.md index e2a807d5a..57c81091a 100644 --- a/website/docs/language/functions/flatten.html.md +++ b/website/docs/language/functions/flatten.html.md @@ -31,9 +31,9 @@ Indirectly-nested lists, such as those in maps, are _not_ flattened. ## Flattening nested structures for `for_each` The -[resource `for_each`](/docs/configuration/meta-arguments/for_each.html) +[resource `for_each`](/docs/language/meta-arguments/for_each.html) and -[`dynamic` block](/docs/configuration/expressions/dynamic-blocks.html) +[`dynamic` block](/docs/language/expressions/dynamic-blocks.html) language features both require a collection value that has one element for each repetition. diff --git a/website/docs/language/functions/index.html.md b/website/docs/language/functions/index.html.md index 8c9571093..2770bdaef 100644 --- a/website/docs/language/functions/index.html.md +++ b/website/docs/language/functions/index.html.md @@ -21,7 +21,7 @@ max(5, 12, 9) ``` For more details on syntax, see -[_Function Calls_](/docs/configuration/expressions/function-calls.html) +[_Function Calls_](/docs/language/expressions/function-calls.html) in the Expressions section. The Terraform language does not support user-defined functions, and so only diff --git a/website/docs/language/functions/jsondecode.html.md b/website/docs/language/functions/jsondecode.html.md index 52927db23..aacf2874a 100644 --- a/website/docs/language/functions/jsondecode.html.md +++ b/website/docs/language/functions/jsondecode.html.md @@ -15,7 +15,7 @@ of the result of decoding that string. The JSON encoding is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159). This function maps JSON values to -[Terraform language values](/docs/configuration/expressions/types.html) +[Terraform language values](/docs/language/expressions/types.html) in the following way: | JSON type | Terraform type | diff --git a/website/docs/language/functions/jsonencode.html.md b/website/docs/language/functions/jsonencode.html.md index 7e8405aba..06f13fa84 100644 --- a/website/docs/language/functions/jsonencode.html.md +++ b/website/docs/language/functions/jsonencode.html.md @@ -13,7 +13,7 @@ description: |- The JSON encoding is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159). This function maps -[Terraform language values](/docs/configuration/expressions/types.html) +[Terraform language values](/docs/language/expressions/types.html) to JSON values in the following way: | Terraform type | JSON type | diff --git a/website/docs/language/functions/list.html.md b/website/docs/language/functions/list.html.md index d6e7e6a91..3330d330c 100644 --- a/website/docs/language/functions/list.html.md +++ b/website/docs/language/functions/list.html.md @@ -20,7 +20,7 @@ tolist([a, b, c]) The `[ ... ]` brackets construct a tuple value, and then the `tolist` function then converts it to a list. For more information on the value types in the -Terraform language, see [Type Constraints](../types.html). +Terraform language, see [Type Constraints](/docs/language/expressions/types.html). ## Related Functions diff --git a/website/docs/language/functions/map.html.md b/website/docs/language/functions/map.html.md index 118ebba76..b05744d59 100644 --- a/website/docs/language/functions/map.html.md +++ b/website/docs/language/functions/map.html.md @@ -23,7 +23,7 @@ tomap({ The `{ ... }` braces construct an object value, and then the `tomap` function then converts it to a map. For more information on the value types in the -Terraform language, see [Type Constraints](../types.html). +Terraform language, see [Type Constraints](/docs/language/expressions/types.html). ## Related Functions diff --git a/website/docs/language/functions/setproduct.html.md b/website/docs/language/functions/setproduct.html.md index 570489be7..030ab2c32 100644 --- a/website/docs/language/functions/setproduct.html.md +++ b/website/docs/language/functions/setproduct.html.md @@ -117,9 +117,9 @@ elements all have a consistent type: ## Finding combinations for `for_each` The -[resource `for_each`](/docs/configuration/meta-arguments/for_each.html) +[resource `for_each`](/docs/language/meta-arguments/for_each.html) and -[`dynamic` block](/docs/configuration/expressions/dynamic-blocks.html) +[`dynamic` block](/docs/language/expressions/dynamic-blocks.html) language features both require a collection value that has one element for each repetition. diff --git a/website/docs/language/functions/templatefile.html.md b/website/docs/language/functions/templatefile.html.md index 0866cb299..95bc2b04f 100644 --- a/website/docs/language/functions/templatefile.html.md +++ b/website/docs/language/functions/templatefile.html.md @@ -17,7 +17,7 @@ templatefile(path, vars) ``` The template syntax is the same as for -[string templates](/docs/configuration/expressions/strings.html#string-templates) +[string templates](/docs/language/expressions/strings.html#string-templates) in the main Terraform language, including interpolation sequences delimited with `${` ... `}`. This function just allows longer template sequences to be factored out into a separate file for readability. @@ -98,7 +98,7 @@ interpolation sequences and directives. Instead, you can write a template that consists only of a single interpolated call to either [`jsonencode`](./jsonencode.html) or [`yamlencode`](./yamlencode.html), specifying the value to encode using -[normal Terraform expression syntax](/docs/configuration/expressions/index.html) +[normal Terraform expression syntax](/docs/language/expressions/index.html) as in the following examples: ``` @@ -118,9 +118,9 @@ this will produce a valid JSON or YAML representation of the given data structure, without the need to manually handle escaping or delimiters. In the latest examples above, the repetition based on elements of `ip_addrs` is achieved by using a -[`for` expression](/docs/configuration/expressions/for.html) +[`for` expression](/docs/language/expressions/for.html) rather than by using -[template directives](/docs/configuration/expressions/strings.html#directives). +[template directives](/docs/language/expressions/strings.html#directives). ```json {"backends":["10.0.0.1:8080","10.0.0.2:8080"]} diff --git a/website/docs/language/functions/timestamp.html.md b/website/docs/language/functions/timestamp.html.md index 45bb526b7..5ad73efd2 100644 --- a/website/docs/language/functions/timestamp.html.md +++ b/website/docs/language/functions/timestamp.html.md @@ -20,7 +20,7 @@ The result of this function will change every second, so using this function directly with resource attributes will cause a diff to be detected on every Terraform run. We do not recommend using this function in resource attributes, but in rare cases it can be used in conjunction with -[the `ignore_changes` lifecycle meta-argument](/docs/configuration/meta-arguments/lifecycle.html#ignore_changes) +[the `ignore_changes` lifecycle meta-argument](/docs/language/meta-arguments/lifecycle.html#ignore_changes) to take the timestamp only on initial creation of the resource. For more stable time handling, see the [Time Provider](https://registry.terraform.io/providers/hashicorp/time/). diff --git a/website/docs/language/functions/uuid.html.md b/website/docs/language/functions/uuid.html.md index 4e47d26d0..b801bf666 100644 --- a/website/docs/language/functions/uuid.html.md +++ b/website/docs/language/functions/uuid.html.md @@ -19,11 +19,11 @@ This function produces a new value each time it is called, and so using it directly in resource arguments will result in spurious diffs. We do not recommend using the `uuid` function in resource configurations, but it can be used with care in conjunction with -[the `ignore_changes` lifecycle meta-argument](/docs/configuration/meta-arguments/lifecycle.html#ignore_changes). +[the `ignore_changes` lifecycle meta-argument](/docs/language/meta-arguments/lifecycle.html#ignore_changes). In most cases we recommend using [the `random` provider](https://registry.terraform.io/providers/hashicorp/random/latest/docs) instead, since it allows the one-time generation of random values that are -then retained in the Terraform [state](/docs/state/index.html) for use by +then retained in the Terraform [state](/docs/language/state/index.html) for use by future operations. In particular, [`random_id`](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) can generate results with equivalent randomness to the `uuid` function. diff --git a/website/docs/language/functions/yamldecode.html.md b/website/docs/language/functions/yamldecode.html.md index 15e447bb3..b24ae72aa 100644 --- a/website/docs/language/functions/yamldecode.html.md +++ b/website/docs/language/functions/yamldecode.html.md @@ -16,7 +16,7 @@ This function supports a subset of [YAML 1.2](https://yaml.org/spec/1.2/spec.htm as described below. This function maps YAML values to -[Terraform language values](/docs/configuration/expressions/types.html) +[Terraform language values](/docs/language/expressions/types.html) in the following way: | YAML type | Terraform type | diff --git a/website/docs/language/functions/yamlencode.html.md b/website/docs/language/functions/yamlencode.html.md index 5e5fc9817..aa823dcde 100644 --- a/website/docs/language/functions/yamlencode.html.md +++ b/website/docs/language/functions/yamlencode.html.md @@ -29,7 +29,7 @@ results are also valid YAML because YAML is a JSON superset. --> This function maps -[Terraform language values](/docs/configuration/expressions/types.html) +[Terraform language values](/docs/language/expressions/types.html) to YAML tags in the following way: | Terraform type | YAML type | diff --git a/website/docs/language/index.html.md b/website/docs/language/index.html.md index 1f60b96a2..40620aa0f 100644 --- a/website/docs/language/index.html.md +++ b/website/docs/language/index.html.md @@ -19,7 +19,7 @@ heart of the workflow. ## About the Terraform Language The main purpose of the Terraform language is declaring -[resources](/docs/configuration/blocks/resources/index.html), which represent infrastructure objects. All other +[resources](/docs/language/resources/index.html), which represent infrastructure objects. All other language features exist only to make the definition of resources more flexible and convenient. diff --git a/website/docs/language/meta-arguments/count.html.md b/website/docs/language/meta-arguments/count.html.md index fa2125325..4e92bdb95 100644 --- a/website/docs/language/meta-arguments/count.html.md +++ b/website/docs/language/meta-arguments/count.html.md @@ -12,14 +12,14 @@ previous versions can only use it with resources. > **Hands-on:** Try the [Manage Similar Resources With Count](https://learn.hashicorp.com/tutorials/terraform/count?in=terraform/0-13&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. -By default, a [resource block](/docs/configuration/blocks/resources/syntax.html) configures one real +By default, a [resource block](/docs/language/resources/syntax.html) configures one real infrastructure object. (Similarly, a -[module block](/docs/configuration/blocks/modules/syntax.html) includes a +[module block](/docs/language/modules/syntax.html) includes a child module's contents into the configuration one time.) However, sometimes you want to manage several similar objects (like a fixed pool of compute instances) without writing a separate block for each one. Terraform has two ways to do this: -`count` and [`for_each`](/docs/configuration/meta-arguments/for_each.html). +`count` and [`for_each`](/docs/language/meta-arguments/for_each.html). If a resource or module block includes a `count` argument whose value is a whole number, Terraform will create that many instances. @@ -58,7 +58,7 @@ This object has one attribute: ## Using Expressions in `count` -The `count` meta-argument accepts numeric [expressions](/docs/configuration/expressions/index.html). +The `count` meta-argument accepts numeric [expressions](/docs/language/expressions/index.html). However, unlike most arguments, the `count` value must be known _before_ Terraform performs any remote resource actions. This means `count` can't refer to any resource attributes that aren't known until after a diff --git a/website/docs/language/meta-arguments/for_each.html.md b/website/docs/language/meta-arguments/for_each.html.md index 23bdeb8e1..44b80a707 100644 --- a/website/docs/language/meta-arguments/for_each.html.md +++ b/website/docs/language/meta-arguments/for_each.html.md @@ -13,14 +13,14 @@ it with resources. > **Hands-on:** Try the [Manage Similar Resources With For Each](https://learn.hashicorp.com/tutorials/terraform/for-each?in=terraform/0-13&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. -By default, a [resource block](/docs/configuration/blocks/resources/syntax.html) configures one real +By default, a [resource block](/docs/language/resources/syntax.html) configures one real infrastructure object (and similarly, a -[module block](/docs/configuration/blocks/modules/syntax.html) includes a +[module block](/docs/language/modules/syntax.html) includes a child module's contents into the configuration one time). However, sometimes you want to manage several similar objects (like a fixed pool of compute instances) without writing a separate block for each one. Terraform has two ways to do this: -[`count`](/docs/configuration/meta-arguments/count.html) and `for_each`. +[`count`](/docs/language/meta-arguments/count.html) and `for_each`. If a resource or module block includes a `for_each` argument whose value is a map or a set of strings, Terraform will create one instance for each member of @@ -107,16 +107,16 @@ that cannot be determined before apply, and a `-target` may be needed. including `uuid`, `bcrypt`, or `timestamp`, as their evaluation is deferred during the main evaluation step. -Sensitive values, such as [sensitive input variables](https://www.terraform.io/docs/configuration/variables.html#suppressing-values-in-cli-output), -[sensitive outputs](https://www.terraform.io/docs/configuration/outputs.html#sensitive-suppressing-values-in-cli-output), -or [sensitive resource attributes](https://www.terraform.io/docs/configuration/expressions/references.html#sensitive-resource-attributes) +Sensitive values, such as [sensitive input variables](https://www.terraform.io/docs/language/values/variables.html#suppressing-values-in-cli-output), +[sensitive outputs](https://www.terraform.io/docs/language/values/outputs.html#sensitive-suppressing-values-in-cli-output), +or [sensitive resource attributes](https://www.terraform.io/docs/language/expressions/references.html#sensitive-resource-attributes) (if the `provider_sensitive_attrs` experiment is enabled), cannot be used as arguments to `for_each`. The value used in `for_each` is used to identify the resource instance and will always be disclosed in UI output, which is why sensitive values are not allowed. Attempts to use sensitive values as `for_each` arguments will result in an error. If you transform a value containing sensitive data into an argument to be used in `for_each`, be aware that -[most functions in Terraform will return a sensitive result if given an argument with any sensitive content](https://www.terraform.io/docs/configuration/expressions/function-calls.html#using-sensitive-data-as-function-arguments). +[most functions in Terraform will return a sensitive result if given an argument with any sensitive content](https://www.terraform.io/docs/language/expressions/function-calls.html#using-sensitive-data-as-function-arguments). In many cases, you can achieve similar results to a function used for this purpose by using a `for` expression. For example, if you would like to call `keys(local.map)`, where `local.map` is an object with sensitive values (but non-sensitive keys), you can create a @@ -124,7 +124,7 @@ value to pass to `for_each` with `toset([for k,v in local.map : k])`. ## Using Expressions in `for_each` -The `for_each` meta-argument accepts map or set [expressions](/docs/configuration/expressions/index.html). +The `for_each` meta-argument accepts map or set [expressions](/docs/language/expressions/index.html). However, unlike most arguments, the `for_each` value must be known _before_ Terraform performs any remote resource actions. This means `for_each` can't refer to any resource attributes that aren't known until after a @@ -133,7 +133,7 @@ an object is created). The `for_each` value must be a map or set with one element per desired resource instance. When providing a set, you must use an expression that -explicitly returns a set value, like the [`toset`](/docs/configuration/functions/toset.html) +explicitly returns a set value, like the [`toset`](/docs/language/functions/toset.html) function; to prevent unwanted surprises during conversion, the `for_each` argument does not implicitly convert lists or tuples to sets. If you need to declare resource instances based on a nested @@ -142,10 +142,10 @@ can use Terraform expressions and functions to derive a suitable value. For example: * Transform a multi-level nested structure into a flat list by - [using nested `for` expressions with the `flatten` function](/docs/configuration/functions/flatten.html#flattening-nested-structures-for-for_each). + [using nested `for` expressions with the `flatten` function](/docs/language/functions/flatten.html#flattening-nested-structures-for-for_each). * Produce an exhaustive list of combinations of elements from two or more collections by - [using the `setproduct` function inside a `for` expression](/docs/configuration/functions/setproduct.html#finding-combinations-for-for_each). + [using the `setproduct` function inside a `for` expression](/docs/language/functions/setproduct.html#finding-combinations-for-for_each). ## Referring to Instances @@ -172,7 +172,7 @@ as a whole. ## Using Sets The Terraform language doesn't have a literal syntax for -[set values](/docs/configuration/types.html#collection-types), but you can use the `toset` +[set values](/docs/language/expressions/type-constraints.html#collection-types), but you can use the `toset` function to explicitly convert a list of strings to a set: ```hcl @@ -201,7 +201,7 @@ removes any duplicate elements. `toset(["b", "a", "b"])` will produce a set containing only `"a"` and `"b"` in no particular order; the second `"b"` is discarded. -If you are writing a module with an [input variable](/docs/configuration/variables.html) that +If you are writing a module with an [input variable](/docs/language/values/variables.html) that will be used as a set of strings for `for_each`, you can set its type to `set(string)` to avoid the need for an explicit type conversion: diff --git a/website/docs/language/meta-arguments/lifecycle.html.md b/website/docs/language/meta-arguments/lifecycle.html.md index 6c9be168c..6671ff3b3 100644 --- a/website/docs/language/meta-arguments/lifecycle.html.md +++ b/website/docs/language/meta-arguments/lifecycle.html.md @@ -6,7 +6,7 @@ page_title: "The lifecycle Meta-Argument - Configuration Language" # The `lifecycle` Meta-Argument The general lifecycle for resources is described in the -[Resource Behavior](/docs/configuration/blocks/resources/behavior.html) page. Some details of +[Resource Behavior](/docs/language/resources/behavior.html) page. Some details of that behavior can be customized using the special nested `lifecycle` block within a resource block body: diff --git a/website/docs/language/meta-arguments/module-providers.html.md b/website/docs/language/meta-arguments/module-providers.html.md index b5b1faca6..99cd8e431 100644 --- a/website/docs/language/meta-arguments/module-providers.html.md +++ b/website/docs/language/meta-arguments/module-providers.html.md @@ -5,9 +5,9 @@ page_title: "The Module providers Meta-Argument - Configuration Language" # The Module `providers` Meta-Argument -In a [module call](/docs/configuration/blocks/modules/syntax.html) block, the +In a [module call](/docs/language/modules/syntax.html) block, the optional `providers` meta-argument specifies which -[provider configurations](/docs/configuration/providers.html) from the parent +[provider configurations](/docs/language/providers/configuration.html) from the parent module will be available inside the child module. ```hcl @@ -120,4 +120,4 @@ names it needs. For more details and guidance about working with providers inside a re-usable child module, see -[Module Development: Providers Within Modules](/docs/modules/providers.html). +[Module Development: Providers Within Modules](/docs/language/modules/develop/providers.html). diff --git a/website/docs/language/meta-arguments/resource-provider.html.md b/website/docs/language/meta-arguments/resource-provider.html.md index 7fa434c93..bdecf834c 100644 --- a/website/docs/language/meta-arguments/resource-provider.html.md +++ b/website/docs/language/meta-arguments/resource-provider.html.md @@ -9,7 +9,7 @@ The `provider` meta-argument specifies which provider configuration to use for a overriding Terraform's default behavior of selecting one based on the resource type name. Its value should be an unquoted `.` reference. -As described in [Provider Configuration](/docs/configuration/providers.html), you can optionally +As described in [Provider Configuration](/docs/language/providers/configuration.html), you can optionally create multiple configurations for a single provider (usually to manage resources in different regions of multi-region services). Each provider can have one default configuration, and any number of alternate configurations that @@ -51,7 +51,7 @@ ensure that the provider is fully configured before any resource actions are taken. The `provider` meta-argument expects -[a `.` reference](/docs/configuration/providers.html#referring-to-alternate-provider-configurations), +[a `.` reference](/docs/language/providers/configuration.html#referring-to-alternate-provider-configurations), which does not need to be quoted. Arbitrary expressions are not permitted for `provider` because it must be resolved while Terraform is constructing the dependency graph, before it is safe to evaluate expressions. diff --git a/website/docs/language/modules/develop/composition.html.md b/website/docs/language/modules/develop/composition.html.md index 998fa5bbd..96c2da685 100644 --- a/website/docs/language/modules/develop/composition.html.md +++ b/website/docs/language/modules/develop/composition.html.md @@ -310,7 +310,7 @@ Most modules contain `resource` blocks and thus describe infrastructure to be created and managed. It may sometimes be useful to write modules that do not describe any new infrastructure at all, but merely retrieve information about existing infrastructure that was created elsewhere using -[data sources](/docs/configuration/data-sources.html). +[data sources](/docs/language/data-sources/index.html). As with conventional modules, we suggest using this technique only when the module raises the level of abstraction in some way, in this case by @@ -346,7 +346,7 @@ data sources, or it could read saved information from a Consul cluster using [`consul_keys`](https://registry.terraform.io/providers/hashicorp/consul/latest/docs/data-sources/keys), or it might read the outputs directly from the state of the configuration that manages the network using -[`terraform_remote_state`](https://www.terraform.io/docs/providers/terraform/d/remote_state.html). +[`terraform_remote_state`](https://www.terraform.io/docs/language/state/remote-state-data.html). The key benefit of this approach is that the source of this information can change over time without updating every configuration that depends on it. diff --git a/website/docs/language/modules/develop/index.html.md b/website/docs/language/modules/develop/index.html.md index af6d608bf..c2c10d06c 100644 --- a/website/docs/language/modules/develop/index.html.md +++ b/website/docs/language/modules/develop/index.html.md @@ -17,25 +17,25 @@ directly in terms of physical objects. The `.tf` files in your working directory when you run [`terraform plan`](/docs/commands/plan.html) or [`terraform apply`](/docs/commands/apply.html) together form the _root_ -module. That module may [call other modules](/docs/configuration/blocks/modules/syntax.html#calling-a-child-module) +module. That module may [call other modules](/docs/language/modules/syntax.html#calling-a-child-module) and connect them together by passing output values from one to input values of another. -To learn how to _use_ modules, see [the Modules configuration section](/docs/configuration/blocks/modules/index.html). +To learn how to _use_ modules, see [the Modules configuration section](/docs/language/modules/index.html). This section is about _creating_ re-usable modules that other configurations can include using `module` blocks. ## Module structure Re-usable modules are defined using all of the same -[configuration language](/docs/configuration/) concepts we use in root modules. +[configuration language](/docs/language/index.html) concepts we use in root modules. Most commonly, modules use: -* [Input variables](/docs/configuration/variables.html) to accept values from +* [Input variables](/docs/language/values/variables.html) to accept values from the calling module. -* [Output values](/docs/configuration/outputs.html) to return results to the +* [Output values](/docs/language/values/outputs.html) to return results to the calling module, which it can then use to populate arguments elsewhere. -* [Resources](/docs/configuration/blocks/resources/index.html) to define one or more +* [Resources](/docs/language/resources/index.html) to define one or more infrastructure objects that the module will manage. To define a module, create a new directory for it and place one or more `.tf` diff --git a/website/docs/language/modules/develop/providers.html.md b/website/docs/language/modules/develop/providers.html.md index 2578a03b1..4d71e3325 100644 --- a/website/docs/language/modules/develop/providers.html.md +++ b/website/docs/language/modules/develop/providers.html.md @@ -54,10 +54,10 @@ to reintroduce the provider configuration. ## Provider Version Constraints in Modules Although provider _configurations_ are shared between modules, each module must -declare its own [provider requirements](/docs/configuration/provider-requirements.html), so that +declare its own [provider requirements](/docs/language/providers/requirements.html), so that Terraform can ensure that there is a single version of the provider that is compatible with all modules in the configuration and to specify the -[source address](/docs/configuration/provider-requirements.html#source-addresses) that serves as +[source address](/docs/language/providers/requirements.html#source-addresses) that serves as the global (module-agnostic) identifier for a provider. To declare that a module requires particular versions of a specific provider, @@ -80,7 +80,7 @@ however, specify any of the configuration settings that determine what remote endpoints the provider will access, such as an AWS region; configuration settings come from provider _configurations_, and a particular overall Terraform configuration can potentially have -[several different configurations for the same provider](/docs/configuration/providers.html#alias-multiple-provider-configurations). +[several different configurations for the same provider](/docs/language/providers/configuration.html#alias-multiple-provider-configurations). If you are writing a shared Terraform module, constrain only the minimum required provider version using a `>=` constraint. This should specify the @@ -121,10 +121,10 @@ resource "aws_s3_bucket" "example" { We recommend using this approach when a single configuration for each provider is sufficient for an entire configuration. -~> **Note:** Only provider configurations are inherited by child modules, not provider source or version requirements. Each module must [declare its own provider requirements](/docs/configuration/provider-requirements.html). This is especially important for non-HashiCorp providers. +~> **Note:** Only provider configurations are inherited by child modules, not provider source or version requirements. Each module must [declare its own provider requirements](/docs/language/providers/requirements.html). This is especially important for non-HashiCorp providers. In more complex situations there may be -[multiple provider configurations](/docs/configuration/providers.html#alias-multiple-provider-configurations), +[multiple provider configurations](/docs/language/providers/configuration.html#alias-multiple-provider-configurations), or a child module may need to use different provider settings than its parent. For such situations, you must pass providers explicitly. @@ -161,7 +161,7 @@ module "example" { ``` The `providers` argument within a `module` block is similar to -[the `provider` argument](/docs/configuration/meta-arguments/resource-provider.html) +[the `provider` argument](/docs/language/meta-arguments/resource-provider.html) within a resource, but is a map rather than a single string because a module may contain resources from many different providers. @@ -231,7 +231,7 @@ valid, it is not necessary: proxy configuration blocks are needed only to establish which _aliased_ provider configurations a child module expects. Don't use a proxy configuration block if a module only needs a single default provider configuration, and don't use proxy configuration blocks only to imply -[provider requirements](/docs/configuration/provider-requirements.html). +[provider requirements](/docs/language/providers/requirements.html). ## Legacy Shared Modules with Provider Configurations diff --git a/website/docs/language/modules/develop/publish.html.md b/website/docs/language/modules/develop/publish.html.md index b0eebf367..93a17e3df 100644 --- a/website/docs/language/modules/develop/publish.html.md +++ b/website/docs/language/modules/develop/publish.html.md @@ -14,7 +14,7 @@ If you've built a module that you intend to be reused, we recommend your module, generate documentation, and more. Published modules can be easily consumed by Terraform, and users can -[constrain module versions](/docs/configuration/blocks/modules/syntax.html#version) +[constrain module versions](/docs/language/modules/syntax.html#version) for safe and predictable updates. The following example shows how a caller might use a module from the Terraform Registry: @@ -32,11 +32,11 @@ the same benefits. Although the registry is the native mechanism for distributing re-usable modules, Terraform can also install modules from -[various other sources](/docs/modules/sources.html). The alternative sources +[various other sources](/docs/language/modules/sources.html). The alternative sources do not support the first-class versioning mechanism, but some sources have their own mechanisms for selecting particular VCS commits, etc. We recommend that modules distributed via other protocols still use the -[standard module structure](/docs/modules/structure.html) so that they can +[standard module structure](/docs/language/modules/develop/structure.html) so that they can be used in a similar way as a registry module or be published on the registry at a later time. diff --git a/website/docs/language/modules/develop/structure.html.md b/website/docs/language/modules/develop/structure.html.md index e3b0225b0..6aed2b265 100644 --- a/website/docs/language/modules/develop/structure.html.md +++ b/website/docs/language/modules/develop/structure.html.md @@ -54,8 +54,8 @@ don't need to do any extra work to follow the standard structure. * **Variables and outputs should have descriptions.** All variables and outputs should have one or two sentence descriptions that explain their purpose. This is used for documentation. See the documentation for - [variable configuration](/docs/configuration/variables.html) and - [output configuration](/docs/configuration/outputs.html) for more details. + [variable configuration](/docs/language/values/variables.html) and + [output configuration](/docs/language/values/outputs.html) for more details. * **Nested modules**. Nested modules should exist under the `modules/` subdirectory. Any nested module with a `README.md` is considered usable diff --git a/website/docs/language/modules/index.html.md b/website/docs/language/modules/index.html.md index e5f756102..2aef04ab3 100644 --- a/website/docs/language/modules/index.html.md +++ b/website/docs/language/modules/index.html.md @@ -48,21 +48,21 @@ module registry for sharing modules internally within your organization. ## Using Modules -- [Module Blocks](/docs/configuration/blocks/modules/syntax.html) documents the syntax for +- [Module Blocks](/docs/language/modules/syntax.html) documents the syntax for calling a child module from a parent module, including meta-arguments like `for_each`. -- [Module Sources](/docs/modules/sources.html) documents what kinds of paths, +- [Module Sources](/docs/language/modules/sources.html) documents what kinds of paths, addresses, and URIs can be used in the `source` argument of a module block. - The Meta-Arguments section documents special arguments that can be used with every module, including - [`providers`](/docs/configuration/meta-arguments/module-providers.html), - [`depends_on`](/docs/configuration/meta-arguments/depends_on.html), - [`count`](/docs/configuration/meta-arguments/count.html), - and [`for_each`](/docs/configuration/meta-arguments/for_each.html). + [`providers`](/docs/language/meta-arguments/module-providers.html), + [`depends_on`](/docs/language/meta-arguments/depends_on.html), + [`count`](/docs/language/meta-arguments/count.html), + and [`for_each`](/docs/language/meta-arguments/for_each.html). ## Developing Modules For information about developing reusable modules, see -[Module Development](/docs/modules/index.html). +[Module Development](/docs/language/modules/develop/index.html). diff --git a/website/docs/language/modules/sources.html.md b/website/docs/language/modules/sources.html.md index 692fda2be..294d1590d 100644 --- a/website/docs/language/modules/sources.html.md +++ b/website/docs/language/modules/sources.html.md @@ -7,7 +7,7 @@ description: The source argument within a module block specifies the location of # Module Sources -The `source` argument in [a `module` block](/docs/configuration/blocks/modules/syntax.html) +The `source` argument in [a `module` block](/docs/language/modules/syntax.html) tells Terraform where to find the source code for the desired child module. Terraform uses this during the module installation step of `terraform init` @@ -123,7 +123,7 @@ the `remote` backend. Registry modules support versioning. You can provide a specific version as shown in the above examples, or use flexible -[version constraints](/docs/configuration/blocks/modules/syntax.html#version). +[version constraints](/docs/language/modules/syntax.html#version). You can learn more about the registry at the [Terraform Registry documentation](/docs/registry/modules/use.html#using-modules). diff --git a/website/docs/language/modules/syntax.html.md b/website/docs/language/modules/syntax.html.md index e1f75d264..f2616210a 100644 --- a/website/docs/language/modules/syntax.html.md +++ b/website/docs/language/modules/syntax.html.md @@ -23,13 +23,13 @@ in separate configurations, allowing resource configurations to be packaged and re-used. This page describes how to call one module from another. For more information -about creating re-usable child modules, see [Module Development](/docs/modules/index.html). +about creating re-usable child modules, see [Module Development](/docs/language/modules/develop/index.html). ## Calling a Child Module To _call_ a module means to include the contents of that module into the configuration with specific values for its -[input variables](/docs/configuration/variables.html). Modules are called +[input variables](/docs/language/values/variables.html). Modules are called from within other modules using `module` blocks: ```hcl @@ -53,7 +53,7 @@ Module calls use the following kinds of arguments: - The `version` argument is recommended for modules from a registry. -- Most other arguments correspond to [input variables](/docs/configuration/variables.html) +- Most other arguments correspond to [input variables](/docs/language/values/variables.html) defined by the module. (The `servers` argument in the example above is one of these.) @@ -67,7 +67,7 @@ Terraform. Its value is either the path to a local directory containing the module's configuration files, or a remote module source that Terraform should download and use. This value must be a literal string with no template sequences; arbitrary expressions are not allowed. For more information on -possible values for this argument, see [Module Sources](/docs/modules/sources.html). +possible values for this argument, see [Module Sources](/docs/language/modules/sources.html). The same source address can be specified in multiple `module` blocks to create multiple copies of the resources defined within, possibly with different @@ -95,7 +95,7 @@ module "consul" { } ``` -The `version` argument accepts a [version constraint string](/docs/configuration/version-constraints.html). +The `version` argument accepts a [version constraint string](/docs/language/expressions/version-constraints.html). Terraform will use the newest installed version of the module that meets the constraint; if no acceptable versions are installed, it will download the newest version that meets the constraint. @@ -116,22 +116,22 @@ optional meta-arguments that have special meaning across all modules, described in more detail in the following pages: - `count` - Creates multiple instances of a module from a single `module` block. - See [the `count` page](/docs/configuration/meta-arguments/count.html) + See [the `count` page](/docs/language/meta-arguments/count.html) for details. - `for_each` - Creates multiple instances of a module from a single `module` block. See - [the `for_each` page](/docs/configuration/meta-arguments/for_each.html) + [the `for_each` page](/docs/language/meta-arguments/for_each.html) for details. - `providers` - Passes provider configurations to a child module. See - [the `providers` page](/docs/configuration/meta-arguments/module-providers.html) + [the `providers` page](/docs/language/meta-arguments/module-providers.html) for details. If not specified, the child module inherits all of the default (un-aliased) provider configurations from the calling module. - `depends_on` - Creates explicit dependencies between the entire module and the listed targets. See - [the `depends_on` page](/docs/configuration/meta-arguments/depends_on.html) + [the `depends_on` page](/docs/language/meta-arguments/depends_on.html) for details. In addition to the above, the `lifecycle` argument is not currently used by @@ -141,7 +141,7 @@ Terraform but is reserved for planned future features. The resources defined in a module are encapsulated, so the calling module cannot access their attributes directly. However, the child module can -declare [output values](/docs/configuration/outputs.html) to selectively +declare [output values](/docs/language/values/outputs.html) to selectively export certain values to be accessed by the calling module. For example, if the `./app-cluster` module referenced in the example above @@ -157,7 +157,7 @@ resource "aws_elb" "example" { ``` For more information about referring to named values, see -[Expressions](/docs/configuration/expressions/index.html). +[Expressions](/docs/language/expressions/index.html). ## Transferring Resource State Into Modules @@ -173,15 +173,15 @@ Terraform that it has moved to a different module. When passing resource addresses to `terraform state mv`, resources within child modules must be prefixed with `module..`. If a module was called with -[`count`](/docs/configuration/meta-arguments/count.html) or -[`for_each`](/docs/configuration/meta-arguments/for_each.html), +[`count`](/docs/language/meta-arguments/count.html) or +[`for_each`](/docs/language/meta-arguments/for_each.html), its resource addresses must be prefixed with `module.[].` instead, where `` matches the `count.index` or `each.key` value of a particular module instance. Full resource addresses for module contents are used within the UI and on the command line, but cannot be used within a Terraform configuration. Only -[outputs](/docs/configuration/outputs.html) from a module can be referenced from +[outputs](/docs/language/values/outputs.html) from a module can be referenced from elsewhere in your configuration. ## Tainting resources within a module diff --git a/website/docs/language/providers/configuration.html.md b/website/docs/language/providers/configuration.html.md index 3470bfa68..612e8f9d5 100644 --- a/website/docs/language/providers/configuration.html.md +++ b/website/docs/language/providers/configuration.html.md @@ -16,7 +16,7 @@ configuration (like endpoint URLs or cloud regions) before they can be used. - This page documents how to configure settings for providers. -- The [Provider Requirements](./provider-requirements.html) page documents how +- The [Provider Requirements](/docs/language/providers/requirements.html) page documents how to declare providers so Terraform can install them. ## Provider Configuration @@ -24,8 +24,8 @@ configuration (like endpoint URLs or cloud regions) before they can be used. Provider configurations belong in the root module of a Terraform configuration. (Child modules receive their provider configurations from the root module; for more information, see -[The Module `providers` Meta-Argument](/docs/configuration/meta-arguments/module-providers.html) -and [Module Development: Providers Within Modules](/docs/modules/providers.html).) +[The Module `providers` Meta-Argument](/docs/language/meta-arguments/module-providers.html) +and [Module Development: Providers Within Modules](/docs/language/modules/develop/providers.html).) A provider configuration is created using a `provider` block: @@ -37,7 +37,7 @@ provider "google" { ``` The name given in the block header (`"google"` in this example) is the -[local name](./provider-requirements.html#local-names) of the provider to +[local name](/docs/language/providers/requirements.html#local-names) of the provider to configure. This provider should already be included in a `required_providers` block. @@ -46,7 +46,7 @@ the provider. Most arguments in this section are defined by the provider itself; in this example both `project` and `region` are specific to the `google` provider. -You can use [expressions](/docs/configuration/expressions/index.html) in the values of these +You can use [expressions](/docs/language/expressions/index.html) in the values of these configuration arguments, but can only reference values that are known before the configuration is applied. This means you can safely reference input variables, but not attributes exported by resources (with an exception for resource @@ -68,7 +68,7 @@ and available for all `provider` blocks: - [`alias`, for using the same provider with different configurations for different resources][inpage-alias] - [`version`, which we no longer recommend][inpage-versions] (use - [provider requirements](./provider-requirements.html) instead) + [provider requirements](/docs/language/providers/requirements.html) instead) Unlike many other objects in the Terraform language, a `provider` block may be omitted if its contents would otherwise be empty. Terraform assumes an @@ -157,7 +157,7 @@ module "aws_vpc" { ``` Modules have some special requirements when passing in providers; see -[The Module `providers` Meta-Argument](/docs/configuration/meta-arguments/module-providers.html) +[The Module `providers` Meta-Argument](/docs/language/meta-arguments/module-providers.html) for more details. In most cases, only _root modules_ should define provider configurations, with all child modules obtaining their provider configurations from their parents. @@ -170,13 +170,13 @@ from their parents. The `version` meta-argument specifies a version constraint for a provider, and works the same way as the `version` argument in a -[`required_providers` block](./provider-requirements.html). The version +[`required_providers` block](/docs/language/providers/requirements.html). The version constraint in a provider configuration is only used if `required_providers` does not include one for that provider. **The `version` argument in provider configurations is deprecated.** In Terraform 0.13 and later, version constraints should always be declared in -[the `required_providers` block](./provider-requirements.html). The `version` +[the `required_providers` block](/docs/language/providers/requirements.html). The `version` argument will be removed in a future version of Terraform. -> **Note:** The `version` meta-argument made sense before Terraform 0.13, since diff --git a/website/docs/language/providers/index.html.md b/website/docs/language/providers/index.html.md index 287eb6539..f9c183bd5 100644 --- a/website/docs/language/providers/index.html.md +++ b/website/docs/language/providers/index.html.md @@ -13,8 +13,8 @@ configuration (like endpoint URLs or cloud regions) before they can be used. ## What Providers Do -Each provider adds a set of [resource types](/docs/configuration/blocks/resources/index.html) -and/or [data sources](/docs/configuration/data-sources.html) that Terraform can +Each provider adds a set of [resource types](/docs/language/resources/index.html) +and/or [data sources](/docs/language/data-sources/index.html) that Terraform can manage. Every resource type is implemented by a provider; without providers, Terraform @@ -38,13 +38,13 @@ providers for most major infrastructure platforms. To use resources from a given provider, you need to include some information about it in your configuration. See the following pages for details: -- [Provider Requirements](/docs/configuration/provider-requirements.html) +- [Provider Requirements](/docs/language/providers/requirements.html) documents how to declare providers so Terraform can install them. -- [Provider Configuration](/docs/configuration/providers.html) +- [Provider Configuration](/docs/language/providers/configuration.html) documents how to configure settings for providers. -- [Dependency Lock File](/docs/configuration/dependency-lock.html) +- [Dependency Lock File](/docs/language/dependency-lock.html) documents an additional HCL file that can be included with a configuration, which tells Terraform to always use a specific set of provider versions. @@ -64,7 +64,7 @@ about it in your configuration. See the following pages for details: To ensure Terraform always installs the same provider versions for a given configuration, you can use Terraform CLI to create a -[dependency lock file](/docs/configuration/dependency-lock.html) +[dependency lock file](/docs/language/dependency-lock.html) and commit it to version control along with your configuration. If a lock file is present, Terraform Cloud, CLI, and Enterprise will all obey it when installing providers. diff --git a/website/docs/language/providers/requirements.html.md b/website/docs/language/providers/requirements.html.md index 0845b1663..a1bf72874 100644 --- a/website/docs/language/providers/requirements.html.md +++ b/website/docs/language/providers/requirements.html.md @@ -17,7 +17,7 @@ configuration (like endpoint URLs or cloud regions) before they can be used. - This page documents how to declare providers so Terraform can install them. -- The [Provider Configuration](./providers.html) page documents how to configure +- The [Provider Configuration](/docs/language/providers/configuration.html) page documents how to configure settings for providers. ## Requiring Providers @@ -41,7 +41,7 @@ terraform { ``` The `required_providers` block must be nested inside the top-level -[`terraform` block](terraform.html) (which can also contain other settings). +[`terraform` block](/docs/language/settings/index.html) (which can also contain other settings). Each argument in the `required_providers` block enables one provider. The key determines the provider's [local name](#local-names) (its unique identifier @@ -78,7 +78,7 @@ Local names must be unique per-module. Outside of the `required_providers` block, Terraform configurations always refer to providers by their local names. For example, the following configuration declares `mycloud` as the local name for `mycorp/mycloud`, then uses that local -name when [configuring the provider](./providers.html): +name when [configuring the provider](/docs/language/providers/configuration.html): ```hcl terraform { @@ -208,7 +208,7 @@ avoiding typing. Each provider plugin has its own set of available versions, allowing the functionality of the provider to evolve over time. Each provider dependency you -declare should have a [version constraint](./version-constraints.html) given in +declare should have a [version constraint](/docs/language/expressions/version-constraints.html) given in the `version` argument so Terraform can select a single version per provider that all modules are compatible with. @@ -218,7 +218,7 @@ a version constraint for every provider your module depends on. To ensure Terraform always installs the same provider versions for a given configuration, you can use Terraform CLI to create a -[dependency lock file](/docs/configuration/dependency-lock.html) +[dependency lock file](/docs/language/dependency-lock.html) and commit it to version control along with your configuration. If a lock file is present, Terraform Cloud, CLI, and Enterprise will all obey it when installing providers. @@ -270,7 +270,7 @@ incompatibilities, and let the root module manage the maximum version. While most Terraform providers are distributed separately as plugins, there is currently one provider that is built in to Terraform itself, which provides -[the `terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html). +[the `terraform_remote_state` data source](/docs/language/state/remote-state-data.html). Because this provider is built in to Terraform, you don't need to declare it in the `required_providers` block in order to use its features. However, for diff --git a/website/docs/language/resources/behavior.html.md b/website/docs/language/resources/behavior.html.md index b565e0abf..70c0e2da7 100644 --- a/website/docs/language/resources/behavior.html.md +++ b/website/docs/language/resources/behavior.html.md @@ -18,7 +18,7 @@ match the configuration. When Terraform creates a new infrastructure object represented by a `resource` block, the identifier for that real object is saved in Terraform's -[state](/docs/state/index.html), allowing it to be updated and destroyed +[state](/docs/language/state/index.html), allowing it to be updated and destroyed in response to future changes. For resource blocks that already have an associated infrastructure object in the state, Terraform compares the actual configuration of the object with the arguments given in the @@ -42,7 +42,7 @@ customized on a per-resource basis. ## Accessing Resource Attributes -[Expressions](/docs/configuration/expressions/index.html) within a Terraform module can access +[Expressions](/docs/language/expressions/index.html) within a Terraform module can access information about resources in the same module, and you can use that information to help configure other resources. Use the `..` syntax to reference a resource attribute in an expression. @@ -52,7 +52,7 @@ read-only attributes with information obtained from the remote API; this often includes things that can't be known until the resource is created, like the resource's unique random ID. -Many providers also include [data sources](/docs/configuration/data-sources.html), +Many providers also include [data sources](/docs/language/data-sources/index.html), which are a special type of resource used only for looking up information. For a list of the attributes a resource or data source type provides, consult @@ -60,7 +60,7 @@ its documentation; these are generally included in a second list below its list of configurable arguments. For more information about referencing resource attributes in expressions, see -[Expressions: References to Resource Attributes](/docs/configuration/expressions/references.html#references-to-resource-attributes). +[Expressions: References to Resource Attributes](/docs/language/expressions/references.html#references-to-resource-attributes). ## Resource Dependencies @@ -73,7 +73,7 @@ resource's configuration just requires information generated by another resource. Most resource dependencies are handled automatically. Terraform analyses any -[expressions](/docs/configuration/expressions/index.html) within a `resource` block to find references +[expressions](/docs/language/expressions/index.html) within a `resource` block to find references to other objects, and treats those references as implicit ordering requirements when creating, updating, or destroying resources. Since most resources with behavioral dependencies on other resources also refer to those resources' data, @@ -84,7 +84,7 @@ example, if Terraform must manage access control policies _and_ take actions that require those policies to be present, there is a hidden dependency between the access policy and a resource whose creation depends on it. In these rare cases, -[the `depends_on` meta-argument](/docs/configuration/meta-arguments/depends_on.html) +[the `depends_on` meta-argument](/docs/language/meta-arguments/depends_on.html) can explicitly specify a dependency. ## Local-only Resources diff --git a/website/docs/language/resources/index.html.md b/website/docs/language/resources/index.html.md index 676741f0e..891202d34 100644 --- a/website/docs/language/resources/index.html.md +++ b/website/docs/language/resources/index.html.md @@ -12,22 +12,22 @@ Each resource block describes one or more infrastructure objects, such as virtual networks, compute instances, or higher-level components such as DNS records. -- [Resource Blocks](/docs/configuration/blocks/resources/syntax.html) documents +- [Resource Blocks](/docs/language/resources/syntax.html) documents the syntax for declaring resources. -- [Resource Behavior](/docs/configuration/blocks/resources/behavior.html) explains in +- [Resource Behavior](/docs/language/resources/behavior.html) explains in more detail how Terraform handles resource declarations when applying a configuration. - The Meta-Arguments section documents special arguments that can be used with every resource type, including - [`depends_on`](/docs/configuration/meta-arguments/depends_on.html), - [`count`](/docs/configuration/meta-arguments/count.html), - [`for_each`](/docs/configuration/meta-arguments/for_each.html), - [`provider`](/docs/configuration/meta-arguments/resource-provider.html), - and [`lifecycle`](/docs/configuration/meta-arguments/lifecycle.html). + [`depends_on`](/docs/language/meta-arguments/depends_on.html), + [`count`](/docs/language/meta-arguments/count.html), + [`for_each`](/docs/language/meta-arguments/for_each.html), + [`provider`](/docs/language/meta-arguments/resource-provider.html), + and [`lifecycle`](/docs/language/meta-arguments/lifecycle.html). -- [Provisioners](/docs/configuration/blocks/resources/provisioners/index.html) +- [Provisioners](/docs/language/resources/provisioners/index.html) documents configuring post-creation actions for a resource using the `provisioner` and `connection` blocks. Since provisioners are non-declarative and potentially unpredictable, we strongly recommend that you treat them as a diff --git a/website/docs/language/resources/provisioners/chef.html.md b/website/docs/language/resources/provisioners/chef.html.md index b8eeb7bf0..e420b9a38 100644 --- a/website/docs/language/resources/provisioners/chef.html.md +++ b/website/docs/language/resources/provisioners/chef.html.md @@ -10,7 +10,7 @@ description: |- The `chef` provisioner installs, configures and runs the Chef Client on a remote resource. The `chef` provisioner supports both `ssh` and `winrm` type -[connections](/docs/provisioners/connection.html). +[connections](/docs/language/resources/provisioners/connection.html). !> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](./). @@ -68,7 +68,7 @@ The following arguments are supported: * `attributes_json (string)` - (Optional) A raw JSON string with initial node attributes for the new node. These can also be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). + [the `file` function](/docs/language/functions/file.html). * `channel (string)` - (Optional) The Chef Client release channel to install from. If not set, the `stable` channel will be used. @@ -127,7 +127,7 @@ The following arguments are supported: * `prevent_sudo (boolean)` - (Optional) Prevent the use of the `sudo` command while installing, configuring and running the initial Chef Client run. This option is only used with `ssh` type - [connections](/docs/provisioners/connection.html). + [connections](/docs/language/resources/provisioners/connection.html). * `recreate_client (boolean)` - (Optional) If `true`, first delete any existing Chef Node and Client before registering the new Chef Client. @@ -145,7 +145,7 @@ The following arguments are supported: * `secret_key (string)` - (Optional) The contents of the secret key that is used by the Chef Client to decrypt data bags on the Chef Server. The key will be uploaded to the remote machine. This can also be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). + [the `file` function](/docs/language/functions/file.html). * `server_url (string)` - (Required) The URL to the Chef server. This includes the path to the organization. See the example. @@ -167,11 +167,11 @@ The following arguments are supported: * `user_key (string)` - (Required) The contents of the user key that will be used to authenticate with the Chef Server. This can also be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). + [the `file` function](/docs/language/functions/file.html). * `vault_json (string)` - (Optional) A raw JSON string with Chef Vaults and Items to which the new node should have access. These can also be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). + [the `file` function](/docs/language/functions/file.html). * `version (string)` - (Optional) The Chef Client version to install on the remote machine. If not set, the latest available version will be installed. diff --git a/website/docs/language/resources/provisioners/connection.html.md b/website/docs/language/resources/provisioners/connection.html.md index 52005876c..698ddfad7 100644 --- a/website/docs/language/resources/provisioners/connection.html.md +++ b/website/docs/language/resources/provisioners/connection.html.md @@ -108,12 +108,12 @@ block would create a dependency cycle. * `private_key` - The contents of an SSH key to use for the connection. These can be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). This takes + [the `file` function](/docs/language/functions/file.html). This takes preference over the password if provided. * `certificate` - The contents of a signed CA Certificate. The certificate argument must be used in conjunction with a `private_key`. These can - be loaded from a file on disk using the [the `file` function](/docs/configuration/functions/file.html). + be loaded from a file on disk using the [the `file` function](/docs/language/functions/file.html). * `agent` - Set to `false` to disable using `ssh-agent` to authenticate. On Windows the only supported SSH authentication agent is @@ -161,9 +161,9 @@ The `ssh` connection also supports the following fields to facilitate connnectio * `bastion_private_key` - The contents of an SSH key file to use for the bastion host. These can be loaded from a file on disk using - [the `file` function](/docs/configuration/functions/file.html). + [the `file` function](/docs/language/functions/file.html). Defaults to the value of the `private_key` field. * `bastion_certificate` - The contents of a signed CA Certificate. The certificate argument must be used in conjunction with a `bastion_private_key`. These can be loaded from - a file on disk using the [the `file` function](/docs/configuration/functions/file.html). + a file on disk using the [the `file` function](/docs/language/functions/file.html). diff --git a/website/docs/language/resources/provisioners/file.html.md b/website/docs/language/resources/provisioners/file.html.md index 1d6770a83..05b494e5b 100644 --- a/website/docs/language/resources/provisioners/file.html.md +++ b/website/docs/language/resources/provisioners/file.html.md @@ -10,7 +10,7 @@ description: |- The `file` provisioner is used to copy files or directories from the machine executing Terraform to the newly created resource. The `file` provisioner -supports both `ssh` and `winrm` type [connections](/docs/provisioners/connection.html). +supports both `ssh` and `winrm` type [connections](/docs/language/resources/provisioners/connection.html). -> **Note:** Provisioners should only be used as a last resort. For most common situations there are better alternatives. For more information, see diff --git a/website/docs/language/resources/provisioners/local-exec.html.md b/website/docs/language/resources/provisioners/local-exec.html.md index d28cbcffd..f0d463ea7 100644 --- a/website/docs/language/resources/provisioners/local-exec.html.md +++ b/website/docs/language/resources/provisioners/local-exec.html.md @@ -11,7 +11,7 @@ description: |- The `local-exec` provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource. See the `remote-exec` -[provisioner](/docs/provisioners/remote-exec.html) to run commands on the +[provisioner](/docs/language/resources/provisioners/remote-exec.html) to run commands on the resource. Note that even though the resource will be fully created when the provisioner is diff --git a/website/docs/language/resources/provisioners/null_resource.html.md b/website/docs/language/resources/provisioners/null_resource.html.md index 8ee6f62f9..7fb94a4e8 100644 --- a/website/docs/language/resources/provisioners/null_resource.html.md +++ b/website/docs/language/resources/provisioners/null_resource.html.md @@ -16,8 +16,8 @@ resource, you can associate them with a `null_resource`. Instances of [`null_resource`][null] are treated like normal resources, but they don't do anything. Like with any other resource, you can configure -[provisioners](/docs/provisioners/index.html) and [connection -details](/docs/provisioners/connection.html) on a `null_resource`. You can also +[provisioners](/docs/language/resources/provisioners/syntax.html) and [connection +details](/docs/language/resources/provisioners/connection.html) on a `null_resource`. You can also use its `triggers` argument and any meta-arguments to control exactly where in the dependency graph its provisioners will run. diff --git a/website/docs/language/resources/provisioners/puppet.html.md b/website/docs/language/resources/provisioners/puppet.html.md index d350c09a8..0e5005256 100644 --- a/website/docs/language/resources/provisioners/puppet.html.md +++ b/website/docs/language/resources/provisioners/puppet.html.md @@ -10,7 +10,7 @@ description: |- The `puppet` provisioner installs, configures and runs the Puppet agent on a remote resource. The `puppet` provisioner supports both `ssh` and `winrm` type -[connections](/docs/provisioners/connection.html). +[connections](/docs/language/resources/provisioners/connection.html). !> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](./). diff --git a/website/docs/language/resources/provisioners/remote-exec.html.md b/website/docs/language/resources/provisioners/remote-exec.html.md index 0d56343ce..7962cdd00 100644 --- a/website/docs/language/resources/provisioners/remote-exec.html.md +++ b/website/docs/language/resources/provisioners/remote-exec.html.md @@ -11,8 +11,8 @@ description: |- The `remote-exec` provisioner invokes a script on a remote resource after it is created. This can be used to run a configuration management tool, bootstrap into a cluster, etc. To invoke a local process, see the `local-exec` -[provisioner](/docs/provisioners/local-exec.html) instead. The `remote-exec` -provisioner supports both `ssh` and `winrm` type [connections](/docs/provisioners/connection.html). +[provisioner](/docs/language/resources/provisioners/local-exec.html) instead. The `remote-exec` +provisioner supports both `ssh` and `winrm` type [connections](/docs/language/resources/provisioners/connection.html). -> **Note:** Provisioners should only be used as a last resort. For most common situations there are better alternatives. For more information, see @@ -53,7 +53,7 @@ The following arguments are supported: You cannot pass any arguments to scripts using the `script` or `scripts` arguments to this provisioner. If you want to specify arguments, upload the script with the -[file provisioner](/docs/provisioners/file.html) +[file provisioner](/docs/language/resources/provisioners/file.html) and then use `inline` to call it. Example: ```hcl diff --git a/website/docs/language/resources/provisioners/salt-masterless.html.md b/website/docs/language/resources/provisioners/salt-masterless.html.md index e1e895c35..6cdb4f326 100644 --- a/website/docs/language/resources/provisioners/salt-masterless.html.md +++ b/website/docs/language/resources/provisioners/salt-masterless.html.md @@ -11,7 +11,7 @@ description: |- Type: `salt-masterless` The `salt-masterless` Terraform provisioner provisions machines built by Terraform -using [Salt](http://saltstack.com/) states, without connecting to a Salt master. The `salt-masterless` provisioner supports `ssh` [connections](/docs/provisioners/connection.html). +using [Salt](http://saltstack.com/) states, without connecting to a Salt master. The `salt-masterless` provisioner supports `ssh` [connections](/docs/language/resources/provisioners/connection.html). !> **Note:** This provisioner was removed in the 0.15.0 version of Terraform after being deprecated as of Terraform 0.13.4. For most common situations there are better alternatives to using provisioners. For more information, see [the main Provisioners page](./). diff --git a/website/docs/language/resources/provisioners/syntax.html.md b/website/docs/language/resources/provisioners/syntax.html.md index d2d277fdf..3a8eb95eb 100644 --- a/website/docs/language/resources/provisioners/syntax.html.md +++ b/website/docs/language/resources/provisioners/syntax.html.md @@ -194,8 +194,8 @@ block would create a dependency cycle. ## Suppressing Provisioner Logs in CLI Output The configuration for a `provisioner` block may use sensitive values, such as -[`sensitive` variables](/docs/configuration/variables.html#suppressing-values-in-cli-output) or -[`sensitive` output values](/docs/configuration/outputs.html#sensitive-suppressing-values-in-cli-output). +[`sensitive` variables](/docs/language/values/variables.html#suppressing-values-in-cli-output) or +[`sensitive` output values](/docs/language/values/outputs.html#sensitive-suppressing-values-in-cli-output). In this case, all log output from the provisioner is automatically suppressed to prevent the sensitive values from being displayed. diff --git a/website/docs/language/resources/syntax.html.md b/website/docs/language/resources/syntax.html.md index 84dc7b2b3..02c6c08e2 100644 --- a/website/docs/language/resources/syntax.html.md +++ b/website/docs/language/resources/syntax.html.md @@ -55,7 +55,7 @@ attributes the resource supports. ### Providers -Each resource type is implemented by a [provider](/docs/configuration/provider-requirements.html), +Each resource type is implemented by a [provider](/docs/language/providers/requirements.html), which is a plugin for Terraform that offers a collection of resource types. A provider usually provides resources to manage a single cloud or on-premises infrastructure platform. Providers are distributed separately from Terraform @@ -68,16 +68,16 @@ access their remote APIs, and the root module must provide that configuration. For more information, see: -- [Provider Requirements](/docs/configuration/provider-requirements.html), for declaring which +- [Provider Requirements](/docs/language/providers/requirements.html), for declaring which providers a module uses. -- [Provider Configuration](/docs/configuration/providers.html), for configuring provider settings. +- [Provider Configuration](/docs/language/providers/configuration.html), for configuring provider settings. Terraform usually automatically determines which provider to use based on a resource type's name. (By convention, resource type names start with their provider's preferred local name.) When using multiple configurations of a provider (or non-preferred local provider names), you must use the `provider` meta-argument to manually choose an alternate provider configuration. See -[the `provider` meta-argument](/docs/configuration/meta-arguments/resource-provider.html) for more details. +[the `provider` meta-argument](/docs/language/meta-arguments/resource-provider.html) for more details. ### Resource Arguments @@ -86,7 +86,7 @@ selected resource type. The resource type's documentation lists which arguments are available and how their values should be formatted. The values for resource arguments can make full use of -[expressions](/docs/configuration/expressions/index.html) and other dynamic Terraform +[expressions](/docs/language/expressions/index.html) and other dynamic Terraform language features. There are also some _meta-arguments_ that are defined by Terraform itself @@ -119,7 +119,7 @@ data, since it is not available on the Terraform Registry.) For more information about how Terraform manages resources when applying a configuration, see -[Resource Behavior](/docs/configuration/blocks/resources/behavior.html). +[Resource Behavior](/docs/language/resources/behavior.html). ## Meta-Arguments @@ -128,12 +128,12 @@ any resource type to change the behavior of resources. The following meta-arguments are documented on separate pages: -- [`depends_on`, for specifying hidden dependencies](/docs/configuration/meta-arguments/depends_on.html) -- [`count`, for creating multiple resource instances according to a count](/docs/configuration/meta-arguments/count.html) -- [`for_each`, to create multiple instances according to a map, or set of strings](/docs/configuration/meta-arguments/for_each.html) -- [`provider`, for selecting a non-default provider configuration](/docs/configuration/meta-arguments/resource-provider.html) -- [`lifecycle`, for lifecycle customizations](/docs/configuration/meta-arguments/lifecycle.html) -- [`provisioner` and `connection`, for taking extra actions after resource creation](/docs/configuration/blocks/resources/provisioners/index.html) +- [`depends_on`, for specifying hidden dependencies](/docs/language/meta-arguments/depends_on.html) +- [`count`, for creating multiple resource instances according to a count](/docs/language/meta-arguments/count.html) +- [`for_each`, to create multiple instances according to a map, or set of strings](/docs/language/meta-arguments/for_each.html) +- [`provider`, for selecting a non-default provider configuration](/docs/language/meta-arguments/resource-provider.html) +- [`lifecycle`, for lifecycle customizations](/docs/language/meta-arguments/lifecycle.html) +- [`provisioner` and `connection`, for taking extra actions after resource creation](/docs/language/resources/provisioners/index.html) ## Operation Timeouts diff --git a/website/docs/language/settings/backends/configuration.html.md b/website/docs/language/settings/backends/configuration.html.md index 9a45ffae0..6aa596cb3 100644 --- a/website/docs/language/settings/backends/configuration.html.md +++ b/website/docs/language/settings/backends/configuration.html.md @@ -7,7 +7,7 @@ page_title: "Backend Configuration - Configuration Language" Each Terraform configuration can specify a backend, which defines exactly where -and how operations are performed, where [state](/docs/state/index.html) +and how operations are performed, where [state](/docs/language/state/index.html) snapshots are stored, etc. Most non-trivial Terraform configurations configure a remote backend so that multiple people can work with the same infrastructure. @@ -150,7 +150,7 @@ the reinitialization process, Terraform will ask if you'd like to migrate your existing state to the new configuration. This allows you to easily switch from one backend to another. -If you're using multiple [workspaces](/docs/state/workspaces.html), +If you're using multiple [workspaces](/docs/language/state/workspaces.html), Terraform can copy all workspaces to the destination. If Terraform detects you have multiple workspaces, it will ask if this is what you want to do. diff --git a/website/docs/language/settings/backends/consul.html.md b/website/docs/language/settings/backends/consul.html.md index be7cd665a..82e16a613 100644 --- a/website/docs/language/settings/backends/consul.html.md +++ b/website/docs/language/settings/backends/consul.html.md @@ -12,7 +12,7 @@ description: |- Stores the state in the [Consul](https://www.consul.io/) KV store at a given path. -This backend supports [state locking](/docs/state/locking.html). +This backend supports [state locking](/docs/language/state/locking.html). ## Example Configuration diff --git a/website/docs/language/settings/backends/cos.html.md b/website/docs/language/settings/backends/cos.html.md index 0a0173eee..cef18670c 100644 --- a/website/docs/language/settings/backends/cos.html.md +++ b/website/docs/language/settings/backends/cos.html.md @@ -11,7 +11,7 @@ description: |- **Kind: Standard (with locking)** Stores the state as an object in a configurable prefix in a given bucket on [Tencent Cloud Object Storage](https://intl.cloud.tencent.com/product/cos) (COS). -This backend also supports [state locking](/docs/state/locking.html). +This backend also supports [state locking](/docs/language/state/locking.html). ~> **Warning!** It is highly recommended that you enable [Object Versioning](https://intl.cloud.tencent.com/document/product/436/19883) on the COS bucket to allow for state recovery in the case of accidental deletions and human error. @@ -33,7 +33,7 @@ Terraform state will be written into the file `terraform/state/terraform.tfstate ## Data Source Configuration -To make use of the COS remote state in another configuration, use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html). +To make use of the COS remote state in another configuration, use the [`terraform_remote_state` data source](/docs/language/state/remote-state-data.html). ```hcl data "terraform_remote_state" "foo" { diff --git a/website/docs/language/settings/backends/etcdv3.html.md b/website/docs/language/settings/backends/etcdv3.html.md index 5b8558995..b7a10c658 100644 --- a/website/docs/language/settings/backends/etcdv3.html.md +++ b/website/docs/language/settings/backends/etcdv3.html.md @@ -12,7 +12,7 @@ description: |- Stores the state in the [etcd](https://coreos.com/etcd/) KV store with a given prefix. -This backend supports [state locking](/docs/state/locking.html). +This backend supports [state locking](/docs/language/state/locking.html). ## Example Configuration diff --git a/website/docs/language/settings/backends/gcs.html.md b/website/docs/language/settings/backends/gcs.html.md index b449f46a3..1d869579e 100644 --- a/website/docs/language/settings/backends/gcs.html.md +++ b/website/docs/language/settings/backends/gcs.html.md @@ -11,7 +11,7 @@ description: |- **Kind: Standard (with locking)** Stores the state as an object in a configurable prefix in a pre-existing bucket on [Google Cloud Storage](https://cloud.google.com/storage/) (GCS). -This backend also supports [state locking](/docs/state/locking.html). The bucket must exist prior to configuring the backend. +This backend also supports [state locking](/docs/language/state/locking.html). The bucket must exist prior to configuring the backend. ~> **Warning!** It is highly recommended that you enable [Object Versioning](https://cloud.google.com/storage/docs/object-versioning) diff --git a/website/docs/language/settings/backends/index.html.md b/website/docs/language/settings/backends/index.html.md index 834337ef4..b7d708c8a 100644 --- a/website/docs/language/settings/backends/index.html.md +++ b/website/docs/language/settings/backends/index.html.md @@ -6,13 +6,13 @@ page_title: "Backend Overview - Configuration Language" # Backends Each Terraform configuration can specify a backend, which defines where -and how operations are performed, where [state](/docs/state/index.html) +and how operations are performed, where [state](/docs/language/state/index.html) snapshots are stored, etc. The rest of this page introduces the concept of backends; the other pages in this section document how to configure and use backends. -- [Backend Configuration](/docs/configuration/backend.html) documents the form +- [Backend Configuration](/docs/language/settings/backends/configuration.html) documents the form of a `backend` block, which selects and configures a backend for a Terraform configuration. - This section also includes a page for each of Terraform's built-in backends, @@ -58,7 +58,7 @@ There are two areas of Terraform's behavior that are determined by the backend: ### State -Terraform uses persistent [state](/docs/state/index.html) data to keep track of +Terraform uses persistent [state](/docs/language/state/index.html) data to keep track of the resources it manages. Since it needs the state in order to know which real-world infrastructure objects correspond to the resources in a configuration, everyone working with a given collection of infrastructure diff --git a/website/docs/language/settings/backends/oss.html.md b/website/docs/language/settings/backends/oss.html.md index bcf6e42e4..6acc16af1 100644 --- a/website/docs/language/settings/backends/oss.html.md +++ b/website/docs/language/settings/backends/oss.html.md @@ -43,7 +43,7 @@ Terraform state will be written into the file `path/mystate/version-1.tfstate`. To make use of the OSS remote state in another configuration, use the [`terraform_remote_state` data -source](/docs/providers/terraform/d/remote_state.html). +source](/docs/language/state/remote-state-data.html). ```hcl terraform { diff --git a/website/docs/language/settings/backends/pg.html.md b/website/docs/language/settings/backends/pg.html.md index 1b9ee0c3c..b0edcf3ea 100644 --- a/website/docs/language/settings/backends/pg.html.md +++ b/website/docs/language/settings/backends/pg.html.md @@ -12,7 +12,7 @@ description: |- Stores the state in a [Postgres database](https://www.postgresql.org) version 9.5 or newer. -This backend supports [state locking](/docs/state/locking.html). +This backend supports [state locking](/docs/language/state/locking.html). ## Example Configuration @@ -54,7 +54,7 @@ terraform init -backend-config="conn_str=postgres://localhost/terraform_backend? ## Data Source Configuration -To make use of the pg remote state in another configuration, use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html). +To make use of the pg remote state in another configuration, use the [`terraform_remote_state` data source](/docs/language/state/remote-state-data.html). ```hcl data "terraform_remote_state" "network" { @@ -81,7 +81,7 @@ Postgres version 9.5 or newer is required to support advisory locks and the "ON This backend creates one table **states** in the automatically-managed Postgres schema configured by the `schema_name` variable. -The table is keyed by the [workspace](/docs/state/workspaces.html) name. If workspaces are not in use, the name `default` is used. +The table is keyed by the [workspace](/docs/language/state/workspaces.html) name. If workspaces are not in use, the name `default` is used. Locking is supported using [Postgres advisory locks](https://www.postgresql.org/docs/9.5/explicit-locking.html#ADVISORY-LOCKS). [`force-unlock`](https://www.terraform.io/docs/commands/force-unlock.html) is not supported, because these database-native locks will automatically unlock when the session is aborted or the connection fails. To see outstanding locks in a Postgres server, use the [`pg_locks` system view](https://www.postgresql.org/docs/9.5/view-pg-locks.html). diff --git a/website/docs/language/settings/backends/remote.html.md b/website/docs/language/settings/backends/remote.html.md index 275cf6e71..6f2e78b05 100644 --- a/website/docs/language/settings/backends/remote.html.md +++ b/website/docs/language/settings/backends/remote.html.md @@ -59,7 +59,7 @@ determines which mode it uses: all of the desired remote workspace names. For example, set `prefix = "networking-"` to use Terraform cloud workspaces with names like `networking-dev` and `networking-prod`. This is helpful when - mapping multiple Terraform CLI [workspaces](../../state/workspaces.html) + mapping multiple Terraform CLI [workspaces](/docs/language/state/workspaces.html) used in a single Terraform configuration to multiple Terraform Cloud workspaces. @@ -70,7 +70,7 @@ the Terraform CLI workspace `prod` within the current configuration. Remote Terraform operations such as `plan` and `apply` executed against that Terraform CLI workspace will be executed in the Terraform Cloud workspace `networking-prod`. -Additionally, the [`${terraform.workspace}`](../../state/workspaces.html#current-workspace-interpolation) +Additionally, the [`${terraform.workspace}`](/docs/language/state/workspaces.html#current-workspace-interpolation) interpolation sequence should be removed from Terraform configurations that run remote operations against Terraform Cloud workspaces. The reason for this is that each Terraform Cloud workspace currently only uses the single `default` Terraform diff --git a/website/docs/language/settings/backends/s3.html.md b/website/docs/language/settings/backends/s3.html.md index 7579e96f4..a34a9bc89 100644 --- a/website/docs/language/settings/backends/s3.html.md +++ b/website/docs/language/settings/backends/s3.html.md @@ -107,7 +107,7 @@ This is seen in the following AWS IAM Statement: To make use of the S3 remote state in another configuration, use the [`terraform_remote_state` data -source](/docs/providers/terraform/d/remote_state.html). +source](/docs/language/state/remote-state-data.html). ```hcl data "terraform_remote_state" "network" { @@ -182,7 +182,7 @@ The following configuration is optional: The following configuration is required: * `bucket` - (Required) Name of the S3 Bucket. -* `key` - (Required) Path to the state file inside the S3 Bucket. When using a non-default [workspace](/docs/state/workspaces.html), the state path will be `/workspace_key_prefix/workspace_name/key` (see also the `workspace_key_prefix` configuration). +* `key` - (Required) Path to the state file inside the S3 Bucket. When using a non-default [workspace](/docs/language/state/workspaces.html), the state path will be `/workspace_key_prefix/workspace_name/key` (see also the `workspace_key_prefix` configuration). The following configuration is optional: @@ -214,7 +214,7 @@ The S3 backend can be used in a number of different ways that make different tradeoffs between convenience, security, and isolation in such an organization. This section describes one such approach that aims to find a good compromise between these tradeoffs, allowing use of -[Terraform's workspaces feature](/docs/state/workspaces.html) to switch +[Terraform's workspaces feature](/docs/language/state/workspaces.html) to switch conveniently between multiple isolated deployments of the same configuration. Use this section as a starting-point for your approach, but note that @@ -320,7 +320,7 @@ provider "aws" { If workspace IAM roles are centrally managed and shared across many separate Terraform configurations, the role ARNs could also be obtained via a data -source such as [`terraform_remote_state`](/docs/providers/terraform/d/remote_state.html) +source such as [`terraform_remote_state`](/docs/language/state/remote-state-data.html) to avoid repeating these values. ### Creating and Selecting Workspaces diff --git a/website/docs/language/settings/backends/swift.html.md b/website/docs/language/settings/backends/swift.html.md index 35d77b7ce..895e46109 100644 --- a/website/docs/language/settings/backends/swift.html.md +++ b/website/docs/language/settings/backends/swift.html.md @@ -12,7 +12,7 @@ description: |- Stores the state as an artifact in [Swift](http://docs.openstack.org/developer/swift/latest/). -~> Warning! It is highly recommended that you enable [Object Versioning](https://docs.openstack.org/developer/swift/latest/overview_object_versioning.html) by setting the [`archive_container`](https://www.terraform.io/docs/backends/types/swift.html#archive_container) configuration. This allows for state recovery in the case of accidental deletions and human error. +~> Warning! It is highly recommended that you enable [Object Versioning](https://docs.openstack.org/developer/swift/latest/overview_object_versioning.html) by setting the [`archive_container`](https://www.terraform.io/docs/language/settings/backends/swift.html#archive_container) configuration. This allows for state recovery in the case of accidental deletions and human error. ## Example Configuration diff --git a/website/docs/language/settings/index.html.md b/website/docs/language/settings/index.html.md index 1094899f3..c9a79a865 100644 --- a/website/docs/language/settings/index.html.md +++ b/website/docs/language/settings/index.html.md @@ -36,18 +36,18 @@ following sections. The nested `backend` block configures which backend Terraform should use. The syntax and behavior of the `backend` block is described in [Backend -Configuration](./backend.html). +Configuration](/docs/language/settings/backends/configuration.html). ## Specifying a Required Terraform Version The `required_version` setting accepts a [version constraint -string,](./version-constraints.html) which specifies which versions of Terraform +string,](/docs/language/expressions/version-constraints.html) which specifies which versions of Terraform can be used with your configuration. If the running version of Terraform doesn't match the constraints specified, Terraform will produce an error and exit without taking any further actions. -When you use [child modules](/docs/configuration/blocks/modules/index.html), each module can specify its own +When you use [child modules](/docs/language/modules/index.html), each module can specify its own version requirements. The requirements of all modules in the tree must be satisfied. @@ -58,7 +58,7 @@ a minimum Terraform version that has behavior expected by the configuration. The `required_version` setting applies only to the version of Terraform CLI. Terraform's resource types are implemented by provider plugins, whose release cycles are independent of Terraform CLI and of each other. -Use [the `required_providers` block](./provider-requirements.html) to manage +Use [the `required_providers` block](/docs/language/providers/requirements.html) to manage the expected versions for each provider you use. ## Specifying Provider Requirements @@ -80,7 +80,7 @@ terraform { } ``` -For more information, see [Provider Requirements](./provider-requirements.html). +For more information, see [Provider Requirements](/docs/language/providers/requirements.html). ## Experimental Language Features diff --git a/website/docs/language/state/backends.html.md b/website/docs/language/state/backends.html.md index 0f40c757c..c6db804b4 100644 --- a/website/docs/language/state/backends.html.md +++ b/website/docs/language/state/backends.html.md @@ -9,7 +9,7 @@ description: |- # State Storage and Locking Backends are responsible for storing state and providing an API for -[state locking](/docs/state/locking.html). State locking is optional. +[state locking](/docs/language/state/locking.html). State locking is optional. Despite the state being stored remotely, all Terraform commands such as `terraform console`, the `terraform state` operations, `terraform taint`, @@ -64,10 +64,10 @@ prior to forcing the overwrite. ## State Locking -Backends are responsible for supporting [state locking](/docs/state/locking.html) +Backends are responsible for supporting [state locking](/docs/language/state/locking.html) if possible. Not all backend types support state locking. In the [list of supported backend types](/docs/backends/types/index.html) we explicitly note whether locking is supported. For more information on state locking, view the -[page dedicated to state locking](/docs/state/locking.html). +[page dedicated to state locking](/docs/language/state/locking.html). diff --git a/website/docs/language/state/index.html.md b/website/docs/language/state/index.html.md index 7e7d2a5e5..f14444a0d 100644 --- a/website/docs/language/state/index.html.md +++ b/website/docs/language/state/index.html.md @@ -29,7 +29,7 @@ resource instance, and then potentially update or delete that object in response to future configuration changes. For more information on why Terraform requires state and why Terraform cannot -function without state, please see the page [state purpose](/docs/state/purpose.html). +function without state, please see the page [state purpose](/docs/language/state/purpose.html). ## Inspection and Modification diff --git a/website/docs/language/state/purpose.html.md b/website/docs/language/state/purpose.html.md index 4182e9a81..44bfef6d1 100644 --- a/website/docs/language/state/purpose.html.md +++ b/website/docs/language/state/purpose.html.md @@ -105,7 +105,7 @@ started, but when using Terraform in a team it is important for everyone to be working with the same state so that operations will be applied to the same remote objects. -[Remote state](/docs/state/remote.html) is the recommended solution +[Remote state](/docs/language/state/remote.html) is the recommended solution to this problem. With a fully-featured state backend, Terraform can use remote locking as a measure to avoid two or more different users accidentally running Terraform at the same time, and thus ensure that each Terraform run diff --git a/website/docs/language/state/remote-state-data.html.md b/website/docs/language/state/remote-state-data.html.md index cba263823..e49f484dc 100644 --- a/website/docs/language/state/remote-state-data.html.md +++ b/website/docs/language/state/remote-state-data.html.md @@ -18,7 +18,7 @@ This data source is built into Terraform, and is always available; you do not need to require or configure a provider in order to use it. -> **Note:** This data source is implemented by a built-in provider, whose -[source address](/docs/configuration/provider-requirements.html#source-addresses) +[source address](/docs/language/providers/requirements.html#source-addresses) is `terraform.io/builtin/terraform`. That provider does not include any other resources or data sources. @@ -81,14 +81,14 @@ or the Some of the data stores listed above are specifically designed for storing small configuration values, while others are generic blob storage systems. For those generic systems, you can use -[the `jsonencode` function](https://www.terraform.io/docs/configuration/functions/jsonencode.html) +[the `jsonencode` function](https://www.terraform.io/docs/language/functions/jsonencode.html) and -[the `jsondecode` function](https://www.terraform.io/docs/configuration/functions/jsondecode.html) respectively +[the `jsondecode` function](https://www.terraform.io/docs/language/functions/jsondecode.html) respectively to store and retrieve structured data. You can encapsulate the implementation details of retrieving your published configuration data by writing a -[data-only module](/docs/modules/composition.html#data-only-modules) +[data-only module](/docs/language/modules/develop/composition.html#data-only-modules) containing the necessary data source configuration and any necessary post-processing such as JSON decoding. You can then change that module later if you switch to a different strategy for sharing data between multiple @@ -172,8 +172,8 @@ The following arguments are supported: In addition to the above, the following attributes are exported: * (v0.12+) `outputs` - An object containing every root-level - [output](/docs/configuration/outputs.html) in the remote state. -* (<= v0.11) `` - Each root-level [output](/docs/configuration/outputs.html) + [output](/docs/language/values/outputs.html) in the remote state. +* (<= v0.11) `` - Each root-level [output](/docs/language/values/outputs.html) in the remote state appears as a top level attribute on the data source. ## Root Outputs Only diff --git a/website/docs/language/state/remote.html.md b/website/docs/language/state/remote.html.md index 743e630b6..e1e899eac 100644 --- a/website/docs/language/state/remote.html.md +++ b/website/docs/language/state/remote.html.md @@ -25,7 +25,7 @@ in your configuration's root module. ## Delegation and Teamwork Remote state allows you to share -[output values](/docs/configuration/outputs.html) with other configurations. +[output values](/docs/language/values/outputs.html) with other configurations. This allows your infrastructure to be decomposed into smaller components. Put another way, remote state also allows teams to share infrastructure @@ -39,7 +39,7 @@ you can expose things such as VPC IDs, subnets, NAT instance IDs, etc. through remote state and have other Terraform states consume that. For example usage, see -[the `terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html). +[the `terraform_remote_state` data source](/docs/language/state/remote-state-data.html). While remote state can be a convenient, built-in mechanism for sharing data between configurations, you may prefer to use more general stores to @@ -53,7 +53,7 @@ another that consumes those values using ## Locking and Teamwork For fully-featured remote backends, Terraform can also use -[state locking](/docs/state/locking.html) to prevent concurrent runs of +[state locking](/docs/language/state/locking.html) to prevent concurrent runs of Terraform against the same state. [Terraform Cloud by HashiCorp](https://www.hashicorp.com/products/terraform/) diff --git a/website/docs/language/state/sensitive-data.html.md b/website/docs/language/state/sensitive-data.html.md index ac2061b6a..49f5c1270 100644 --- a/website/docs/language/state/sensitive-data.html.md +++ b/website/docs/language/state/sensitive-data.html.md @@ -15,7 +15,7 @@ passwords. When using local state, state is stored in plain-text JSON files. -When using [remote state](/docs/state/remote.html), state is only ever held in +When using [remote state](/docs/language/state/remote.html), state is only ever held in memory when used by Terraform. It may be encrypted at rest, but this depends on the specific remote state backend. diff --git a/website/docs/language/state/workspaces.html.md b/website/docs/language/state/workspaces.html.md index 1bca724e1..9a1a7f9e3 100644 --- a/website/docs/language/state/workspaces.html.md +++ b/website/docs/language/state/workspaces.html.md @@ -10,7 +10,7 @@ description: |- Each Terraform configuration has an associated [backend](/docs/backends/index.html) that defines how operations are executed and where persistent data such as -[the Terraform state](https://www.terraform.io/docs/state/purpose.html) are +[the Terraform state](https://www.terraform.io/docs/language/state/purpose.html) are stored. The persistent data stored in the backend belongs to a _workspace_. Initially @@ -25,16 +25,16 @@ credentials. Multiple workspaces are currently supported by the following backends: - * [AzureRM](/docs/backends/types/azurerm.html) - * [Consul](/docs/backends/types/consul.html) - * [COS](/docs/backends/types/cos.html) - * [GCS](/docs/backends/types/gcs.html) - * [Kubernetes](/docs/backends/types/kubernetes.html) - * [Local](/docs/backends/types/local.html) - * [Manta](/docs/backends/types/manta.html) - * [Postgres](/docs/backends/types/pg.html) - * [Remote](/docs/backends/types/remote.html) - * [S3](/docs/backends/types/s3.html) + * [AzureRM](/docs/language/settings/backends/azurerm.html) + * [Consul](/docs/language/settings/backends/consul.html) + * [COS](/docs/language/settings/backends/cos.html) + * [GCS](/docs/language/settings/backends/gcs.html) + * [Kubernetes](/docs/language/settings/backends/kubernetes.html) + * [Local](/docs/language/settings/backends/local.html) + * [Manta](/docs/language/settings/backends/manta.html) + * [Postgres](/docs/language/settings/backends/pg.html) + * [Remote](/docs/language/settings/backends/remote.html) + * [S3](/docs/language/settings/backends/s3.html) In the 0.9 line of Terraform releases, this concept was known as "environment". It was renamed in 0.10 based on feedback about confusion caused by the @@ -81,7 +81,7 @@ Within your Terraform configuration, you may include the name of the current workspace using the `${terraform.workspace}` interpolation sequence. This can be used anywhere interpolations are allowed. However, it should **not** be used in remote operations against Terraform Cloud workspaces. For an -explanation, see the [remote backend](../backends/types/remote.html#workspaces) +explanation, see the [remote backend](/docs/language/settings/backends/remote.html#workspaces) document. Referencing the current workspace is useful for changing behavior based @@ -146,7 +146,7 @@ In this case, the backend used for each deployment often belongs to that deployment, with different credentials and access controls. Named workspaces are _not_ a suitable isolation mechanism for this scenario. -Instead, use one or more [re-usable modules](/docs/modules/index.html) to +Instead, use one or more [re-usable modules](/docs/language/modules/develop/index.html) to represent the common elements, and then represent each instance as a separate configuration that instantiates those common elements in the context of a different backend. In that case, the root module of each configuration will @@ -176,7 +176,7 @@ another using paired resources types and data sources. For example: * If a Terraform state for one configuration is stored in a remote backend that is accessible to other configurations then - [`terraform_remote_state`](/docs/providers/terraform/d/remote_state.html) + [`terraform_remote_state`](/docs/language/state/remote-state-data.html) can be used to directly consume its root module outputs from those other configurations. This creates a tighter coupling between configurations, but avoids the need for the "producer" configuration to explicitly @@ -194,9 +194,9 @@ local-only `terraform.tfstate`; some teams commit these files to version control, although using a remote backend instead is recommended when there are multiple collaborators. -For [remote state](/docs/state/remote.html), the workspaces are stored +For [remote state](/docs/language/state/remote.html), the workspaces are stored directly in the configured [backend](/docs/backends/). For example, if you -use [Consul](/docs/backends/types/consul.html), the workspaces are stored +use [Consul](/docs/language/settings/backends/consul.html), the workspaces are stored by appending the workspace name to the state path. To ensure that workspace names are stored correctly and safely in all backends, the name must be valid to use in a URL path segment without escaping. diff --git a/website/docs/language/syntax/configuration.html.md b/website/docs/language/syntax/configuration.html.md index 2b85a7851..e8c38d51c 100644 --- a/website/docs/language/syntax/configuration.html.md +++ b/website/docs/language/syntax/configuration.html.md @@ -18,7 +18,7 @@ those constructs are built from. This page describes the _native syntax_ of the Terraform language, which is a rich language designed to be relatively easy for humans to read and write. The constructs in the Terraform language can also be expressed in -[JSON syntax](./syntax-json.html), which is harder for humans +[JSON syntax](/docs/language/syntax/json.html), which is harder for humans to read and edit but easier to generate and parse programmatically. This low-level syntax of the Terraform language is defined in terms of a @@ -49,7 +49,7 @@ after the equals sign is the argument's value. The context where the argument appears determines what value types are valid (for example, each resource type has a schema that defines the types of its arguments), but many arguments accept arbitrary -[expressions](/docs/configuration/expressions/index.html), which allow the value to +[expressions](/docs/language/expressions/index.html), which allow the value to either be specified literally or generated from other values programmatically. -> **Note:** Terraform's configuration language is based on a more general diff --git a/website/docs/language/syntax/index.html.md b/website/docs/language/syntax/index.html.md index 80a599c66..cdca545ee 100644 --- a/website/docs/language/syntax/index.html.md +++ b/website/docs/language/syntax/index.html.md @@ -9,13 +9,13 @@ The majority of the Terraform language documentation focuses on the practical uses of the language and the specific constructs it uses. The pages in this section offer a more abstract view of the Terraform language. -- [Configuration Syntax](/docs/configuration/syntax.html) describes the native +- [Configuration Syntax](/docs/language/syntax/configuration.html) describes the native grammar of the Terraform language. -- [JSON Configuration Syntax](/docs/configuration/syntax-json.html) documents +- [JSON Configuration Syntax](/docs/language/syntax/json.html) documents how to represent Terraform language constructs in the pure JSON variant of the Terraform language. Terraform's JSON syntax is unfriendly to humans, but can be very useful when generating infrastructure as code with other systems that don't have a readily available HCL library. -- [Style Conventions](/docs/configuration/style.html) documents some commonly +- [Style Conventions](/docs/language/syntax/style.html) documents some commonly accepted formatting guidelines for Terraform code. These conventions can be enforced automatically with [`terraform fmt`](/docs/commands/fmt.html). diff --git a/website/docs/language/syntax/json.html.md b/website/docs/language/syntax/json.html.md index d3e12215b..393e2840b 100644 --- a/website/docs/language/syntax/json.html.md +++ b/website/docs/language/syntax/json.html.md @@ -10,7 +10,7 @@ description: |- # JSON Configuration Syntax Most Terraform configurations are written in -[the native Terraform language syntax](./syntax.html), which is designed to be +[the native Terraform language syntax](/docs/language/syntax/configuration.html), which is designed to be relatively easy for humans to read and update. Terraform also supports an alternative syntax that is JSON-compatible. This @@ -94,7 +94,7 @@ different (see the [block-type-specific exceptions](#block-type-specific-excepti correspond either to argument names or to nested block type names. * Where a property corresponds to an argument that accepts - [arbitrary expressions](/docs/configuration/expressions/index.html) in the native syntax, the + [arbitrary expressions](/docs/language/expressions/index.html) in the native syntax, the property value is mapped to an expression as described under [_Expression Mapping_](#expression-mapping) below. For arguments that do _not_ accept arbitrary expressions, the interpretation of the property @@ -111,7 +111,7 @@ different (see the [block-type-specific exceptions](#block-type-specific-excepti ## Expression Mapping Since JSON grammar is not able to represent all of the Terraform language -[expression syntax](/docs/configuration/expressions/index.html), JSON values interpreted as expressions +[expression syntax](/docs/language/expressions/index.html), JSON values interpreted as expressions are mapped as follows: | JSON | Terraform Language Interpretation | @@ -123,7 +123,7 @@ are mapped as follows: | Array | Each element is mapped per this table, producing a `tuple(...)` value with suitable element types. | | Null | A literal `null`. | -[string template]: /docs/configuration/expressions/strings.html#string-templates +[string template]: /docs/language/expressions/strings.html#string-templates When a JSON string is encountered in a location where arbitrary expressions are expected, its value is first parsed as a [string template][] diff --git a/website/docs/language/values/index.html.md b/website/docs/language/values/index.html.md index fb800fb70..e73972c41 100644 --- a/website/docs/language/values/index.html.md +++ b/website/docs/language/values/index.html.md @@ -8,11 +8,11 @@ page_title: "Variables and Outputs" The Terraform language includes a few kinds of blocks for requesting or publishing named values. -- [Input Variables](/docs/configuration/variables.html) serve as parameters for +- [Input Variables](/docs/language/values/variables.html) serve as parameters for a Terraform module, so users can customize behavior without editing the source. -- [Output Values](/docs/configuration/outputs.html) are like return values for a +- [Output Values](/docs/language/values/outputs.html) are like return values for a Terraform module. -- [Local Values](/docs/configuration/locals.html) are a convenience feature for +- [Local Values](/docs/language/values/locals.html) are a convenience feature for assigning a short name to an expression. diff --git a/website/docs/language/values/locals.html.md b/website/docs/language/values/locals.html.md index 40d0d6b7d..ad755b264 100644 --- a/website/docs/language/values/locals.html.md +++ b/website/docs/language/values/locals.html.md @@ -13,7 +13,7 @@ description: |- Locals](https://learn.hashicorp.com/tutorials/terraform/locals?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. -A local value assigns a name to an [expression](/docs/configuration/expressions/index.html), +A local value assigns a name to an [expression](/docs/language/expressions/index.html), so you can use it multiple times within a module without repeating it. @@ -61,7 +61,7 @@ locals { ## Using Local Values Once a local value is declared, you can reference it in -[expressions](/docs/configuration/expressions/index.html) as `local.`. +[expressions](/docs/language/expressions/index.html) as `local.`. -> **Note:** Local values are _created_ by a `locals` block (plural), but you _reference_ them as attributes on an object named `local` (singular). Make sure diff --git a/website/docs/language/values/outputs.html.md b/website/docs/language/values/outputs.html.md index 3d8a8eece..60450f83d 100644 --- a/website/docs/language/values/outputs.html.md +++ b/website/docs/language/values/outputs.html.md @@ -19,9 +19,9 @@ uses: to a parent module. - A root module can use outputs to print certain values in the CLI output after running `terraform apply`. -- When using [remote state](/docs/state/remote.html), root module outputs can be +- When using [remote state](/docs/language/state/remote.html), root module outputs can be accessed by other configurations via a - [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html). + [`terraform_remote_state` data source](/docs/language/state/remote-state-data.html). Resource instances managed by Terraform each export attributes whose values can be used elsewhere in configuration. Output values are a way to expose some @@ -42,11 +42,11 @@ output "instance_ip_addr" { ``` The label immediately after the `output` keyword is the name, which must be a -valid [identifier](./syntax.html#identifiers). In a root module, this name is +valid [identifier](/docs/language/syntax/configuration.html#identifiers). In a root module, this name is displayed to the user; in a child module, it can be used to access the output's value. -The `value` argument takes an [expression](/docs/configuration/expressions/index.html) +The `value` argument takes an [expression](/docs/language/expressions/index.html) whose result is to be returned to the user. In this example, the expression refers to the `private_ip` attribute exposed by an `aws_instance` resource defined elsewhere in this module (not shown). Any valid expression is allowed @@ -151,9 +151,9 @@ Changes to Outputs: -> **Note:** In Terraform versions prior to Terraform 0.14, setting an output value in the root module as sensitive would prevent Terraform from showing its value in the list of outputs at the end of `terraform apply`. However, the value could still display in the CLI output for other reasons, like if the value is referenced in an expression for a resource argument. Sensitive output values are still recorded in the -[state](/docs/state/index.html), and so will be visible to anyone who is able +[state](/docs/language/state/index.html), and so will be visible to anyone who is able to access the state data. For more information, see -[_Sensitive Data in State_](/docs/state/sensitive-data.html). +[_Sensitive Data in State_](/docs/language/state/sensitive-data.html). @@ -169,7 +169,7 @@ correctly determine the dependencies between resources defined in different modules. Just as with -[resource dependencies](/docs/configuration/blocks/resources/behavior.html#resource-dependencies), +[resource dependencies](/docs/language/resources/behavior.html#resource-dependencies), Terraform analyzes the `value` expression for an output value and automatically determines a set of dependencies, but in less-common cases there are dependencies that cannot be recognized implicitly. In these rare cases, the diff --git a/website/docs/language/values/variables.html.md b/website/docs/language/values/variables.html.md index bd6d32caf..75f6b4780 100644 --- a/website/docs/language/values/variables.html.md +++ b/website/docs/language/values/variables.html.md @@ -17,7 +17,7 @@ and allowing modules to be shared between different configurations. When you declare variables in the root module of your configuration, you can set their values using CLI options and environment variables. -When you declare them in [child modules](/docs/configuration/blocks/modules/index.html), +When you declare them in [child modules](/docs/language/modules/index.html), the calling module should pass values in the `module` block. If you're familiar with traditional programming languages, it can be useful to @@ -32,7 +32,7 @@ compare Terraform modules to function definitions: variable is being discussed. Other kinds of variables in Terraform include _environment variables_ (set by the shell where Terraform runs) and _expression variables_ (used to indirectly represent a value in an -[expression](/docs/configuration/expressions/index.html)). +[expression](/docs/language/expressions/index.html)). ## Declaring an Input Variable @@ -70,11 +70,11 @@ be unique among all variables in the same module. This name is used to assign a value to the variable from outside and to reference the variable's value from within the module. -The name of a variable can be any valid [identifier](./syntax.html#identifiers) +The name of a variable can be any valid [identifier](/docs/language/syntax/configuration.html#identifiers) _except_ the following: `source`, `version`, `providers`, `count`, `for_each`, `lifecycle`, `depends_on`, `locals`. These names are reserved for meta-arguments in -[module configuration blocks](/docs/configuration/blocks/modules/syntax.html), and cannot be +[module configuration blocks](/docs/language/modules/syntax.html), and cannot be declared as variable names. ## Arguments @@ -102,7 +102,7 @@ configuration. [inpage-type]: #type-constraints The `type` argument in a `variable` block allows you to restrict the -[type of value](/docs/configuration/expressions/types.html) that will be accepted as +[type of value](/docs/language/expressions/types.html) that will be accepted as the value for a variable. If no type constraint is set then a value of any type is accepted. @@ -129,7 +129,7 @@ collections: The keyword `any` may be used to indicate that any type is acceptable. For more information on the meaning and behavior of these different types, as well as detailed information about automatic conversion of complex types, see -[Type Constraints](./types.html). +[Type Constraints](/docs/language/expressions/types.html). If both the `type` and `default` arguments are specified, the given default value must be convertible to the specified type. @@ -183,7 +183,7 @@ The expression can refer only to the variable that the condition applies to, and _must not_ produce errors. If the failure of an expression is the basis of the validation decision, use -[the `can` function](./functions/can.html) to detect such errors. For example: +[the `can` function](/docs/language/functions/can.html) to detect such errors. For example: ```hcl variable "image_id" { @@ -213,7 +213,7 @@ using a sentence structure similar to the above examples. Setting a variable as `sensitive` prevents Terraform from showing its value in the `plan` or `apply` output, when that variable is used within a configuration. -Sensitive values are still recorded in the [state](/docs/state/index.html), and so will be visible to anyone who is able to access the state data. For more information, see [_Sensitive Data in State_](/docs/state/sensitive-data.html). +Sensitive values are still recorded in the [state](/docs/language/state/index.html), and so will be visible to anyone who is able to access the state data. For more information, see [_Sensitive Data in State_](/docs/language/state/sensitive-data.html). A provider can define [an attribute as sensitive](/docs/extend/best-practices/sensitive-state.html#using-the-sensitive-flag), which prevents the value of that attribute from being displayed in logs or regular output. The `sensitive` argument on variables allows users to replicate this behavior for values in their configuration, by defining a variable as `sensitive`. @@ -300,7 +300,7 @@ random_pet.animal: Creation complete after 0s [id=jae-known-mongoose] ## Using Input Variable Values Within the module that declared a variable, its value can be accessed from -within [expressions](/docs/configuration/expressions/index.html) as `var.`, +within [expressions](/docs/language/expressions/index.html) as `var.`, where `` matches the label given in the declaration block: -> **Note:** Input variables are _created_ by a `variable` block, but you @@ -330,7 +330,7 @@ can be set in a number of ways: The following sections describe these options in more detail. This section does not apply to _child_ modules, where values for input variables are instead assigned in the configuration of their parent module, as described in -[_Modules_](/docs/configuration/blocks/modules/index.html). +[_Modules_](/docs/language/modules/index.html). ### Variables on the Command Line @@ -413,7 +413,7 @@ and lower case letters as in the above example. When variable values are provided in a variable definitions file, you can use Terraform's usual syntax for -[literal expressions](/docs/configuration/expressions/types.html#literal-expressions) +[literal expressions](/docs/language/expressions/types.html#literal-expressions) to assign complex-typed values, like lists and maps. Some special rules apply to the `-var` command line option and to environment diff --git a/website/docs/plugins/basics.html.md b/website/docs/plugins/basics.html.md index 16cdc4b4b..926977262 100644 --- a/website/docs/plugins/basics.html.md +++ b/website/docs/plugins/basics.html.md @@ -42,7 +42,7 @@ directory, located at `%APPDATA%\terraform.d\plugins` on Windows and For more information, see: -- [Configuring Providers](/docs/configuration/providers.html) +- [Configuring Providers](/docs/language/providers/configuration.html) For developer-centric documentation, see: diff --git a/website/docs/providers/terraform/index.html.markdown b/website/docs/providers/terraform/index.html.markdown index 99a3e561e..e3843c915 100644 --- a/website/docs/providers/terraform/index.html.markdown +++ b/website/docs/providers/terraform/index.html.markdown @@ -9,14 +9,14 @@ description: |- # The Built-In `terraform` Provider Terraform includes one built-in data source: -[`terraform_remote_state`](/docs/providers/terraform/d/remote_state.html), which +[`terraform_remote_state`](/docs/language/state/remote-state-data.html), which provides access to root module outputs from some other Terraform configuration. This data source is implemented by a built-in provider, whose -[source address](/docs/configuration/provider-requirements.html#source-addresses) +[source address](/docs/language/providers/requirements.html#source-addresses) is `terraform.io/builtin/terraform`. You do not need to require or configure this provider in order to use the `terraform_remote_state` data source; it is always available. The `terraform_remote_state` data source is -[documented in the Terraform Language docs](/docs/providers/terraform/d/remote_state.html). +[documented in the Terraform Language docs](/docs/language/state/remote-state-data.html). diff --git a/website/docs/state/environments.html.md b/website/docs/state/environments.html.md index 1d340b8cb..18acf5633 100644 --- a/website/docs/state/environments.html.md +++ b/website/docs/state/environments.html.md @@ -17,4 +17,4 @@ caused confusion due to other uses of the word "environment", both within Terraform itself and within organizations using Terraform. As of 0.10, the preferred term is "workspace". For more information on -workspaces, see [the main Workspaces page](/docs/state/workspaces.html). +workspaces, see [the main Workspaces page](/docs/language/state/workspaces.html). diff --git a/website/guides/core-workflow.html.md b/website/guides/core-workflow.html.md index f60ffb110..e307728e4 100644 --- a/website/guides/core-workflow.html.md +++ b/website/guides/core-workflow.html.md @@ -235,7 +235,7 @@ for a better experience at each step. Terraform Cloud provides a centralized and secure location for storing input variables and state while also bringing back a tight feedback loop for speculative plans for config authors. Terraform configuration interacts with -Terraform Cloud via the ["remote" backend](/docs/backends/types/remote.html). +Terraform Cloud via the ["remote" backend](/docs/language/settings/backends/remote.html). ``` terraform { diff --git a/website/layouts/language.erb b/website/layouts/language.erb index 0bf51c257..f6c5145cb 100644 --- a/website/layouts/language.erb +++ b/website/layouts/language.erb @@ -1050,7 +1050,7 @@
  • - Provisioners + Provisioners
  • diff --git a/website/upgrade-guides/0-10.html.markdown b/website/upgrade-guides/0-10.html.markdown index 063e6e47c..a2a755f2f 100644 --- a/website/upgrade-guides/0-10.html.markdown +++ b/website/upgrade-guides/0-10.html.markdown @@ -37,7 +37,7 @@ In the short term, it just means a smaller distribution package and thus avoiding the need to download tens of providers that may never be used. Provider plugins are now also versioned separately from Terraform itself. -[Version constraints](/docs/configuration/providers.html#provider-versions) +[Version constraints](/docs/language/providers/configuration.html#provider-versions) can be specified in configuration to ensure that new major releases (which may have breaking changes) are not automatically installed. @@ -48,7 +48,7 @@ step after a Terraform configuration is cloned from version control, and will also install any necessary modules and configure any remote backend. **Action:** For "production" configurations, consider adding -[provider version constraints](/docs/configuration/providers.html#provider-versions), +[provider version constraints](/docs/language/providers/configuration.html#provider-versions), as suggested by the `terraform init` output, to prevent new major versions of plugins from being automatically installed in future. diff --git a/website/upgrade-guides/0-11.html.markdown b/website/upgrade-guides/0-11.html.markdown index 4d7b0d26b..1e8ce006b 100644 --- a/website/upgrade-guides/0-11.html.markdown +++ b/website/upgrade-guides/0-11.html.markdown @@ -260,7 +260,7 @@ resource "aws_vpc" "example" { ``` After the above refactoring, run `terraform apply` to re-synchoronize -Terraform's record (in [the Terraform state](/docs/state/index.html)) of the +Terraform's record (in [the Terraform state](/docs/language/state/index.html)) of the location of each resource's provider configuration. This should make no changes to actual infrastructure, since no resource configurations were changed. diff --git a/website/upgrade-guides/0-12.html.markdown b/website/upgrade-guides/0-12.html.markdown index ff85ad148..e165bc54d 100644 --- a/website/upgrade-guides/0-12.html.markdown +++ b/website/upgrade-guides/0-12.html.markdown @@ -448,7 +448,7 @@ in retrospect it was an obvious consequence of how the compatibility mechanism was implemented. If you have expressions in your modules that produce a list of strings by using list brackets with a mixture of string and list-of-string sub-expressions, you will need to rewrite this to explicitly use -[the `flatten` function](/docs/configuration/functions/flatten.html) +[the `flatten` function](/docs/language/functions/flatten.html) to make the special treatment more obvious to the reader: ```hcl @@ -519,7 +519,7 @@ even though it was then generally inconvenient to work with those values elsewhere in the module due to limitations of the index syntax, `element` function, and `lookup` function. -Terraform now allows various [type constraints](/docs/configuration/types.html) +Terraform now allows various [type constraints](/docs/language/expressions/type-constraints.html) to be specified, as part of the language's new type system and generalized functions and operators. However, because lists and maps of non-string values were not officially supported in 0.11, existing configurations do not have @@ -557,7 +557,7 @@ child/child.tf:1,1-19: element 0: string required. ``` To fix this, change the `type` argument from `list(string)` or `map(string)` -to a more appropriate [type constraint](/docs/configuration/types.html). +to a more appropriate [type constraint](/docs/language/expressions/type-constraints.html). If you're not sure what type constraint to use yet, another option is to use the type constraint `any`, which will effectively disable validation and diff --git a/website/upgrade-guides/0-13.html.markdown b/website/upgrade-guides/0-13.html.markdown index 59f28336f..b763f6733 100644 --- a/website/upgrade-guides/0-13.html.markdown +++ b/website/upgrade-guides/0-13.html.markdown @@ -129,13 +129,13 @@ because it will generate the recommended explicit source addresses for providers in the "hashicorp" namespace. For more information on declaring provider dependencies, see -[Provider Requirements](/docs/configuration/provider-requirements.html). +[Provider Requirements](/docs/language/providers/requirements.html). That page also includes some guidance on how to write provider dependencies for a module that must remain compatible with both Terraform v0.12 and Terraform v0.13; the `terraform 0.13upgrade` result includes a conservative version constraint for Terraform v0.13 or later, which you can weaken to `>= 0.12.26` if you follow the guidelines in -[v0.12-Compatible Provider Requirements](/docs/configuration/provider-requirements.html#v0-12-compatible-provider-requirements). +[v0.12-Compatible Provider Requirements](/docs/language/providers/requirements.html#v0-12-compatible-provider-requirements). Each module must declare its own set of provider requirements, so if you have a configuration which calls other modules then you'll need to run this upgrade @@ -408,7 +408,7 @@ The provisioner's `connection` configuration can refer to that value via `self`, whereas referring directly to `aws_instance.example.private_ip` in that context is forbidden. -[Provisioners are a last resort](/docs/provisioners/#provisioners-are-a-last-resort), +[Provisioners are a last resort](/docs/language/resources/provisioners/syntax.html#provisioners-are-a-last-resort), so we recommend avoiding both create-time and destroy-time provisioners wherever possible. Other options for destroy-time actions include using `systemd` to run commands within your virtual machines during shutdown or using virtual diff --git a/website/upgrade-guides/0-14.html.markdown b/website/upgrade-guides/0-14.html.markdown index 3ae8a236d..b27ebcf3b 100644 --- a/website/upgrade-guides/0-14.html.markdown +++ b/website/upgrade-guides/0-14.html.markdown @@ -31,7 +31,7 @@ the previous upgrade guides for any considerations that may be relevant to you. In particular, Terraform v0.14 no longer includes the `terraform 0.13upgrade` command for automatically inserting -[provider requirements](/docs/configuration/provider-requirements.html) +[provider requirements](/docs/language/providers/requirements.html) into existing modules, and the automatic mechanisms to upgrade legacy provider references in the Terraform state. You will need to successfully complete a `terraform apply` at least once under Terraform v0.13 before upgrading an @@ -83,7 +83,7 @@ represented in files that can be included in a version control system and code review process. To better meet that goal, Terraform v0.14 introduces a new -[dependency lock file](/docs/configuration/dependency-lock.html), +[dependency lock file](/docs/language/dependency-lock.html), which Terraform will generate automatically after running `terraform init` in the same directory as your configuration's root module. This file includes the specific version numbers selected for each provider, and also includes @@ -322,8 +322,8 @@ instead of the actual value. Terraform v0.14 introduces a more extensive version of that behavior where Terraform will track when you write an expression whose result is derived from a -[sensitive input variable](/docs/configuration/outputs.html#sensitive-suppressing-values-in-cli-output) or -[sensitive output value](/docs/configuration/variables.html#suppressing-values-in-cli-output), +[sensitive input variable](/docs/language/values/outputs.html#sensitive-suppressing-values-in-cli-output) or +[sensitive output value](/docs/language/values/variables.html#suppressing-values-in-cli-output), and so after upgrading to Terraform v0.14 you may find that more values are obscured in the Terraform plan output than would have been in Terraform v0.13. diff --git a/website/upgrade-guides/0-7.html.markdown b/website/upgrade-guides/0-7.html.markdown index a2c170373..cec4dbc1b 100644 --- a/website/upgrade-guides/0-7.html.markdown +++ b/website/upgrade-guides/0-7.html.markdown @@ -101,7 +101,7 @@ For most users, this change will not affect your day-to-day usage of Terraform. ## Migrating to Data Sources -With the addition of [Data Sources](/docs/configuration/data-sources.html), there are several resources that were acting as Data Sources that are now deprecated. Existing configurations will continue to work, but will print a deprecation warning when a data source is used as a resource. +With the addition of [Data Sources](/docs/language/data-sources/index.html), there are several resources that were acting as Data Sources that are now deprecated. Existing configurations will continue to work, but will print a deprecation warning when a data source is used as a resource. * `atlas_artifact` * `template_file` diff --git a/website/upgrade-guides/0-9.html.markdown b/website/upgrade-guides/0-9.html.markdown index 617b04bda..f863ff8e0 100644 --- a/website/upgrade-guides/0-9.html.markdown +++ b/website/upgrade-guides/0-9.html.markdown @@ -49,7 +49,7 @@ terraform { **Action:** Nothing immediately, everything will continue working except scripts using `terraform remote config`. -As soon as possible, [upgrade to backends](/docs/configuration/blocks/backends/index.html). +As soon as possible, [upgrade to backends](/docs/language/settings/backends/index.html). ## State Locking