Closed kthix closed 1 year ago
:tada: Thanks for opening your first issue here! Welcome to the community!
@kthix Thanks for reporting a bug, could you please format a bit the output from terraform? It will help to read it :)
Hi, hope it helps. I don't have the possibility to re-run it so hope the add code format helped on the existing post.
@kthix the 1st time you run tf destroy
you get an error message related to AzureRM and the fact that Azure reports an action back to terraform as finished successfully but the state of the resource on Azure side is not updated yet. There is no good fix for that.
The 2nd time you run destroy - I'm guessing that this happens when you use Terraform 1.3.x branch. We've seen that issue and it looks like it's related to Terraform directly although we were not able to pin point what is exactly causing this problem. For now, as a workaround, try to use 1.2 branch.
tested with version 1.3.6, this looks like a problem with building dependencies. It happens not only for outputs, 1.3.6 produced this error while testing:
╷
│ Error: Unsupported attribute
│
│ on main.tf line 218, in module "outbound_vmseries":
│ 218: lb_backend_pool_id = module.outbound_lb.backend_pool_id
│ ├────────────────
│ │ module.outbound_lb is object with 2 attributes
│
│ This object does not have an attribute named "backend_pool_id".
module.outbound_lb
was destroyed in previous tf destroy
run (which errored out due to problems with subnet status returned by AzureRM):
module.outbound_lb.azurerm_lb.lb: Destruction complete after 21s
To workaround that issue this line in vmseries module invocation:
lb_backend_pool_id = module.outbound_lb.backend_pool_id
was replaced with this one:
lb_backend_pool_id = try(module.outbound_lb.backend_pool_id, null)
Describe the bug
Using example: transit_vnet_dedicated Deployment was success. But when Terraform destroy is tested I do get errors.
Expected behavior
It should remove all deployed resources with the destroy command
Current behavior
I do think dependency issues are in play.
Possible solution
Steps to reproduce
terraform apply terraform destroy second time terraform destory => other errors
Screenshots
Context
Your Environment
Running it in Europ-West region.
On first run of terraform destroy: