PaloAltoNetworks / terraform-aws-vmseries-modules

Terraform Reusable Modules for VM-Series on AWS
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/aws
MIT License
40 stars 49 forks source link

ASG timeout its way too optimistic and could cause loops in deployments. #282

Closed gabriel-montiel-netdatanetworks closed 1 year ago

gabriel-montiel-netdatanetworks commented 1 year ago

Describe the bug

in the asg module, the default variable for the lifecycle hook timeout for the AWS ASG group, its only 300 seconds, which if the instance takes longer in booting it will delete it, and create a new one.

https://github.com/PaloAltoNetworks/terraform-aws-vmseries-modules/blob/v0.4.1/modules/asg/variables.tf

Line 101

variable "lifecycle_hook_timeout" { description = "How long should we wait for lambda to finish" type = number default = 300 }

Expected behavior

Deploy an asg

Current behavior

Deployment loop

Possible solution

Override default variable, increase default value

Steps to reproduce

Deploy the example and have bad luck.

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!

migara commented 1 year ago

@gabriel-montiel-netdatanetworks, thanks for the issue and PR. Increasing the timeout to 50 minutes is way too high and could cause instances not to get deleted for up to 50 minutes if there is a real problem with the launched instance.

I think 20 minutes is an acceptable ceiling for the timeout

migara commented 1 year ago

Please test with #299