diff --git a/README.md b/README.md index d20651caf..968cda13d 100644 --- a/README.md +++ b/README.md @@ -497,6 +497,7 @@ Made with [contributors-img](https://contrib.rocks). | [runners\_request\_concurrency](#input\_runners\_request\_concurrency) | Limit number of concurrent requests for new jobs from GitLab (default 1). | `number` | `1` | no | | [runners\_request\_spot\_instance](#input\_runners\_request\_spot\_instance) | Whether or not to request spot instances via docker-machine | `bool` | `true` | no | | [runners\_root\_size](#input\_runners\_root\_size) | Runner instance root size in GB. | `number` | `16` | no | +| [runners\_volume\_type](#input\_runners\_volume\_type_) | Runner instance volume type. | `string` | `gp2` | no | | [runners\_services\_volumes\_tmpfs](#input\_runners\_services\_volumes\_tmpfs) | Mount a tmpfs in gitlab service container. https://docs.gitlab.com/runner/executors/docker.html#mounting-a-directory-in-ram |
list(object({| `[]` | no | | [runners\_shm\_size](#input\_runners\_shm\_size) | shm\_size for the runners, will be used in the runner config.toml | `number` | `0` | no | | [runners\_token](#input\_runners\_token) | Token for the runner, will be used in the runner config.toml. | `string` | `"__REPLACED_BY_USER_DATA__"` | no | diff --git a/main.tf b/main.tf index b81386edc..dff83e979 100644 --- a/main.tf +++ b/main.tf @@ -112,6 +112,7 @@ locals { runners_max_builds = local.runners_max_builds_string runners_machine_autoscaling = local.runners_machine_autoscaling runners_root_size = var.runners_root_size + runners_volume_type = var.runners_volume_type runners_iam_instance_profile_name = var.runners_iam_instance_profile_name runners_use_private_address_only = var.runners_use_private_address runners_use_private_address = !var.runners_use_private_address diff --git a/template/runner-config.tpl b/template/runner-config.tpl index 10830c407..bf5bddb07 100644 --- a/template/runner-config.tpl +++ b/template/runner-config.tpl @@ -63,6 +63,7 @@ listen_address = "${prometheus_listen_address}" "amazonec2-monitoring=${runners_monitoring}", "amazonec2-iam-instance-profile=%{ if runners_iam_instance_profile_name != "" }${runners_iam_instance_profile_name}%{ else }${runners_instance_profile}%{ endif ~}", "amazonec2-root-size=${runners_root_size}", + "amazonec2-volume-type=${runners_volume_type}", "amazonec2-ami=${runners_ami}" ${docker_machine_options} ] diff --git a/variables.tf b/variables.tf index 0db944fd2..a8f019dc6 100644 --- a/variables.tf +++ b/variables.tf @@ -278,6 +278,12 @@ variable "runners_root_size" { default = 16 } +variable "runners_volume_type" { + description = "Runner instance volume type" + type = string + default = "gp2" +} + variable "runners_iam_instance_profile_name" { description = "IAM instance profile name of the runners, will be used in the runner config.toml" type = string
volume = string
options = string
}))