Terraform apply times out when there's a change to `security_group_rules`
dchien234 opened this issue ยท 2 comments
dchien234 commented
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
- No ๐ : more like an enhancement to the existing HCL implementation
Is your request related to a problem? Please describe.
- Prerequisite:
- You have an existing EFS module
- You want to update your
security_group_rules
(for e.g. to add additional CIDR blocks)
- Observations:
- When run
terraform apply
, it will try to destroy the existingaws_security_group_rule
andaws_security_group
objects, and this operation will time out after 15m (or the default timeout) - This is because of the dependency between
aws_security_group
and theaws_efs_mount_target
resource. One cannot destroy theaws_security_group
, if it has a dependency object. And theaws_efs_mount_target
cannot replace with the new security group since it's not created yet.
- When run
Describe the solution you'd like.
- Solution:
- Add a
create_before_destroy
life cycle behavior to the above objects to enable terraform to replace objects properly.
- Add a
Describe alternatives you've considered.
- N.A.
Additional context
- N.A.
github-actions commented
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.