diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 529b133fd..928566934 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "8.1.0" + ".": "9.0.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f4eccc45..78db3a649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [9.0.0](https://github.com/cattle-ops/terraform-aws-gitlab-runner/compare/8.1.0...9.0.0) (2025-02-09) + + +### ⚠ BREAKING CHANGES + +* remove declaration of unused variables for docker-autoscaler setup ([#1223](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1223)) +* add custom egress rules to worker security groups ([#1222](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1222)) + +### Features + +* add custom egress rules to worker security groups ([#1222](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1222)) ([a197e4f](https://github.com/cattle-ops/terraform-aws-gitlab-runner/commit/a197e4f0581d44e23669e3c2b23f3f0b682fc211)) +* enabled usage of private key with docker autoscaler ([#1232](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1232)) ([95c7ea6](https://github.com/cattle-ops/terraform-aws-gitlab-runner/commit/95c7ea6045be4fbfe917991a677e8b2df816e5bc)) + + +### Miscellaneous Chores + +* remove declaration of unused variables for docker-autoscaler setup ([#1223](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1223)) ([41058c8](https://github.com/cattle-ops/terraform-aws-gitlab-runner/commit/41058c8e627edaaf8bf6132d106e01fd81c2ef7d)) + ## [8.1.0](https://github.com/cattle-ops/terraform-aws-gitlab-runner/compare/8.0.1...8.1.0) (2024-12-05) diff --git a/README.md b/README.md index 56a1a5cfa..9afd571c2 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.78.0 | +| [aws](#provider\_aws) | 5.85.0 | | [local](#provider\_local) | 2.5.2 | | [tls](#provider\_tls) | 4.0.6 | @@ -146,18 +146,24 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | [aws_security_group.docker_autoscaler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | | [aws_security_group.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | | [aws_security_group.runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | -| [aws_security_group_rule.autoscaler_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.autoscaler_ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_docker_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_docker_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_ping_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_ping_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_ssh_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.docker_machine_ssh_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.extra_autoscaler_ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | -| [aws_security_group_rule.runner_ping_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource | | [aws_ssm_parameter.runner_registration_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource | | [aws_ssm_parameter.runner_sentry_dsn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource | +| [aws_vpc_security_group_egress_rule.docker_autoscaler_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_vpc_security_group_egress_rule.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_vpc_security_group_egress_rule.runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_vpc_security_group_egress_rule.runner_manager_to_docker_autoscaler_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_vpc_security_group_egress_rule.runner_manager_to_docker_machine_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_autoscaler_ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_autoscaler_internal_traffic](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_docker_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_docker_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_ping_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_ping_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_ssh_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.docker_machine_ssh_self](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | +| [aws_vpc_security_group_ingress_rule.runner_ping_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource | | [local_file.config_toml](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource | | [local_file.user_data](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource | | [tls_private_key.autoscaler](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource | @@ -188,17 +194,18 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | [runner\_ami\_id](#input\_runner\_ami\_id) | The AMI ID of the Runner instance. | `string` | `""` | no | | [runner\_ami\_owners](#input\_runner\_ami\_owners) | The list of owners used to select the AMI of the Runner instance. | `list(string)` |
[| no | | [runner\_cloudwatch](#input\_runner\_cloudwatch) | enable = Boolean used to enable or disable the CloudWatch logging.
"amazon"
]
object({| `{}` | no | +| [runner\_egress\_rules](#input\_runner\_egress\_rules) | Map of Egress rules for the Runner Manager security group. |
enable = optional(bool, true)
log_group_name = optional(string, null)
retention_days = optional(number, 0)
})
map(object({|
from_port = optional(number, null)
to_port = optional(number, null)
protocol = string
description = string
cidr_block = optional(string, null)
ipv6_cidr_block = optional(string, null)
prefix_list_id = optional(string, null)
security_group = optional(string, null)
}))
{| no | | [runner\_enable\_asg\_recreation](#input\_runner\_enable\_asg\_recreation) | Enable automatic redeployment of the Runner's ASG when the Launch Configs change. | `bool` | `true` | no | | [runner\_gitlab](#input\_runner\_gitlab) | ca\_certificate = Trusted CA certificate bundle (PEM format).
"allow_https_ipv4": {
"cidr_block": "0.0.0.0/0",
"description": "Allow HTTPS egress traffic",
"from_port": 443,
"protocol": "tcp",
"to_port": 443
},
"allow_https_ipv6": {
"description": "Allow HTTPS egress traffic (IPv6)",
"from_port": 443,
"ipv6_cidr_block": "::/0",
"protocol": "tcp",
"to_port": 443
}
}
object({| n/a | yes | | [runner\_gitlab\_registration\_config](#input\_runner\_gitlab\_registration\_config) | (deprecated, replaced by runner\_gitlab.preregistered\_runner\_token\_ssm\_parameter\_name) Configuration used to register the Runner. See the README for an example, or reference the examples in the examples directory of this repo. There is also a good GitLab documentation available at: https://docs.gitlab.com/ee/ci/runners/configure_runners.html |
ca_certificate = optional(string, "")
certificate = optional(string, "")
registration_token = optional(string, "__REPLACED_BY_USER_DATA__") # deprecated, removed in 8.0.0
runner_version = optional(string, "16.0.3")
url = optional(string, "")
url_clone = optional(string, "")
access_token_secure_parameter_store_name = optional(string, "gitlab-runner-access-token") # deprecated, removed in 8.0.0
preregistered_runner_token_ssm_parameter_name = optional(string, "")
})
object({| `{}` | no | | [runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name](#input\_runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name) | (deprecated, replaced by runner\_gitlab.preregistered\_runner\_token\_ssm\_parameter\_name) The name of the SSM parameter to read the GitLab Runner registration token from. | `string` | `"gitlab-runner-registration-token"` | no | | [runner\_gitlab\_token\_secure\_parameter\_store](#input\_runner\_gitlab\_token\_secure\_parameter\_store) | Name of the Secure Parameter Store entry to hold the GitLab Runner token. | `string` | `"runner-token"` | no | +| [runner\_ingress\_rules](#input\_runner\_ingress\_rules) | Map of Ingress rules for the Runner Manager security group. |
registration_token = optional(string, "__GITLAB_REGISTRATION_TOKEN_FROM_SSM__") # deprecated, removed in 8.0.0
tag_list = optional(string, "") # deprecated, removed in 8.0.0
description = optional(string, "") # deprecated, removed in 8.0.0
type = optional(string, "") # mandatory if gitlab_runner_version >= 16.0.0 # deprecated, removed in 8.0.0
group_id = optional(string, "") # mandatory if type is group # deprecated, removed in 8.0.0
project_id = optional(string, "") # mandatory if type is project # deprecated, removed in 8.0.0
locked_to_project = optional(string, "") # deprecated, removed in 8.0.0
run_untagged = optional(string, "") # deprecated, removed in 8.0.0
maximum_timeout = optional(string, "") # deprecated, removed in 8.0.0
access_level = optional(string, "not_protected") # this is the only mandatory field calling the GitLab get token for executor operation # deprecated, removed in 8.0.0
})
map(object({| `{}` | no | | [runner\_install](#input\_runner\_install) | amazon\_ecr\_credential\_helper = Install amazon-ecr-credential-helper inside `userdata_pre_install` script
from_port = optional(number, null)
to_port = optional(number, null)
protocol = string
description = string
cidr_block = optional(string, null)
ipv6_cidr_block = optional(string, null)
prefix_list_id = optional(string, null)
security_group = optional(string, null)
}))
object({| `{}` | no | | [runner\_instance](#input\_runner\_instance) | additional\_tags = Map of tags that will be added to the Runner instance.
amazon_ecr_credential_helper = optional(bool, false)
docker_machine_download_url = optional(string, "")
docker_machine_version = optional(string, "0.16.2-gitlab.19-cki.5")
pre_install_script = optional(string, "")
post_install_script = optional(string, "")
start_script = optional(string, "")
yum_update = optional(bool, true)
})
object({|
additional_tags = optional(map(string))
collect_autoscaling_metrics = optional(list(string), null)
ebs_optimized = optional(bool, true)
max_lifetime_seconds = optional(number, null)
monitoring = optional(bool, true)
name = string
name_prefix = optional(string)
private_address_only = optional(bool, true)
root_device_config = optional(map(string), {})
spot_price = optional(string, null)
ssm_access = optional(bool, false)
type = optional(string, "t3.micro")
use_eip = optional(bool, false)
})
{| no | | [runner\_manager](#input\_runner\_manager) | For details check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section
"name": "gitlab-runner"
}
object({| `{}` | no | | [runner\_metadata\_options](#input\_runner\_metadata\_options) | Enable the Runner instance metadata service. IMDSv2 is enabled by default. |
gitlab_check_interval = optional(number, 3)
maximum_concurrent_jobs = optional(number, 10)
prometheus_listen_address = optional(string, "")
sentry_dsn = optional(string, "__SENTRY_DSN_REPLACED_BY_USER_DATA__")
})
object({|
http_endpoint = string
http_tokens = string
http_put_response_hop_limit = number
instance_metadata_tags = string
})
{| no | | [runner\_networking](#input\_runner\_networking) | allow\_incoming\_ping = Allow ICMP Ping to the Runner. Specify `allow_incoming_ping_security_group_ids` too!
"http_endpoint": "enabled",
"http_put_response_hop_limit": 2,
"http_tokens": "required",
"instance_metadata_tags": "disabled"
}
object({| `{}` | no | -| [runner\_networking\_egress\_rules](#input\_runner\_networking\_egress\_rules) | List of egress rules for the Runner. |
allow_incoming_ping = optional(bool, false)
allow_incoming_ping_security_group_ids = optional(list(string), [])
security_group_description = optional(string, "A security group containing gitlab-runner agent instances")
security_group_ids = optional(list(string), [])
})
list(object({|
cidr_blocks = list(string)
ipv6_cidr_blocks = list(string)
prefix_list_ids = list(string)
from_port = number
protocol = string
security_groups = list(string)
self = bool
to_port = number
description = string
}))
[| no | | [runner\_role](#input\_runner\_role) | additional\_tags = Map of tags that will be added to the role created. Useful for tag based authorization.
{
"cidr_blocks": [
"0.0.0.0/0"
],
"description": null,
"from_port": 0,
"ipv6_cidr_blocks": [
"::/0"
],
"prefix_list_ids": null,
"protocol": "-1",
"security_groups": null,
"self": null,
"to_port": 0
}
]
object({| `{}` | no | | [runner\_schedule\_config](#input\_runner\_schedule\_config) | Map containing the configuration of the ASG scale-out and scale-in for the Runner. Will only be used if `runner_schedule_enable` is set to `true`. | `map(any)` |
additional_tags = optional(map(string))
allow_iam_service_linked_role_creation = optional(bool, true)
assume_role_policy_json = optional(string, "")
create_role_profile = optional(bool, true)
policy_arns = optional(list(string), [])
role_profile_name = optional(string)
})
{| no | | [runner\_schedule\_enable](#input\_runner\_schedule\_enable) | Set to `true` to enable the auto scaling group schedule for the Runner. | `bool` | `false` | no | @@ -207,24 +214,23 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | [runner\_terminate\_ec2\_lifecycle\_timeout\_duration](#input\_runner\_terminate\_ec2\_lifecycle\_timeout\_duration) | Amount of time in seconds to wait for GitLab Runner to finish picked up jobs. Defaults to the `maximum_timeout` configured + `5m`. Maximum allowed is `7200` (2 hours) | `number` | `null` | no | | [runner\_terminate\_ec2\_timeout\_duration](#input\_runner\_terminate\_ec2\_timeout\_duration) | Timeout in seconds for the graceful terminate worker Lambda function. | `number` | `90` | no | | [runner\_terraform\_timeout\_delete\_asg](#input\_runner\_terraform\_timeout\_delete\_asg) | Timeout when trying to delete the Runner ASG. | `string` | `"10m"` | no | -| [runner\_worker](#input\_runner\_worker) | For detailed information, check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section.
"scale_in_count": 0,
"scale_in_recurrence": "0 18 * * 1-5",
"scale_in_time_zone": "Etc/UTC",
"scale_out_count": 1,
"scale_out_recurrence": "0 8 * * 1-5",
"scale_out_time_zone": "Etc/UTC"
}
object({| `{}` | no | -| [runner\_worker\_cache](#input\_runner\_worker\_cache) | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared
environment_variables = optional(list(string), [])
max_jobs = optional(number, 0)
output_limit = optional(number, 4096)
request_concurrency = optional(number, 1)
ssm_access = optional(bool, false)
type = optional(string, "docker+machine")
})
object({| `{}` | no | +| [runner\_worker](#input\_runner\_worker) | For detailed information, check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section.
access_log_bucket_id = optional(string, null)
access_log_bucket_prefix = optional(string, null)
authentication_type = optional(string, "iam")
bucket = optional(string, "")
bucket_prefix = optional(string, "")
create = optional(bool, true)
create_aws_s3_bucket_public_access_block = optional(bool, true)
expiration_days = optional(number, 1)
include_account_id = optional(bool, true)
policy = optional(string, "")
random_suffix = optional(bool, false)
shared = optional(bool, false)
versioning = optional(bool, false)
})
object({| `{}` | no | +| [runner\_worker\_cache](#input\_runner\_worker\_cache) | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared
environment_variables = optional(list(string), [])
max_jobs = optional(number, 0)
output_limit = optional(number, 4096)
request_concurrency = optional(number, 1)
ssm_access = optional(bool, false)
type = optional(string, "docker+machine")
# false positive, use_private_key is not a secret
# kics-scan ignore-line
use_private_key = optional(bool, false)
})
object({| `{}` | no | | [runner\_worker\_docker\_add\_dind\_volumes](#input\_runner\_worker\_docker\_add\_dind\_volumes) | Add certificates and docker.sock to the volumes to support docker-in-docker (dind) | `bool` | `false` | no | -| [runner\_worker\_docker\_autoscaler](#input\_runner\_worker\_docker\_autoscaler) | fleeting\_plugin\_version = The version of aws fleeting plugin
access_log_bucket_id = optional(string, null)
access_log_bucket_prefix = optional(string, null)
authentication_type = optional(string, "iam")
bucket = optional(string, "")
bucket_prefix = optional(string, "")
create = optional(bool, true)
create_aws_s3_bucket_public_access_block = optional(bool, true)
expiration_days = optional(number, 1)
include_account_id = optional(bool, true)
policy = optional(string, "")
random_suffix = optional(bool, false)
shared = optional(bool, false)
versioning = optional(bool, false)
})
object({| `{}` | no | +| [runner\_worker\_docker\_autoscaler](#input\_runner\_worker\_docker\_autoscaler) | fleeting\_plugin\_version = The version of aws fleeting plugin.
fleeting_plugin_version = optional(string, "1.0.0")
connector_config_user = optional(string, "ec2-user")
key_pair_name = optional(string, "runner-worker-key")
capacity_per_instance = optional(number, 1)
max_use_count = optional(number, 100)
update_interval = optional(string, "1m")
update_interval_when_expecting = optional(string, "2s")
instance_ready_command = optional(string, "")
})
object({| `{}` | no | | [runner\_worker\_docker\_autoscaler\_ami\_filter](#input\_runner\_worker\_docker\_autoscaler\_ami\_filter) | List of maps used to create the AMI filter for the Runner Worker (autoscaler). | `map(list(string))` |
fleeting_plugin_version = optional(string, "1.0.0")
connector_config_user = optional(string, "ec2-user")
key_pair_name = optional(string, "runner-worker-key")
capacity_per_instance = optional(number, 1)
max_use_count = optional(number, 100)
update_interval = optional(string, "1m")
update_interval_when_expecting = optional(string, "2s")
instance_ready_command = optional(string, "")
})
{| no | | [runner\_worker\_docker\_autoscaler\_ami\_id](#input\_runner\_worker\_docker\_autoscaler\_ami\_id) | The ID of the AMI to use for the Runner Worker (autoscaler). | `string` | `""` | no | | [runner\_worker\_docker\_autoscaler\_ami\_owners](#input\_runner\_worker\_docker\_autoscaler\_ami\_owners) | The list of owners used to select the AMI of the Runner Worker (autoscaler). | `list(string)` |
"name": [
"ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"
]
}
[| no | -| [runner\_worker\_docker\_autoscaler\_asg](#input\_runner\_worker\_docker\_autoscaler\_asg) | enable\_mixed\_instances\_policy = Make use of autoscaling-group mixed\_instances\_policy capacities to leverage pools and spot instances.
"099720109477"
]
object({| `{}` | no | +| [runner\_worker\_docker\_autoscaler\_asg](#input\_runner\_worker\_docker\_autoscaler\_asg) | enabled\_metrics = List of metrics to collect.
enable_mixed_instances_policy = optional(bool, false)
health_check_grace_period = optional(number, 300)
health_check_type = optional(string, "EC2")
instance_refresh_min_healthy_percentage = optional(number, 90)
instance_refresh_triggers = optional(list(string), [])
max_growth_rate = optional(number, 0)
on_demand_base_capacity = optional(number, 0)
on_demand_percentage_above_base_capacity = optional(number, 100)
profile_name = optional(string, "")
spot_allocation_strategy = optional(string, "lowest-price")
spot_instance_pools = optional(number, 2)
subnet_ids = optional(list(string), [])
types = optional(list(string), ["m5.large"])
upgrade_strategy = optional(string, "rolling")
enabled_metrics = optional(list(string), [])
sg_ingresses = optional(list(object({
description = string
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
})), [])
})
object({| `{}` | no | | [runner\_worker\_docker\_autoscaler\_autoscaling\_options](#input\_runner\_worker\_docker\_autoscaler\_autoscaling\_options) | Set autoscaling parameters based on periods, see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersautoscalerpolicy-sections |
enabled_metrics = optional(list(string), [])
enable_mixed_instances_policy = optional(bool, false)
health_check_grace_period = optional(number, 300)
health_check_type = optional(string, "EC2")
instance_refresh_min_healthy_percentage = optional(number, 90)
instance_refresh_triggers = optional(list(string), [])
on_demand_base_capacity = optional(number, 0)
on_demand_percentage_above_base_capacity = optional(number, 100)
spot_allocation_strategy = optional(string, "lowest-price")
spot_instance_pools = optional(number, 2)
subnet_ids = optional(list(string), [])
types = optional(list(string), ["m5.large"])
upgrade_strategy = optional(string, "rolling")
})
list(object({| `[]` | no | -| [runner\_worker\_docker\_autoscaler\_instance](#input\_runner\_worker\_docker\_autoscaler\_instance) | ebs\_optimized = Enable EBS optimization for the Runner Worker.
periods = list(string)
timezone = optional(string, "UTC")
idle_count = optional(number)
idle_time = optional(string)
scale_factor = optional(number)
scale_factor_limit = optional(number, 0)
}))
object({| `{}` | no | +| [runner\_worker\_docker\_autoscaler\_instance](#input\_runner\_worker\_docker\_autoscaler\_instance) | ebs\_optimized = Enable EBS optimization for the Runner Worker.
ebs_optimized = optional(bool, true)
http_tokens = optional(string, "required")
http_put_response_hop_limit = optional(number, 2)
monitoring = optional(bool, false)
private_address_only = optional(bool, true)
root_device_name = optional(string, "/dev/sda1")
root_size = optional(number, 8)
start_script = optional(string, "")
volume_type = optional(string, "gp2")
volume_throughput = optional(number, 125)
volume_iops = optional(number, 3000)
})
object({| `{}` | no | | [runner\_worker\_docker\_autoscaler\_role](#input\_runner\_worker\_docker\_autoscaler\_role) | additional\_tags = Map of tags that will be added to the Runner Worker.
ebs_optimized = optional(bool, true)
http_tokens = optional(string, "required")
http_put_response_hop_limit = optional(number, 2)
monitoring = optional(bool, false)
private_address_only = optional(bool, true)
root_device_name = optional(string, "/dev/sda1")
root_size = optional(number, 8)
start_script = optional(string, "")
volume_type = optional(string, "gp2")
volume_throughput = optional(number, 125)
volume_iops = optional(number, 3000)
})
object({| `{}` | no | -| [runner\_worker\_docker\_machine\_ami\_filter](#input\_runner\_worker\_docker\_machine\_ami\_filter) | List of maps used to create the AMI filter for the Runner Worker (docker-machine). | `map(list(string))` |
additional_tags = optional(map(string), {})
assume_role_policy_json = optional(string, "")
policy_arns = optional(list(string), [])
profile_name = optional(string, "")
})
{| no | +| [runner\_worker\_docker\_machine\_ami\_filter](#input\_runner\_worker\_docker\_machine\_ami\_filter) | List of maps used to create the AMI filter for the Runner Worker (docker-machine). | `map(list(string))` |
"name": [
"ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server*"
]
}
{| no | | [runner\_worker\_docker\_machine\_ami\_id](#input\_runner\_worker\_docker\_machine\_ami\_id) | The ID of the AMI to use for the Runner Worker (docker-machine). | `string` | `""` | no | | [runner\_worker\_docker\_machine\_ami\_owners](#input\_runner\_worker\_docker\_machine\_ami\_owners) | The list of owners used to select the AMI of the Runner Worker (docker-machine). | `list(string)` |
"name": [
"ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"
]
}
[| no | | [runner\_worker\_docker\_machine\_autoscaling\_options](#input\_runner\_worker\_docker\_machine\_autoscaling\_options) | Set autoscaling parameters based on periods, see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section |
"099720109477"
]
list(object({| `[]` | no | | [runner\_worker\_docker\_machine\_ec2\_metadata\_options](#input\_runner\_worker\_docker\_machine\_ec2\_metadata\_options) | Enable the Runner Worker metadata service. Requires you use CKI maintained docker machines. |
periods = list(string)
idle_count = optional(number)
idle_scale_factor = optional(number)
idle_count_min = optional(number)
idle_time = optional(number)
timezone = optional(string, "UTC")
}))
object({|
http_tokens = string
http_put_response_hop_limit = number
})
{| no | | [runner\_worker\_docker\_machine\_ec2\_options](#input\_runner\_worker\_docker\_machine\_ec2\_options) | List of additional options for the docker+machine config. Each element of this list must be a key=value pair. E.g. '["amazonec2-zone=a"]' | `list(string)` | `[]` | no | -| [runner\_worker\_docker\_machine\_extra\_egress\_rules](#input\_runner\_worker\_docker\_machine\_extra\_egress\_rules) | List of egress rules for the Runner Workers. |
"http_put_response_hop_limit": 2,
"http_tokens": "required"
}
list(object({|
cidr_blocks = list(string)
ipv6_cidr_blocks = list(string)
prefix_list_ids = list(string)
from_port = number
protocol = string
security_groups = list(string)
self = bool
to_port = number
description = string
}))
[| no | | [runner\_worker\_docker\_machine\_fleet](#input\_runner\_worker\_docker\_machine\_fleet) | enable = Activates the fleet mode on the Runner. https://gitlab.com/cki-project/docker-machine/-/blob/v0.16.2-gitlab.19-cki.2/docs/drivers/aws.md#fleet-mode
{
"cidr_blocks": [
"0.0.0.0/0"
],
"description": "Allow all egress traffic for Runner Workers.",
"from_port": 0,
"ipv6_cidr_blocks": [
"::/0"
],
"prefix_list_ids": null,
"protocol": "-1",
"security_groups": null,
"self": null,
"to_port": 0
}
]
object({|
enable = bool
key_pair_name = optional(string, "fleet-key")
})
{| no | | [runner\_worker\_docker\_machine\_instance](#input\_runner\_worker\_docker\_machine\_instance) | For detailed documentation check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section
"enable": false
}
object({| `{}` | no | | [runner\_worker\_docker\_machine\_instance\_spot](#input\_runner\_worker\_docker\_machine\_instance\_spot) | enable = Enable spot instances for the Runner Worker.
destroy_after_max_builds = optional(number, 0)
docker_registry_mirror_url = optional(string, "")
ebs_optimized = optional(bool, true)
idle_count = optional(number, 0)
idle_time = optional(number, 600)
max_growth_rate = optional(number, 0)
monitoring = optional(bool, false)
name_prefix = optional(string, "")
private_address_only = optional(bool, true)
root_device_name = optional(string, "/dev/sda1")
root_size = optional(number, 8)
start_script = optional(string, "")
subnet_ids = optional(list(string), [])
types = optional(list(string), ["m5.large"])
volume_type = optional(string, "gp2")
volume_throughput = optional(number, 125)
volume_iops = optional(number, 3000)
})
object({| `{}` | no | @@ -234,7 +240,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | [runner\_worker\_docker\_services](#input\_runner\_worker\_docker\_services) | Starts additional services with the Docker container. All fields must be set (examine the Dockerfile of the service image for the entrypoint - see ./examples/runner-default/main.tf) |
enable = optional(bool, true)
max_price = optional(string, "on-demand-price")
})
list(object({| `[]` | no | | [runner\_worker\_docker\_services\_volumes\_tmpfs](#input\_runner\_worker\_docker\_services\_volumes\_tmpfs) | Mount a tmpfs in gitlab service container. https://docs.gitlab.com/runner/executors/docker.html#mounting-a-directory-in-ram |
name = string
alias = string
entrypoint = list(string)
command = list(string)
}))
list(object({| `[]` | no | | [runner\_worker\_docker\_volumes\_tmpfs](#input\_runner\_worker\_docker\_volumes\_tmpfs) | Mount a tmpfs in Executor container. https://docs.gitlab.com/runner/executors/docker.html#mounting-a-directory-in-ram |
volume = string
options = string
}))
list(object({| `[]` | no | +| [runner\_worker\_egress\_rules](#input\_runner\_worker\_egress\_rules) | Map of egress rules for the Runner workers |
volume = string
options = string
}))
map(object({|
from_port = optional(number, null)
to_port = optional(number, null)
protocol = string
description = string
cidr_block = optional(string, null)
ipv6_cidr_block = optional(string, null)
prefix_list_id = optional(string, null)
security_group = optional(string, null)
}))
{| no | | [runner\_worker\_gitlab\_pipeline](#input\_runner\_worker\_gitlab\_pipeline) | post\_build\_script = Script to execute in the pipeline just after the build, but before executing after\_script.
"allow_https_ipv4": {
"cidr_block": "0.0.0.0/0",
"description": "Allow HTTPS egress traffic to all destinations (IPv4)",
"from_port": 443,
"protocol": "tcp",
"to_port": 443
},
"allow_https_ipv6": {
"description": "Allow HTTPS egress traffic to all destinations (IPv6)",
"from_port": 443,
"ipv6_cidr_block": "::/0",
"protocol": "tcp",
"to_port": 443
},
"allow_ssh_ipv4": {
"cidr_block": "0.0.0.0/0",
"description": "Allow SSH egress traffic to all destinations (IPv4)",
"from_port": 22,
"protocol": "tcp",
"to_port": 22
},
"allow_ssh_ipv6": {
"description": "Allow SSH egress traffic to all destinations (IPv6)",
"from_port": 22,
"ipv6_cidr_block": "::/0",
"protocol": "tcp",
"to_port": 22
}
}
object({| `{}` | no | +| [runner\_worker\_ingress\_rules](#input\_runner\_worker\_ingress\_rules) | Map of ingress rules for the Runner workers |
post_build_script = optional(string, "\"\"")
pre_build_script = optional(string, "\"\"")
pre_clone_script = optional(string, "\"\"")
})
map(object({| `{}` | no | | [security\_group\_prefix](#input\_security\_group\_prefix) | Set the name prefix and overwrite the `Name` tag for all security groups. | `string` | `""` | no | | [subnet\_id](#input\_subnet\_id) | Subnet id used for the Runner and Runner Workers. Must belong to the `vpc_id`. In case the fleet mode is used, multiple subnets for
from_port = optional(number, null)
to_port = optional(number, null)
protocol = string
description = string
cidr_block = optional(string, null)
ipv6_cidr_block = optional(string, null)
prefix_list_id = optional(string, null)
security_group = optional(string, null)
}))