mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Remove future-facing statements
This commit is contained in:
parent
99608b7da4
commit
0a7e221a49
@ -126,12 +126,10 @@ The nested objects in `diagnostics` have the following properties:
|
|||||||
rendering container, but leave the preformatted lines unwrapped.
|
rendering container, but leave the preformatted lines unwrapped.
|
||||||
|
|
||||||
Some Terraform detail messages currently contain an approximation of bullet
|
Some Terraform detail messages currently contain an approximation of bullet
|
||||||
lists using ASCII characters to mark the bullets. This is not currently a
|
lists using ASCII characters to mark the bullets. This is not a
|
||||||
contractural formatting convention and so renderers should avoid depending on
|
contractural formatting convention, so renderers should avoid depending on
|
||||||
it and should instead treat those lines as either paragraphs or preformatted
|
it and should instead treat those lines as either paragraphs or preformatted
|
||||||
text per the rules above. A future version of this format may define some
|
text per the rules above.
|
||||||
additional rules for processing other text conventions, but will do so within
|
|
||||||
the bounds of the rules above to achieve backward-compatibility.
|
|
||||||
|
|
||||||
- `range` (object): An optional object referencing a portion of the configuration
|
- `range` (object): An optional object referencing a portion of the configuration
|
||||||
source code that the diagnostic message relates to. For errors, this will
|
source code that the diagnostic message relates to. For errors, this will
|
||||||
@ -195,9 +193,7 @@ object, has the following properties:
|
|||||||
|
|
||||||
A `start` position is inclusive while an `end` position is exclusive. The
|
A `start` position is inclusive while an `end` position is exclusive. The
|
||||||
exact positions used for particular error messages are intended for human
|
exact positions used for particular error messages are intended for human
|
||||||
interpretation only and subject to change in future versions of Terraform due
|
interpretation only.
|
||||||
either to improvements to the error reporting or changes in implementation
|
|
||||||
details of the language parser/evaluator.
|
|
||||||
|
|
||||||
### Expression Value
|
### Expression Value
|
||||||
|
|
||||||
@ -209,8 +205,7 @@ exactly which values are responsible for an error. The object has two properties
|
|||||||
- `traversal` (string): An HCL-like traversal string, such as
|
- `traversal` (string): An HCL-like traversal string, such as
|
||||||
`var.instance_count`. Complex index key values may be elided, so this will
|
`var.instance_count`. Complex index key values may be elided, so this will
|
||||||
not always be valid, parseable HCL. The contents of this string are intended
|
not always be valid, parseable HCL. The contents of this string are intended
|
||||||
to be human-readable and are subject to change in future versions of
|
to be human-readable.
|
||||||
Terraform.
|
|
||||||
|
|
||||||
- `statement` (string): A short English-language fragment describing the value
|
- `statement` (string): A short English-language fragment describing the value
|
||||||
of the expression when the diagnostic was triggered. The contents of this
|
of the expression when the diagnostic was triggered. The contents of this
|
||||||
|
@ -9,35 +9,23 @@ description: >-
|
|||||||
|
|
||||||
> **Hands-on:** Try the [Import Terraform Configuration](https://learn.hashicorp.com/tutorials/terraform/state-import?in=terraform/state&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.
|
> **Hands-on:** Try the [Import Terraform Configuration](https://learn.hashicorp.com/tutorials/terraform/state-import?in=terraform/state&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.
|
||||||
|
|
||||||
Terraform can import existing infrastructure resources. This functionality allows you take
|
Terraform can import existing infrastructure resources. This functionality allows you take resources you created by some other means and bring them under Terraform
|
||||||
resources you created by some other means and bring them under Terraform
|
|
||||||
management.
|
management.
|
||||||
|
|
||||||
This is a great way to slowly transition infrastructure to Terraform, or
|
This method lets you slowly transition infrastructure to Terraform, or
|
||||||
to be able to be confident that you can use Terraform in the future if it
|
to be able to be confident that you can use Terraform in the future if it
|
||||||
potentially doesn't support every feature you need today.
|
potentially doesn't support every feature you need today.
|
||||||
|
|
||||||
~> Warning: Terraform expects that each remote object it is managing will be
|
~> Warning: Terraform expects that each remote object it is managing will be
|
||||||
bound to only one resource address, which is normally guaranteed by Terraform
|
bound to only one resource address, which is normally guaranteed by Terraform
|
||||||
itself having created all objects. If you import existing objects into Terraform,
|
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. Refer to [State](/language/state) for more details.
|
||||||
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](/language/state).
|
|
||||||
|
|
||||||
## Currently State Only
|
## State Only
|
||||||
|
|
||||||
The current implementation of Terraform import can only import resources
|
Terraform import can only import resources into the [state](/language/state). It does not generate configuration.
|
||||||
into the [state](/language/state). 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
|
Because of this, prior to running `terraform import` you must manually write a `resource` configuration block for the resource that describes where Terraform should map the imported object.
|
||||||
manually a `resource` configuration block for the resource, to which the
|
|
||||||
imported object will be mapped.
|
|
||||||
|
|
||||||
While this may seem tedious, it still gives Terraform users an avenue for
|
|
||||||
importing existing resources.
|
|
||||||
|
|
||||||
## Terraform Cloud
|
## Terraform Cloud
|
||||||
|
|
||||||
When you use Terraform on the command line with Terraform Cloud, many commands (e.g., `apply`) run inside your Terraform Cloud environment. However, the `import` command runs locally, so it will not have access to information from Terraform Cloud. To successfully perform an import, you may need to set local variables equivalent to any remote workspace variables in Terraform Cloud.
|
When you use Terraform on the command line with Terraform Cloud, many commands (e.g., `apply`) run inside your Terraform Cloud environment. However, the `import` command runs locally, so it does not have access to information from Terraform Cloud. To successfully perform an import, you may need to set local variables equivalent to any remote workspace variables in Terraform Cloud.
|
||||||
|
@ -61,8 +61,6 @@ Because state does not currently have any significant metadata not covered by th
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The extra wrapping object here will allow for any extension we may need to add in future versions of this format.
|
|
||||||
|
|
||||||
## Plan Representation
|
## Plan Representation
|
||||||
|
|
||||||
A plan consists of a prior state, the configuration that is being applied to that state, and the set of changes Terraform plans to make to achieve that.
|
A plan consists of a prior state, the configuration that is being applied to that state, and the set of changes Terraform plans to make to achieve that.
|
||||||
|
@ -57,8 +57,6 @@ The properties within the discovery object are as follows:
|
|||||||
Both the `authz` and `token` properties are required when `authz_code` is
|
Both the `authz` and `token` properties are required when `authz_code` is
|
||||||
present.
|
present.
|
||||||
|
|
||||||
Other grant types may be supported in future versions of Terraform CLI,
|
|
||||||
and may impose different requirements on the `authz` and `token` properties.
|
|
||||||
If not specified, `grant_types` defaults to `["authz_code"]`.
|
If not specified, `grant_types` defaults to `["authz_code"]`.
|
||||||
|
|
||||||
* `authz` (Required if needed for a given grant type): the server's
|
* `authz` (Required if needed for a given grant type): the server's
|
||||||
|
@ -150,9 +150,7 @@ which must be a JSON object.
|
|||||||
|
|
||||||
Each of the property names of the `versions` object represents an available
|
Each of the property names of the `versions` object represents an available
|
||||||
version number. The property values must be objects, but no properties are
|
version number. The property values must be objects, but no properties are
|
||||||
currently defined for those objects. Future versions of this protocol may
|
currently defined for those objects. We recommend leaving those objects
|
||||||
define optional per-version properties for Terraform to use as installation
|
|
||||||
hints, so implementations of the current version should leave those objects
|
|
||||||
empty.
|
empty.
|
||||||
|
|
||||||
Return `404 Not Found` to signal that the mirror does not have a provider
|
Return `404 Not Found` to signal that the mirror does not have a provider
|
||||||
|
@ -170,9 +170,8 @@ as defined for managed resources, with the same syntax and behavior.
|
|||||||
|
|
||||||
## Lifecycle Customizations
|
## Lifecycle Customizations
|
||||||
|
|
||||||
Data resources do not currently have any customization settings available
|
Data resources do not have any customization settings available
|
||||||
for their lifecycle, but the `lifecycle` nested block is reserved in case
|
for their lifecycle.
|
||||||
any are added in future versions.
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@ -127,11 +127,7 @@ using lexical sorting.
|
|||||||
For sets of strings, Terraform sorts the elements by their value, using
|
For sets of strings, Terraform sorts the elements by their value, using
|
||||||
lexical sorting.
|
lexical sorting.
|
||||||
|
|
||||||
For sets of other types, Terraform uses an arbitrary ordering that may change
|
For sets of other types, Terraform uses an arbitrary ordering. 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](/language/functions/toset)
|
||||||
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](/language/functions/toset)
|
|
||||||
to concisely convert a `for` expression result to be of a set type.
|
to concisely convert a `for` expression result to be of a set type.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
|
@ -49,8 +49,8 @@ The arguments available within a `lifecycle` block are `create_before_destroy`,
|
|||||||
such features, so you must understand the constraints for each resource
|
such features, so you must understand the constraints for each resource
|
||||||
type before using `create_before_destroy` with it.
|
type before using `create_before_destroy` with it.
|
||||||
|
|
||||||
Destroy provisioners of this resource will not run if `create_before_destroy`
|
Destroy provisioners of this resource do not run if `create_before_destroy`
|
||||||
is set to `true`. We may address this in the future, and this [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
|
is set to `true`. This [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
|
||||||
|
|
||||||
* `prevent_destroy` (bool) - This meta-argument, when set to `true`, will
|
* `prevent_destroy` (bool) - This meta-argument, when set to `true`, will
|
||||||
cause Terraform to reject with an error any plan that would destroy the
|
cause Terraform to reject with an error any plan that would destroy the
|
||||||
|
@ -194,5 +194,4 @@ does not include one for that provider.
|
|||||||
|
|
||||||
**The `version` argument in provider configurations is deprecated.**
|
**The `version` argument in provider configurations is deprecated.**
|
||||||
In Terraform 0.13 and later, always declare provider version constraints in
|
In Terraform 0.13 and later, always declare provider version constraints in
|
||||||
[the `required_providers` block](/language/providers/requirements). The `version`
|
[the `required_providers` block](/language/providers/requirements).
|
||||||
argument will be removed in a future version of Terraform.
|
|
||||||
|
@ -235,8 +235,8 @@ fail, Terraform will error and rerun the provisioners again on the next
|
|||||||
provisioners to be safe to run multiple times.
|
provisioners to be safe to run multiple times.
|
||||||
|
|
||||||
```
|
```
|
||||||
Destroy provisioners of this resource will not run if `create_before_destroy`
|
Destroy provisioners of this resource do not run if `create_before_destroy`
|
||||||
is set to `true`. We may address this in the future, and this [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
|
is set to `true`. This [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
|
||||||
```
|
```
|
||||||
|
|
||||||
Destroy-time provisioners can only run if they remain in the configuration
|
Destroy-time provisioners can only run if they remain in the configuration
|
||||||
@ -251,8 +251,7 @@ remove a resource with a destroy-time provisioner:
|
|||||||
* Remove the resource block entirely from configuration, along with its `provisioner` blocks.
|
* Remove the resource block entirely from configuration, along with its `provisioner` blocks.
|
||||||
* Apply again, at which point no further action should be taken since the resources were already destroyed.
|
* Apply again, at which point no further action should be taken since the resources were already destroyed.
|
||||||
|
|
||||||
This limitation may be addressed in future versions of Terraform. For now,
|
Because of this limitation, you should use destroy-time provisioners sparingly and with care.
|
||||||
destroy-time provisioners must be used sparingly and with care.
|
|
||||||
|
|
||||||
~> **NOTE:** A destroy-time provisioner within a resource that is tainted _will not_ run. This includes resources that are marked tainted from a failed creation-time provisioner or tainted manually using `terraform taint`.
|
~> **NOTE:** A destroy-time provisioner within a resource that is tainted _will not_ run. This includes resources that are marked tainted from a failed creation-time provisioner or tainted manually using `terraform taint`.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user