This occurs when a provider configuration is removed while objects created by that provider still exist in the state

Hi team
I am trying to destroy on of my resource created, when i do that directly like by deleting code, it is giving some error. I am following single module structure.

If i delete the resource in module, it is throwing something like this

This occurs when a provider configuration is removed while objects created by that provider still exist in the state

i have read documentation which says if you want to delete any resource, just comment it from module file .

image

tried various things, but nothing working.

Provider we have

terraform {
required_version = “>= 1.7.0”
required_providers {
newrelic = {
source = “newrelic/newrelic”
version = “3.20.2”
}
}

}

Hi @nupur.sharma,

Can you perhaps share the resource block(s) / code block(s) you are removing from your module and the full error message along with the command (terraform plan / apply / etc.) you are running when the error is thrown. This may assist people in determining what the issue may be and helping you further (especially if they can replicate the issue)

Thanks

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.