terraform-aws-rds-cluster
terraform-aws-rds-cluster copied to clipboard
Use name_prefix and create_before_destroy on security groups
Found a bug? Maybe our Slack Community can help.
Describe the Bug
It can be a pain when the security group name changes as it would not be able to destroy - potentially using this pattern would work - https://github.com/terraform-aws-modules/terraform-aws-security-group/blob/master/main.tf#L34
Expected Behavior
Able to create new security group and assign it prior to destroy
I do not understand the problem. Why would the security group name change? How is creating a new security group with a new name solving the problem?
@Nuru maybe because a new security group might allow cluster to modify its settings to change to the new group before deleting the old one? Otherwise with a replacement operation, I don't think it will allow you to delete the sg first if it's in use. The group name change for a prefix is probably so that two names don't collide due to create_before_destroy.
I might have just hit a similar issue in the cloudposse/terraform-aws-elasticache-redis module, I just left a comment in there.