Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ resource "aws_autoscaling_group" "gitlab_runner_instance" {
min_size = "1"
max_size = "1"
desired_capacity = "1"
health_check_grace_period = 0
health_check_grace_period = var.runner_instance.health_check_grace_period
health_check_type = var.runner_instance.health_check_type
max_instance_lifetime = var.runner_instance.max_lifetime_seconds
enabled_metrics = var.runner_instance.collect_autoscaling_metrics

Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,16 @@ variable "runner_instance" {
spot_price = By setting a spot price bid price the Runner is created via a spot request. Be aware that spot instances can be stopped by AWS. Choose \"on-demand-price\" to pay up to the current on demand price for the instance type chosen.
ssm_access = Allows to connect to the Runner via SSM.
type = EC2 instance type used.
health_check_type = The health check type for the Runner manager ASG. Valid values are "EC2" or "ELB". When set to "ELB", attach a target group to the ASG and configure an application-level health check (e.g. the Prometheus /metrics endpoint on port 9252).
health_check_grace_period = Time in seconds after instance comes into service before checking health. Only relevant when health_check_type is "ELB".
use_eip = Assigns an EIP to the Runner.
EOT
type = object({
additional_tags = optional(map(string))
collect_autoscaling_metrics = optional(list(string), null)
ebs_optimized = optional(bool, true)
health_check_grace_period = optional(number, 0)
health_check_type = optional(string, "EC2")
max_lifetime_seconds = optional(number, null)
monitoring = optional(bool, true)
name = string
Expand Down