website: Change absolute 0.11 -> 0.11 links to relative
This commit is contained in:
parent
2c50808bbb
commit
58289e2d90
|
@ -17,9 +17,9 @@ in Terraform configuration. Use of data sources allows a Terraform
|
||||||
configuration to build on information defined outside of Terraform,
|
configuration to build on information defined outside of Terraform,
|
||||||
or defined by another separate Terraform configuration.
|
or defined by another separate Terraform configuration.
|
||||||
|
|
||||||
[Providers](/docs/configuration/providers.html) are responsible in
|
[Providers](./providers.html) are responsible in
|
||||||
Terraform for defining and implementing data sources. Whereas
|
Terraform for defining and implementing data sources. Whereas
|
||||||
a [resource](/docs/configuration/resources.html) causes Terraform
|
a [resource](./resources.html) causes Terraform
|
||||||
to create and manage a new infrastructure component, data sources
|
to create and manage a new infrastructure component, data sources
|
||||||
present read-only views into pre-existing data, or they compute
|
present read-only views into pre-existing data, or they compute
|
||||||
new values on the fly within Terraform itself.
|
new values on the fly within Terraform itself.
|
||||||
|
@ -33,7 +33,7 @@ on longest-prefix matching. For example the `aws_ami`
|
||||||
data source would map to the `aws` provider (if that exists).
|
data source would map to the `aws` provider (if that exists).
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -80,11 +80,11 @@ resource "aws_instance" "web" {
|
||||||
|
|
||||||
### Meta-parameters
|
### Meta-parameters
|
||||||
|
|
||||||
As data sources are essentially a read only subset of resources they also support the same [meta-parameters](https://www.terraform.io/docs/configuration/resources.html#meta-parameters) of resources except for the [`lifecycle` configuration block](https://www.terraform.io/docs/configuration/resources.html#lifecycle).
|
As data sources are essentially a read only subset of resources they also support the same [meta-parameters](./resources.html#meta-parameters) of resources except for the [`lifecycle` configuration block](./resources.html#lifecycle).
|
||||||
|
|
||||||
## Multiple Provider Instances
|
## Multiple Provider Instances
|
||||||
|
|
||||||
Similarly to [resources](/docs/configuration/resources.html), the
|
Similarly to [resources](./resources.html), the
|
||||||
`provider` meta-parameter can be used where a configuration has
|
`provider` meta-parameter can be used where a configuration has
|
||||||
multiple aliased instances of the same provider:
|
multiple aliased instances of the same provider:
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ data "aws_ami" "web" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
See the ["Multiple Provider Instances"](/docs/configuration/resources.html#multiple-provider-instances) documentation for resources
|
See the ["Multiple Provider Instances"](./resources.html#multiple-provider-instances) documentation for resources
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
## Data Source Lifecycle
|
## Data Source Lifecycle
|
||||||
|
|
|
@ -67,7 +67,7 @@ export TF_VAR_alist='[1,2,3]'
|
||||||
export TF_VAR_amap='{ foo = "bar", baz = "qux" }'
|
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](./variables.html).
|
||||||
|
|
||||||
## TF_CLI_ARGS and TF_CLI_ARGS_name
|
## TF_CLI_ARGS and TF_CLI_ARGS_name
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ syntax to get a list of all the attributes: `${aws_instance.web.*.id}`.
|
||||||
|
|
||||||
#### Attributes of a data source
|
#### Attributes of a data source
|
||||||
|
|
||||||
The syntax is `data.TYPE.NAME.ATTRIBUTE`. For example. `${data.aws_ami.ubuntu.id}` will interpolate the `id` attribute from the `aws_ami` [data source](/docs/configuration/data-sources.html) named `ubuntu`. If the data source has a `count`
|
The syntax is `data.TYPE.NAME.ATTRIBUTE`. For example. `${data.aws_ami.ubuntu.id}` will interpolate the `id` attribute from the `aws_ami` [data source](./data-sources.html) named `ubuntu`. If the data source has a `count`
|
||||||
attribute set, you can access individual attributes with a zero-based
|
attribute set, you can access individual attributes with a zero-based
|
||||||
index, such as `${data.aws_subnet.example.0.cidr_block}`. You can also use the splat
|
index, such as `${data.aws_subnet.example.0.cidr_block}`. You can also use the splat
|
||||||
syntax to get a list of all the attributes: `${data.aws_subnet.example.*.cidr_block}`.
|
syntax to get a list of all the attributes: `${data.aws_subnet.example.*.cidr_block}`.
|
||||||
|
@ -84,7 +84,7 @@ interpolate the `bar` output from the `foo`
|
||||||
The syntax is `count.FIELD`. For example, `${count.index}` will
|
The syntax is `count.FIELD`. For example, `${count.index}` will
|
||||||
interpolate the current index in a multi-count resource. For more
|
interpolate the current index in a multi-count resource. For more
|
||||||
information on `count`, see the [resource configuration
|
information on `count`, see the [resource configuration
|
||||||
page](/docs/configuration/resources.html).
|
page](./resources.html).
|
||||||
|
|
||||||
#### Path information
|
#### Path information
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ The supported built-in functions are:
|
||||||
|
|
||||||
* `timestamp()` - Returns a UTC timestamp string in RFC 3339 format. This string will change with every
|
* `timestamp()` - Returns a UTC timestamp string in RFC 3339 format. This string will change with every
|
||||||
invocation of the function, so in order to prevent diffs on every plan & apply, it must be used with the
|
invocation of the function, so in order to prevent diffs on every plan & apply, it must be used with the
|
||||||
[`ignore_changes`](/docs/configuration/resources.html#ignore-changes) lifecycle attribute.
|
[`ignore_changes`](./resources.html#ignore-changes) lifecycle attribute.
|
||||||
|
|
||||||
* `timeadd(time, duration)` - Returns a UTC timestamp string corresponding to adding a given `duration` to `time` in RFC 3339 format.
|
* `timeadd(time, duration)` - Returns a UTC timestamp string corresponding to adding a given `duration` to `time` in RFC 3339 format.
|
||||||
For example, `timeadd("2017-11-22T00:00:00Z", "10m")` produces a value `"2017-11-22T00:10:00Z"`.
|
For example, `timeadd("2017-11-22T00:00:00Z", "10m")` produces a value `"2017-11-22T00:10:00Z"`.
|
||||||
|
@ -424,7 +424,7 @@ The supported built-in functions are:
|
||||||
|
|
||||||
* `urlencode(string)` - Returns an URL-safe copy of the string.
|
* `urlencode(string)` - Returns an URL-safe copy of the string.
|
||||||
|
|
||||||
* `uuid()` - Returns a random UUID string. This string will change with every invocation of the function, so in order to prevent diffs on every plan & apply, it must be used with the [`ignore_changes`](/docs/configuration/resources.html#ignore-changes) lifecycle attribute.
|
* `uuid()` - Returns a random UUID string. This string will change with every invocation of the function, so in order to prevent diffs on every plan & apply, it must be used with the [`ignore_changes`](./resources.html#ignore-changes) lifecycle attribute.
|
||||||
|
|
||||||
* `values(map)` - Returns a list of the map values, in the order of the keys
|
* `values(map)` - Returns a list of the map values, in the order of the keys
|
||||||
returned by the `keys` function. This function only works on flat maps and
|
returned by the `keys` function. This function only works on flat maps and
|
||||||
|
@ -441,7 +441,7 @@ The supported built-in functions are:
|
||||||
|
|
||||||
Long strings can be managed using templates.
|
Long strings can be managed using templates.
|
||||||
[Templates](/docs/providers/template/index.html) are
|
[Templates](/docs/providers/template/index.html) are
|
||||||
[data-sources](/docs/configuration/data-sources.html) defined by a
|
[data-sources](./data-sources.html) defined by a
|
||||||
filename and some variables to use during interpolation. They have a
|
filename and some variables to use during interpolation. They have a
|
||||||
computed `rendered` attribute containing the result.
|
computed `rendered` attribute containing the result.
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Otherwise, the files are ignored. Multiple file formats can
|
||||||
be present in the same directory; it is okay to have one Terraform
|
be present in the same directory; it is okay to have one Terraform
|
||||||
configuration file be Terraform syntax and another be JSON.
|
configuration file be Terraform syntax and another be JSON.
|
||||||
|
|
||||||
[Override](/docs/configuration/override.html)
|
[Override](./override.html)
|
||||||
files are the exception, as they're loaded after all non-override
|
files are the exception, as they're loaded after all non-override
|
||||||
files, in alphabetical order.
|
files, in alphabetical order.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ The configuration within the loaded files are appended to each
|
||||||
other. This is in contrast to being merged. This means that two
|
other. This is in contrast to being merged. This means that two
|
||||||
resources with the same name are not merged, and will instead
|
resources with the same name are not merged, and will instead
|
||||||
cause a validation error. This is in contrast to
|
cause a validation error. This is in contrast to
|
||||||
[overrides](/docs/configuration/override.html),
|
[overrides](./override.html),
|
||||||
which do merge.
|
which do merge.
|
||||||
|
|
||||||
The order of variables, resources, etc. defined within the
|
The order of variables, resources, etc. defined within the
|
||||||
|
|
|
@ -22,7 +22,7 @@ if [variables](./variables.html) are analogous to function arguments and
|
||||||
_local values_ are comparable to a function's local variables.
|
_local values_ are comparable to a function's local variables.
|
||||||
|
|
||||||
This page assumes you're already familiar with
|
This page assumes you're already familiar with
|
||||||
[the configuration syntax](/docs/configuration/syntax.html).
|
[the configuration syntax](./syntax.html).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ the dedicated
|
||||||
[modules section](/docs/modules/index.html).
|
[modules section](/docs/modules/index.html).
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -41,7 +41,7 @@ module on the command line. It has no meaning outside of a particular
|
||||||
Terraform configuration.
|
Terraform configuration.
|
||||||
|
|
||||||
Within the block body is the configuration for the module. All attributes
|
Within the block body is the configuration for the module. All attributes
|
||||||
within the block must correspond to [variables](/docs/configuration/variables.html)
|
within the block must correspond to [variables](./variables.html)
|
||||||
within the module, with the exception of the following which Terraform
|
within the module, with the exception of the following which Terraform
|
||||||
treats as special:
|
treats as special:
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ Most resources have attributes associated with them, and
|
||||||
outputs are a way to easily extract and query that information.
|
outputs are a way to easily extract and query that information.
|
||||||
|
|
||||||
This page assumes you are familiar with the
|
This page assumes you are familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
|
@ -13,7 +13,7 @@ and later, see
|
||||||
[Configuration Language: Providers](../configuration/providers.html).
|
[Configuration Language: Providers](../configuration/providers.html).
|
||||||
|
|
||||||
Providers are responsible in Terraform for managing the lifecycle
|
Providers are responsible in Terraform for managing the lifecycle
|
||||||
of a [resource](/docs/configuration/resources.html): create,
|
of a [resource](./resources.html): create,
|
||||||
read, update, delete.
|
read, update, delete.
|
||||||
|
|
||||||
Most providers require some sort of configuration to provide
|
Most providers require some sort of configuration to provide
|
||||||
|
@ -26,7 +26,7 @@ the start of the resource name. For example, a resource of type
|
||||||
`vsphere_virtual_machine` is associated with a provider called `vsphere`.
|
`vsphere_virtual_machine` is associated with a provider called `vsphere`.
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -194,7 +194,7 @@ child module, as described in
|
||||||
|
|
||||||
## Interpolation
|
## Interpolation
|
||||||
|
|
||||||
Provider configurations may use [interpolation syntax](/docs/configuration/interpolation.html)
|
Provider configurations may use [interpolation syntax](./interpolation.html)
|
||||||
to allow dynamic configuration:
|
to allow dynamic configuration:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
@ -212,9 +212,9 @@ almost all operations within Terraform, and so it is not possible to use
|
||||||
expressions whose value cannot be known until after configuration is applied,
|
expressions whose value cannot be known until after configuration is applied,
|
||||||
such as the id of a resource.
|
such as the id of a resource.
|
||||||
|
|
||||||
It is always valid to use [input variables](/docs/configuration/variables.html)
|
It is always valid to use [input variables](./variables.html)
|
||||||
and [data sources](/docs/configuration/data-sources.html) whose configurations
|
and [data sources](./data-sources.html) whose configurations
|
||||||
do not in turn depend on as-yet-unknown values. [Local values](/docs/configuration/locals.html)
|
do not in turn depend on as-yet-unknown values. [Local values](./locals.html)
|
||||||
may also be used, but currently may cause errors when running `terraform destroy`.
|
may also be used, but currently may cause errors when running `terraform destroy`.
|
||||||
|
|
||||||
## Third-party Plugins
|
## Third-party Plugins
|
||||||
|
|
|
@ -20,7 +20,7 @@ component such as an email provider, DNS record, or database
|
||||||
provider.
|
provider.
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -135,7 +135,7 @@ resource is created. During a destroy operation, Terraform ensures that
|
||||||
this resource is destroyed before its dependencies.
|
this resource is destroyed before its dependencies.
|
||||||
|
|
||||||
A resource automatically depends on anything it references via
|
A resource automatically depends on anything it references via
|
||||||
[interpolations](/docs/configuration/interpolation.html). The automatically
|
[interpolations](./interpolation.html). The automatically
|
||||||
determined dependencies are all that is needed most of the time. You can also
|
determined dependencies are all that is needed most of the time. You can also
|
||||||
use the `depends_on` parameter to explicitly define a list of additional
|
use the `depends_on` parameter to explicitly define a list of additional
|
||||||
dependencies.
|
dependencies.
|
||||||
|
@ -207,8 +207,8 @@ When declaring multiple instances of a resource using [`count`](#count), it is
|
||||||
common to want each instance to have a different value for a given attribute.
|
common to want each instance to have a different value for a given attribute.
|
||||||
|
|
||||||
You can use the `${count.index}`
|
You can use the `${count.index}`
|
||||||
[interpolation](/docs/configuration/interpolation.html) along with a map
|
[interpolation](./interpolation.html) along with a map
|
||||||
[variable](/docs/configuration/variables.html) to accomplish this.
|
[variable](./variables.html) to accomplish this.
|
||||||
|
|
||||||
For example, here's how you could create three [AWS
|
For example, here's how you could create three [AWS
|
||||||
Instances](/docs/providers/aws/r/instance.html) each with their own
|
Instances](/docs/providers/aws/r/instance.html) each with their own
|
||||||
|
@ -283,7 +283,7 @@ resource "aws_instance" "foo" {
|
||||||
|
|
||||||
The value of the field should be `TYPE` or `TYPE.ALIAS`. The `ALIAS` value
|
The value of the field should be `TYPE` or `TYPE.ALIAS`. The `ALIAS` value
|
||||||
comes from the `alias` field value when configuring the
|
comes from the `alias` field value when configuring the
|
||||||
[provider](/docs/configuration/providers.html).
|
[provider](./providers.html).
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
|
|
|
@ -60,7 +60,7 @@ Basic bullet point reference:
|
||||||
|
|
||||||
* Strings can interpolate other values using syntax wrapped
|
* Strings can interpolate other values using syntax wrapped
|
||||||
in `${}`, such as `${var.foo}`. The full syntax for interpolation
|
in `${}`, such as `${var.foo}`. The full syntax for interpolation
|
||||||
is [documented here](/docs/configuration/interpolation.html).
|
is [documented here](./interpolation.html).
|
||||||
|
|
||||||
* Multiline strings can use shell-style "here doc" syntax, with
|
* Multiline strings can use shell-style "here doc" syntax, with
|
||||||
the string starting with a marker like `<<EOF` and then the
|
the string starting with a marker like `<<EOF` and then the
|
||||||
|
|
|
@ -18,7 +18,7 @@ The [`terraform push` command](/docs/commands/push.html) uploads a configuration
|
||||||
The `atlas` block does not configure remote state; it only configures the push command. For remote state, [use a `terraform { backend "<NAME>" {...} }` block](/docs/backends/config.html).
|
The `atlas` block does not configure remote state; it only configures the push command. For remote state, [use a `terraform { backend "<NAME>" {...} }` block](/docs/backends/config.html).
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
|
@ -16,7 +16,7 @@ The `terraform` configuration section is used to configure Terraform itself,
|
||||||
such as requiring a minimum Terraform version to execute a configuration.
|
such as requiring a minimum Terraform version to execute a configuration.
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -54,7 +54,7 @@ The `required_version` setting can be used to require a specific version
|
||||||
of Terraform. If the running version of Terraform doesn't match the
|
of Terraform. If the running version of Terraform doesn't match the
|
||||||
constraints specified, Terraform will show an error and exit.
|
constraints specified, Terraform will show an error and exit.
|
||||||
|
|
||||||
When [modules](/docs/configuration/modules.html) are used, all Terraform
|
When [modules](./modules.html) are used, all Terraform
|
||||||
version requirements specified by the complete module tree must be
|
version requirements specified by the complete module tree must be
|
||||||
satisified. This means that the `required_version` setting can be used
|
satisified. This means that the `required_version` setting can be used
|
||||||
by a module to require that all consumers of a module also use a specific
|
by a module to require that all consumers of a module also use a specific
|
||||||
|
|
|
@ -16,14 +16,14 @@ and later, see
|
||||||
Input variables serve as parameters for a Terraform module.
|
Input variables serve as parameters for a Terraform module.
|
||||||
|
|
||||||
When used in the root module of a configuration, variables can be set from CLI
|
When used in the root module of a configuration, variables can be set from CLI
|
||||||
arguments and environment variables. For [_child_ modules](/docs/configuration/modules.html),
|
arguments and environment variables. For [_child_ modules](./modules.html),
|
||||||
they allow values to pass from parent to child.
|
they allow values to pass from parent to child.
|
||||||
|
|
||||||
Input variable usage is introduced in the Getting Started guide section
|
Input variable usage is introduced in the Getting Started guide section
|
||||||
[_Input Variables_](/intro/getting-started/variables.html).
|
[_Input Variables_](/intro/getting-started/variables.html).
|
||||||
|
|
||||||
This page assumes you're familiar with the
|
This page assumes you're familiar with the
|
||||||
[configuration syntax](/docs/configuration/syntax.html)
|
[configuration syntax](./syntax.html)
|
||||||
already.
|
already.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -77,14 +77,14 @@ which accepts the following arguments:
|
||||||
the given description is shown as part of the documentation.
|
the given description is shown as part of the documentation.
|
||||||
|
|
||||||
The name of a variable can be any valid identifier. However, due to the
|
The name of a variable can be any valid identifier. However, due to the
|
||||||
interpretation of [module configuration blocks](/docs/configuration/modules.html),
|
interpretation of [module configuration blocks](./modules.html),
|
||||||
the names `source`, `version` and `providers` are reserved for Terraform's own
|
the names `source`, `version` and `providers` are reserved for Terraform's own
|
||||||
use and are thus not recommended for any module intended to be used as a
|
use and are thus not recommended for any module intended to be used as a
|
||||||
child module.
|
child module.
|
||||||
|
|
||||||
The default value of an input variable must be a _literal_ value, containing
|
The default value of an input variable must be a _literal_ value, containing
|
||||||
no interpolation expressions. To assign a name to an expression so that it
|
no interpolation expressions. To assign a name to an expression so that it
|
||||||
may be re-used within a module, use [Local Values](/docs/configuration/locals.html)
|
may be re-used within a module, use [Local Values](./locals.html)
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
### Strings
|
### Strings
|
||||||
|
@ -213,7 +213,7 @@ $ TF_VAR_image=foo terraform apply
|
||||||
```
|
```
|
||||||
|
|
||||||
Maps and lists can be specified using environment variables as well using
|
Maps and lists can be specified using environment variables as well using
|
||||||
[HCL](/docs/configuration/syntax.html#HCL) syntax in the value.
|
[HCL](./syntax.html#HCL) syntax in the value.
|
||||||
|
|
||||||
For a list variable like so:
|
For a list variable like so:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue