From 3af1950adff95e3dc36af42914ae010f446ed98a Mon Sep 17 00:00:00 2001 From: Mukesh Kumar Date: Mon, 3 Jan 2022 07:26:48 +0530 Subject: [PATCH 1/4] Terraform may be misled, not provider Provider is not misled into thinking. Terraform may be misled into thinking that all of the managed objects have been deleted . So, Terraform removes all of the tracked objects from the state file. --- website/docs/cli/commands/refresh.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/cli/commands/refresh.mdx b/website/docs/cli/commands/refresh.mdx index 898457fd8..7be35e13b 100644 --- a/website/docs/cli/commands/refresh.mdx +++ b/website/docs/cli/commands/refresh.mdx @@ -45,9 +45,9 @@ plan file, it doesn't allow selecting a planning mode other than "refresh only", and `-auto-approve` is always enabled. Automatically applying the effect of a refresh is risky, because if you have -misconfigured credentials for one or more providers then the provider may +misconfigured credentials for one or more providers then Terraform may be misled into thinking that all of the managed objects have been deleted, -and thus remove all of the tracked objects without any confirmation prompt. +and thus removes all of the tracked objects without any confirmation prompt. Instead, we recommend using the following command in order to get the same effect but with the opportunity to review the changes that Terraform has From 63e0b4a5afb41a38fadb2659fb16366c036bedc4 Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Mon, 14 Mar 2022 12:18:45 -0400 Subject: [PATCH 2/4] Update website/docs/cli/commands/refresh.mdx --- website/docs/cli/commands/refresh.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cli/commands/refresh.mdx b/website/docs/cli/commands/refresh.mdx index 7be35e13b..57aed2ffd 100644 --- a/website/docs/cli/commands/refresh.mdx +++ b/website/docs/cli/commands/refresh.mdx @@ -44,7 +44,7 @@ Consequently, it supports all of the same options as plan file, it doesn't allow selecting a planning mode other than "refresh only", and `-auto-approve` is always enabled. -Automatically applying the effect of a refresh is risky, because if you have +Automatically applying the effect of a refresh is risky. If you have misconfigured credentials for one or more providers then Terraform may be misled into thinking that all of the managed objects have been deleted, and thus removes all of the tracked objects without any confirmation prompt. From c74937dc9318ab4b8a4c95ae198d08ba0bf716b5 Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Mon, 14 Mar 2022 12:18:50 -0400 Subject: [PATCH 3/4] Update website/docs/cli/commands/refresh.mdx --- website/docs/cli/commands/refresh.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cli/commands/refresh.mdx b/website/docs/cli/commands/refresh.mdx index 57aed2ffd..2bdc1957a 100644 --- a/website/docs/cli/commands/refresh.mdx +++ b/website/docs/cli/commands/refresh.mdx @@ -47,7 +47,7 @@ and `-auto-approve` is always enabled. Automatically applying the effect of a refresh is risky. If you have misconfigured credentials for one or more providers then Terraform may be misled into thinking that all of the managed objects have been deleted, -and thus removes all of the tracked objects without any confirmation prompt. +causing it to remove all of the tracked objects without any confirmation prompt. Instead, we recommend using the following command in order to get the same effect but with the opportunity to review the changes that Terraform has From 53e3f044b020d5c200b79c676cbb0b4119c15eaa Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Mon, 14 Mar 2022 12:18:54 -0400 Subject: [PATCH 4/4] Update website/docs/cli/commands/refresh.mdx --- website/docs/cli/commands/refresh.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/cli/commands/refresh.mdx b/website/docs/cli/commands/refresh.mdx index 2bdc1957a..398e53b61 100644 --- a/website/docs/cli/commands/refresh.mdx +++ b/website/docs/cli/commands/refresh.mdx @@ -45,7 +45,7 @@ plan file, it doesn't allow selecting a planning mode other than "refresh only", and `-auto-approve` is always enabled. Automatically applying the effect of a refresh is risky. If you have -misconfigured credentials for one or more providers then Terraform may +misconfigured credentials for one or more providers, Terraform may be misled into thinking that all of the managed objects have been deleted, causing it to remove all of the tracked objects without any confirmation prompt.