@@ -7,6 +7,8 @@ resource "random_id" "random" {
77 byte_length = 20
88}
99
10+ data "aws_caller_identity" "current" {}
11+
1012module "runners" {
1113 source = " ../../"
1214
@@ -35,14 +37,25 @@ module "runners" {
3537 # enable access to the runners via SSM
3638 enable_ssm_on_runners = true
3739
38- runner_run_as = " ubuntu"
40+ runner_run_as = " ubuntu"
41+
42+ # AMI selection and userdata
43+ #
44+ # option 1. configure your pre-built AMI + userdata
3945 userdata_template = " ./templates/user-data.sh"
4046 ami_owners = [" 099720109477" ] # Canonical's Amazon account ID
4147
4248 ami_filter = {
4349 name = [" ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" ]
4450 }
4551
52+ # Custom build AMI, no custom userdata needed.
53+ # option 2: Build custom AMI see ../../images/ubuntu-focal
54+ # disable lines above (option 1) and enable the ones below
55+ # ami_filter = { name = ["github-runner-ubuntu-focal-amd64-*"] }
56+ # ami_owners = [data.aws_caller_identity.current.account_id]
57+
58+
4659 block_device_mappings = {
4760 # Set the block device name for Ubuntu root device
4861 device_name = " /dev/sda1"
@@ -69,6 +82,11 @@ module "runners" {
6982 }
7083 ]
7184
85+ # Uncomment to enable ephemeral runners
86+ # delay_webhook_event = 0
87+ # enable_ephemeral_runners = true
88+ # enabled_userdata = false
89+
7290 # Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
7391 # idle_config = [{
7492 # cron = "* * 9-17 * * *"
0 commit comments