migrate docs to mdx

This commit is contained in:
Dylan Staley
2021-12-14 18:41:17 -08:00
parent c4d46e7c6b
commit 21cbb5b392
358 changed files with 5048 additions and 5862 deletions

View File

@@ -1,7 +1,5 @@
---
layout: "docs"
page_title: "Import: Resource Importability"
sidebar_current: "docs-import-importability"
page_title: 'Import: Resource Importability'
description: |-
Each resource in Terraform must implement some basic logic to become
importable. As a result, not all Terraform resources are currently importable.
@@ -21,4 +19,4 @@ you're interested in contributing that functionality, the Terraform team
would be grateful.
To make a resource importable, please see
[Extending Terraform: Resources — Import](/docs/extend/resources/import.html).
[Extending Terraform: Resources — Import](/plugin/sdkv2/resources/import).

View File

@@ -1,8 +1,8 @@
---
layout: "docs"
page_title: "Import"
sidebar_current: "docs-import"
description: "Terraform can import and manage existing infrastructure. This can help you transition your infrastructure to Terraform."
page_title: Import
description: >-
Terraform can import and manage existing infrastructure. This can help you
transition your infrastructure to Terraform.
---
# Import
@@ -23,12 +23,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/language/state/index.html).
[the State section](/language/state).
## Currently State Only
The current implementation of Terraform import can only import resources
into the [state](/docs/language/state/index.html). It does not generate configuration. A future
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
@@ -41,7 +41,7 @@ importing existing resources.
## Remote Backends
When using Terraform import on the command line with a [remote
backend](/docs/language/settings/backends/remote.html), such as Terraform Cloud, the import
backend](/language/settings/backends/remote), 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.

View File

@@ -1,9 +1,6 @@
---
layout: "docs"
page_title: "Import: Usage"
sidebar_current: "docs-import-usage"
description: |-
The `terraform import` command is used to import existing infrastructure.
page_title: 'Import: Usage'
description: The `terraform import` command is used to import existing infrastructure.
---
# Import Usage
@@ -23,7 +20,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/language/state/index.html).
[the State section](/language/state).
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:
@@ -57,7 +54,7 @@ Terraform state.
It is also possible to import to resources in child modules, using their paths,
and to single instances of a resource with `count` or `for_each` set. See
[_Resource Addressing_](/docs/cli/state/resource-addressing.html) for more
[_Resource Addressing_](/cli/state/resource-addressing) for more
details on how to specify a target resource.
The syntax of the given ID is dependent on the resource type being imported.
@@ -83,4 +80,4 @@ a `resource` block in configuration for each secondary resource. If this is
not done, Terraform will plan to destroy the imported objects on the next run.
If you want to rename or otherwise move the imported resources, the
[state management commands](/docs/cli/commands/state/index.html) can be used.
[state management commands](/cli/commands/state) can be used.