Provider configuration not present issue terraform
In error it was clearly mentioned as per the description you tried to remove the provider from the configuration which you used to provision the resources.
Which means you creating some resources using a provider which is updated in state file. Now later on you removed the same provider block you used to provision from the configuration and its not reflected in statefile since youre getting the error while executing commands. Now after removing the provider configuration, you try to make some changes or delete in the rest of the resource configuration that are provisioned using that provider without provider block present in the configuration which will make you end blocker missing provider configuration.
Even you removed the entire statefile sometimes it doesn’t necessarily remove all references to the provider configuration, especially if there are dependent resources that still exist in the cloud
We can do two things here
- Try deleting the resources that are present under azure and run it again from
terrafrom init .
- Include the provider configuration that you used while provisioning the resource.
configuration:
terraform {
backend "azurerm" {
resource_group_name = "example-rg"
storage_account_name = "examplestorageacc"
container_name = "tfstate"
key = "terraform.tfstate"
}
}
provider "azurerm" {
features {}
}
Refer:
GitHub - hashicorp/terraform-provider-azurerm: Terraform provider for Azure Resource Manager
Backend Type: azurerm | Terraform | HashiCorp Developer