Skip to content

Commit

Permalink
feat: additional config parameter asg_delete_timeout to configure the…
Browse files Browse the repository at this point in the history
… timeout when trying to delete the ASG (#305)
  • Loading branch information
lukasmahr committed Feb 24, 2021
1 parent 532eb0b commit f60c9d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -279,6 +279,7 @@ terraform destroy
| docker\_machine\_spot\_price\_bid | Spot price bid. | `string` | `"0.06"` | no |
| 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 |
| enable\_asg\_recreation | Enable automatic redeployment of the Runner ASG when the Launch Configs change. | `bool` | `true` | no |
| asg\_delete\_timeout | Timeout when trying to delete the Runner ASG. | `string` | `"10m"` | no |
| enable\_cloudwatch\_logging | Boolean used to enable or disable the CloudWatch logging. | `bool` | `true` | no |
| enable\_docker\_machine\_ssm\_access | Add IAM policies to the docker-machine instances to connect via the Session Manager. | `bool` | `false` | no |
| enable\_eip | Enable the assignment of an EIP to the gitlab runner instance | `bool` | `false` | no |
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Expand Up @@ -163,6 +163,9 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
launch_configuration = aws_launch_configuration.gitlab_runner_instance.name
enabled_metrics = var.metrics_autoscaling
tags = data.null_data_source.agent_tags.*.outputs
timeouts {
delete = var.asg_delete_timeout
}
}

resource "aws_autoscaling_schedule" "scale_in" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Expand Up @@ -640,6 +640,12 @@ variable "enable_asg_recreation" {
type = bool
}

variable "asg_delete_timeout" {
description = "Timeout when trying to delete the Runner ASG."
default = "10m"
type = string
}

variable "enable_forced_updates" {
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."
default = null
Expand Down

0 comments on commit f60c9d5

Please sign in to comment.