From 1f6d9865951f0d729ea47af98ca98df1b9ec611b Mon Sep 17 00:00:00 2001 From: Dan Slimmon Date: Mon, 2 May 2022 09:57:25 +0000 Subject: [PATCH] Include something about how state is checked --- website/docs/language/files/dependency-lock.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/language/files/dependency-lock.mdx b/website/docs/language/files/dependency-lock.mdx index b2b358bda769..d439acc08b36 100644 --- a/website/docs/language/files/dependency-lock.mdx +++ b/website/docs/language/files/dependency-lock.mdx @@ -366,9 +366,11 @@ this command. ### Providers that are no longer required -If you remove the last dependency on a particular provider from your -configuration, then `terraform init` will remove any existing lock file entry -for that provider. +To determine whether there still exists a dependency on a given provider, +Terraform uses two sources of truth: the configuration itself, and the state. +If you remove the last dependency on a particular provider from both your +configuration and state, then `terraform init` will remove any existing lock +file entry for that provider. ```diff --- .terraform.lock.hcl 2020-10-07 16:12:07.539570634 -0700