-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
36 lines (34 loc) · 1.57 KB
/
main.tf
File metadata and controls
36 lines (34 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
data "sops_file" "secret_vars" {
source_file = "${path.module}/secrets/secrets.yaml"
}
locals {
# Use direct mirror that provides Content-Length header (required by libvirt provider)
boot_image_url = "https://dl.fedoraproject.org/pub/fedora/linux/releases/43/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-43-1.6.x86_64.qcow2?v=3"
}
module "runner" {
source = "git::https://github.com/makeitworkcloud/terraform-libvirt-domain.git"
name = "runner"
description = "GitHub Actions self-hosted runner"
memory = 8192
boot_image_url = local.boot_image_url
extra_volumes = [
{
name = "runner-var-lib-docker.qcow2"
size = 107374182400 # 100 GiB
},
{
name = "runner-opt-actions-runner.qcow2"
size = 32212254720 # 30 GiB
}
]
cloudinit_meta_data_template = "${path.module}/cloud-init/meta_data.cfg"
cloudinit_meta_data_vars = { hostname = "runner" }
cloudinit_user_data_template = "${path.module}/cloud-init/runner/cloud_init.cfg"
cloudinit_user_data_vars = { ssh_authorized_key = data.sops_file.secret_vars.data["ssh_admin_pubkey"] }
cloudinit_network_config_template = "${path.module}/cloud-init/network_config.cfg"
cloudinit_network_config_vars = { private_ip_addr = data.sops_file.secret_vars.data["runner_ip_addr"] }
private_ip_addr = data.sops_file.secret_vars.data["runner_ip_addr"]
proxyhost = data.sops_file.secret_vars.data["proxyhost"]
enable_aap = true
aap_inventory_name = "libvirt"
}