Open ksashokumar opened 1 year ago
I would say this is by design and exactly what you would expect.
If you provision something through terraform, then you need to de-provision it aswell, by running terraform destroy or removing/commenting out that resource in your configuration. As long as your state file knowns that a resource should exist, it will fail when it is unable to check the running state of that resource.
If you manually delete something, then you need to remove that resource from the state file, for instance by running
terraform state rm <resource.name>
If a resource deployed using SDX VPX provisioning resource gets deleted in the SDX, the provider is not creating the resource again when we do terraform apply. It responds with the following error.
Plan: 0 to add, 1 to change, 0 to destroy. ╷ │ Error: failed: 404 Not Found ({ "errorcode": 10011, "message": "Resource does not exist", "severity": "ERROR" }) │ │ with module.dut_provision_sdx2.citrixsdx_provision_vpx.dut, │ on ../modules/dut_sdx/main.tf line 1, in resource "citrixsdx_provision_vpx" "dut": │ 1: resource "citrixsdx_provision_vpx" "dut" { │ ╵
Steps to reproduce: