@@ -7,6 +7,8 @@ resource "random_id" "random" {
7
7
byte_length = 20
8
8
}
9
9
10
+ data "aws_caller_identity" "current" {}
11
+
10
12
module "runners" {
11
13
source = " ../../"
12
14
@@ -35,14 +37,25 @@ module "runners" {
35
37
# enable access to the runners via SSM
36
38
enable_ssm_on_runners = true
37
39
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
39
45
userdata_template = " ./templates/user-data.sh"
40
46
ami_owners = [" 099720109477" ] # Canonical's Amazon account ID
41
47
42
48
ami_filter = {
43
49
name = [" ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" ]
44
50
}
45
51
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
+
46
59
block_device_mappings = {
47
60
# Set the block device name for Ubuntu root device
48
61
device_name = " /dev/sda1"
@@ -69,6 +82,11 @@ module "runners" {
69
82
}
70
83
]
71
84
85
+ # Uncomment to enable ephemeral runners
86
+ # delay_webhook_event = 0
87
+ # enable_ephemeral_runners = true
88
+ # enabled_userdata = false
89
+
72
90
# Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
73
91
# idle_config = [{
74
92
# cron = "* * 9-17 * * *"
0 commit comments