aws_security_group name_prefix is sometimes not written to the statefile #14474
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.12.29
Affected Resource(s)
It may also affect other resources that support
name_prefix
Terraform Configuration Files
Debug Output
https://gist.github.com/alext/8daddcc3d51190b18fefaa2a7ab130ef
Panic Output
n/a
Expected Behavior
Terraform should have created the security groups and stored the name_prefixes in the state file so that subsequent runs don't attempt to recreate any of the groups.
Actual Behavior
One of the groups did not have it's name_prefix property stored in the statefile, leading to subsequent terraform runs attempting to recreate the group. A second
terraform apply
produces the following plan:Steps to Reproduce
terraform apply
to create the groupsterraform apply
and see that it wants to recreate one of the security groups.The text was updated successfully, but these errors were encountered: