Skip to content

Commit f60c9d5

Browse files
authored
feat: additional config parameter asg_delete_timeout to configure the timeout when trying to delete the ASG (#305)
1 parent 532eb0b commit f60c9d5

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ terraform destroy
279279
| docker\_machine\_spot\_price\_bid | Spot price bid. | `string` | `"0.06"` | no |
280280
| docker\_machine\_version | By default docker\_machine\_download\_url is used to set the docker machine version. Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set. | `string` | `""` | no |
281281
| enable\_asg\_recreation | Enable automatic redeployment of the Runner ASG when the Launch Configs change. | `bool` | `true` | no |
282+
| asg\_delete\_timeout | Timeout when trying to delete the Runner ASG. | `string` | `"10m"` | no |
282283
| enable\_cloudwatch\_logging | Boolean used to enable or disable the CloudWatch logging. | `bool` | `true` | no |
283284
| enable\_docker\_machine\_ssm\_access | Add IAM policies to the docker-machine instances to connect via the Session Manager. | `bool` | `false` | no |
284285
| enable\_eip | Enable the assignment of an EIP to the gitlab runner instance | `bool` | `false` | no |

main.tf

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
163163
launch_configuration = aws_launch_configuration.gitlab_runner_instance.name
164164
enabled_metrics = var.metrics_autoscaling
165165
tags = data.null_data_source.agent_tags.*.outputs
166+
timeouts {
167+
delete = var.asg_delete_timeout
168+
}
166169
}
167170

168171
resource "aws_autoscaling_schedule" "scale_in" {

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,12 @@ variable "enable_asg_recreation" {
640640
type = bool
641641
}
642642

643+
variable "asg_delete_timeout" {
644+
description = "Timeout when trying to delete the Runner ASG."
645+
default = "10m"
646+
type = string
647+
}
648+
643649
variable "enable_forced_updates" {
644650
description = "DEPRECATED! and is replaced by `enable_asg_recreation. Setting this variable to true will do the oposite as expected. For backward compatibility the variable will remain some releases. Old desription: Enable automatic redeployment of the Runner ASG when the Launch Configs change."
645651
default = null

0 commit comments

Comments
 (0)