tofu-controller icon indicating copy to clipboard operation
tofu-controller copied to clipboard

Azure resource group not being deleted despite destroyResourcesOnDeletion set to true

Open studyVersion opened this issue 1 year ago • 3 comments

I'm having an issue with an Azure resource group not being deleted despite having the destroyResourcesOnDeletion setting set to true.

Here are some relevant logs from when the Terraform controller responsible for destroying the resource group was running:

MicrosoftTeams-image

When I check in Azure, I see that the resource group is still there and has not been deleted, even though the documentation for the tf-controller states that it should be deleted. Can anyone help me understand what might be causing this issue? Has anyone else experienced a similar problem?

p.s. this also happen with other Terrafom resources and to put you in the picture i have a teraform for creating k8s secrets that depends on another for creating an acr repository which also depends on the creation of a third responsible for creating the resource group apparent in this exemple.

===============

User Story:

As a Terraform Controller user, I'd like to automatically delete Azure resources when the destroyResourcesOnDeletion setting is set to true, so that I can avoid manual clean-up and maintain a consistent declarative infrastructure state with my GitOps configuration.

Acceptance Criteria:

  • [ ] When destroyResourcesOnDeletion is set to true, the Azure resource group should be deleted automatically by the Terraform Controller.
  • [ ] When destroyResourcesOnDeletion is set to true, all resources in the Azure resource group should be deleted automatically by the Terraform Controller.
  • [ ] The resource deletion process should not be affected by complex dependencies between various Terraform configurations, nor by the TF object or referenced source disappearing before the deletion process is complete.
  • [ ] Resource deletion logs should accurately reflect the status of deletion, indicating any errors or issues encountered during the deletion process.
  • [ ] Testing added.
  • [ ] We’ve created related user documentation.

studyVersion avatar Jul 09 '23 10:07 studyVersion