Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add timeouts configuration options #229

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

nmalarenko
Copy link
Contributor

@nmalarenko nmalarenko commented Oct 14, 2021

Description

Adding possibility to use timeouts option for aws_security_group resource
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#timeouts

Motivation and Context

terraform destroy command can fail with the error-message DependencyViolation: resource sg-123 has a dependent object due to Lanbda ENIs. According to terraform documentation Lambda ENIs can take up to 45 minutes to delete. However timeouts feature is not available in current module.

Fixes #228

Breaking Changes

no breaking changes

How Has This Been Tested?

I have tested it on my local project by getting the module from my fork. I set only timeout_delete value to 45m.
timeout_create used default value. The security groups were successfully created and destroyed

Adding possibility to use timeouts option for aws_security_group
resource
@nmalarenko nmalarenko changed the title Add timeouts configuration options feat: Add timeouts configuration options Oct 14, 2021
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Could you change variables to be create_timeout and delete_timeout to be closer to other module where this is implemented already - ALB, and update code in examples/complete.

description = "Security group with modified timeouts"
vpc_id = data.aws_vpc.default.id

create_timeout = "15m"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to have a separate example for this feature, but rather add ..._timeout = "..." argument to an existing complete_sg.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that I was not clear about this in the previous comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough. fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries, it was my bad :)

@antonbabenko antonbabenko merged commit 0089455 into terraform-aws-modules:master Oct 14, 2021
@antonbabenko
Copy link
Member

Great job!

v4.4.0 has been just released.

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timeouts option to aws_security_group resource
2 participants