Hello, I was posting to see if someone has a solution to a problem we are having.
We currently have infrastructure built out in Azure with terraform. This includes a Resource Group which contains a function app, storage account, application insight, private endpoints, keyvault and a whole lot of configuration settings.
The problem is that we were keeping the state file within GitLab however it has gotten deleted. When we try to deploy our infrastructure as code using our pipeline, we get numerous errors say that the resources such as the resource group, storage account, function app, etc… already exist.
Is there any way we can get all of the previous state back that was deleted to allow our infrastructure to redeploy and keep all of the settings and configuration? Thank you!
Error Message: “A resource with the ID xxx already exists - to be managed via Terraform this resource needs to be imported into the state.”