hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
401 stars 488 forks source link

Can't recreate auto scale group due to security group dependency on old instances #36

Open jasonmcintosh opened 6 years ago

jasonmcintosh commented 6 years ago
* module.consul_servers.aws_security_group.lc_security_group (destroy): 1 error(s) occurred:

* aws_security_group.lc_security_group (deposed #0): 1 error(s) occurred:

* aws_security_group.lc_security_group (deposed #0): DependencyViolation: resource sg-XXXXX has a dependent object

Seeing this error after changing the cluster name. It seems it isn't creating the new autoscaling group and deleting the old autoscaling group BEFORE trying to delete the security groups. The result is it can't delete the security group as it's still connected to the EC2 instances running prior.

jasonmcintosh commented 6 years ago

Fiddling with this trying to find a solution - not found a good one yet. :(