Hi,
I am trying to deploy Amazon Workspaces but at a later stage I realize one of the availability zones I use does not support Workspaces. So I have to “move ie, delete/create” one of the subnets to another AZ. I have an EC2 in that unsupported subnet. I changed the AZ to a supported one and run terraform apply but get:
│ Error: error deleting EC2 Subnet (subnet-xxxxxxxx): DependencyViolation: The subnet 'subnet-xxxxxx' has dependencies and cannot be deleted.
│ status code: 400, request id: 82486990-3395-471e-992c-xxxxxx
Is there anyway to find out what dependency prevented the subnet from being deleted? My guess is the EC2. Is there a way for Terraform to list the dependencies before running the “apply”? “plan” does not really tell and predict “apply” will fail on the dependency violation.
Thank you.