From 369295cb7650ae2c9d61e71881babaebc010d47d Mon Sep 17 00:00:00 2001 From: Prasanna Gautam <40477+prasincs@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:08:54 -0700 Subject: [PATCH 1/2] Update import.mdx blurb about using the import syntax in the language --- website/docs/cli/commands/import.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/cli/commands/import.mdx b/website/docs/cli/commands/import.mdx index 214c0d7cea..68087e6abb 100644 --- a/website/docs/cli/commands/import.mdx +++ b/website/docs/cli/commands/import.mdx @@ -35,6 +35,8 @@ If you import the same object multiple times, Terraform may exhibit unwanted behavior. For more information on this assumption, see [the State section](/terraform/language/state). +-> If you have a need to automate this with CI/CD pipelines, you may want to look at utilizing the [import block](https://developer.hashicorp.com/terraform/language/import#syntax) in a .tf file in your root module instead. This will avoid manual coordination work to update state and potential security issues such endeavors. + The command-line flags are all optional. The following flags are available: - `-config=path` - Path to directory of Terraform configuration files that From a08ef12a0a0f1615a3b981770604e77b9027bce1 Mon Sep 17 00:00:00 2001 From: Prasanna Gautam <40477+prasincs@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:07:00 -0700 Subject: [PATCH 2/2] Update website/docs/cli/commands/import.mdx Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/docs/cli/commands/import.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cli/commands/import.mdx b/website/docs/cli/commands/import.mdx index 68087e6abb..a13f15a234 100644 --- a/website/docs/cli/commands/import.mdx +++ b/website/docs/cli/commands/import.mdx @@ -35,7 +35,7 @@ If you import the same object multiple times, Terraform may exhibit unwanted behavior. For more information on this assumption, see [the State section](/terraform/language/state). --> If you have a need to automate this with CI/CD pipelines, you may want to look at utilizing the [import block](https://developer.hashicorp.com/terraform/language/import#syntax) in a .tf file in your root module instead. This will avoid manual coordination work to update state and potential security issues such endeavors. +Instead of manually importing resources, you can add the `import` block to your Terraform configurations so that Terraform imports resources when you run the `terraform apply` command. Using Terraform configurations lets you automate resource imports as part of your CI/CD pipelines. Refer to the [`import` block reference documentation](/terraform/language/import) for additional information. The command-line flags are all optional. The following flags are available: