Closed ghost closed 6 years ago
This could be related to #3103
As noted in #3103, this behavior was caused by a regression upstream in Terraform 0.11.2 and subsequently fixed in Terraform 0.11.3.
Tracing this back I found this issue upstream which affected only Terraform 0.11.2 and seemingly configurations with
ignore_changes
defined in some manner: https://github.com/hashicorp/terraform/issues/17117
So, hopefully mystery solved here as well. Please ping me if this needs to be reopened but Terraform core versions not equal to 0.11.2 should work fine.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
This issue was originally opened by @camerontesterman as hashicorp/terraform#17416. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Expected Behavior
The
vpc_security_group_ids
set on the db_instance should be comprised of a database security group (shown above), plus any other additional security groups that you want to specify.Actual Behavior
Instead what is happening is a flapping behavior with these two sets of security groups, where one set is added and another is removed.
Terraform will attach the
db_sg
, but if you add additional security groups to the additional security groups list, upon apply it will remove thedb_sg
and add the additional security groups. If you run apply again, it will remove the additional security groups and reattach thedb_sg
. It recognizes it is not in the correct state, but cannot seem to fix itself by adding both thedb_sg
and the additional_sgs.Steps to Reproduce
terraform init
terraform apply
terraform apply