Skip to content

Commit

Permalink
feat: add extra_hosts to config.toml (#547)
Browse files Browse the repository at this point in the history
* Update runner-config.tpl

* Update variables.tf

* Update main.tf

* Update variables.tf

* Update runner-config.tpl
  • Loading branch information
veshant authored Oct 9, 2022
1 parent a8fec40 commit 1491698
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ locals {
aws_region = var.aws_region
gitlab_url = var.runners_gitlab_url
gitlab_clone_url = var.runners_clone_url
runners_extra_hosts = var.runners_extra_hosts
runners_vpc_id = var.vpc_id
runners_subnet_id = length(var.subnet_id) > 0 ? var.subnet_id : var.subnet_id_runners
runners_aws_zone = data.aws_availability_zone.runners.name_suffix
Expand Down
1 change: 1 addition & 0 deletions template/runner-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ listen_address = "${prometheus_listen_address}"
privileged = ${runners_privileged}
disable_cache = ${runners_disable_cache}
volumes = ["/cache"${runners_additional_volumes}]
extra_hosts = ${jsonencode(runners_extra_hosts)}
shm_size = ${runners_shm_size}
pull_policy = "${runners_pull_policy}"
runtime = "${runners_docker_runtime}"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ variable "runners_additional_volumes" {
default = []
}

variable "runners_extra_hosts" {
description = "Extra hosts that will be used in the runner config.toml, e.g other-host:127.0.0.1"
type = list(any)
default = []
}

variable "runners_shm_size" {
description = "shm_size for the runners, will be used in the runner config.toml"
type = number
Expand Down

0 comments on commit 1491698

Please sign in to comment.