mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Revert "Revert "Remove future-facing statements""
This reverts commit cb975a5fff.
This commit is contained in:
@@ -126,12 +126,10 @@ The nested objects in `diagnostics` have the following properties:
|
||||
rendering container, but leave the preformatted lines unwrapped.
|
||||
|
||||
Some Terraform detail messages currently contain an approximation of bullet
|
||||
lists using ASCII characters to mark the bullets. This is not currently a
|
||||
contractural formatting convention and so renderers should avoid depending on
|
||||
lists using ASCII characters to mark the bullets. This is not a
|
||||
contractural formatting convention, so renderers should avoid depending on
|
||||
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
|
||||
additional rules for processing other text conventions, but will do so within
|
||||
the bounds of the rules above to achieve backward-compatibility.
|
||||
text per the rules above.
|
||||
|
||||
- `range` (object): An optional object referencing a portion of the configuration
|
||||
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
|
||||
exact positions used for particular error messages are intended for human
|
||||
interpretation only and subject to change in future versions of Terraform due
|
||||
either to improvements to the error reporting or changes in implementation
|
||||
details of the language parser/evaluator.
|
||||
interpretation only.
|
||||
|
||||
### 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
|
||||
`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
|
||||
to be human-readable and are subject to change in future versions of
|
||||
Terraform.
|
||||
to be human-readable.
|
||||
|
||||
- `statement` (string): A short English-language fragment describing the value
|
||||
of the expression when the diagnostic was triggered. The contents of this
|
||||
|
||||
@@ -9,31 +9,12 @@ 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.
|
||||
|
||||
<<<<<<< HEAD
|
||||
Terraform can import existing infrastructure resources. This functionality lets you bring existing resources under Terraform management.
|
||||
|
||||
~> Warning: Terraform expects that each remote object is bound to only one resource address. You should 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.
|
||||
=======
|
||||
Terraform can import existing infrastructure resources. This functionality allows you take
|
||||
resources you created by some other means and bring them under Terraform
|
||||
management.
|
||||
|
||||
This is a great way to slowly transition infrastructure to Terraform, or
|
||||
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.
|
||||
## State Only
|
||||
|
||||
~> Warning: Terraform expects that each remote object it is managing will be
|
||||
bound to only one resource address, which is normally guaranteed by 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. For more information on this assumption, see
|
||||
[the State section](/language/state).
|
||||
>>>>>>> parent of 0a7e221a49 (Remove future-facing statements)
|
||||
|
||||
## Currently State Only
|
||||
|
||||
<<<<<<< HEAD
|
||||
Terraform import can only import resources into the [state](/language/state). Importing does not generate configuration.
|
||||
|
||||
Before you run `terraform import` you must manually write a `resource` configuration block for the resource. The resource block describes where Terraform should map the imported object.
|
||||
@@ -41,19 +22,3 @@ Before you run `terraform import` you must manually write a `resource` configura
|
||||
## Terraform Cloud
|
||||
|
||||
When you use Terraform on the command line with Terraform Cloud, many commands like `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.
|
||||
=======
|
||||
The current implementation of Terraform import can only import resources
|
||||
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
|
||||
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
|
||||
|
||||
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.
|
||||
>>>>>>> parent of 0a7e221a49 (Remove future-facing statements)
|
||||
|
||||
Reference in New Issue
Block a user