feat: runner infrastructure is built

This commit is contained in:
2025-02-13 15:50:39 -05:00
parent a1844458b0
commit 829df54ae9
9 changed files with 150 additions and 0 deletions

29
terraform/main.tf Normal file
View File

@@ -0,0 +1,29 @@
data "aws_subnet" "public" {
tags = { SubnetOf = "Main", SubnetType = "Public" }
}
# An instance profile for access via AWS SSM.
data "aws_iam_instance_profile" "ssm" {
name = "SSMInstanceProfile"
}
# The Gitea Runner instance.
resource "aws_instance" "this" {
ami = "ami-0adec96dc0cdc7bca"
instance_type = "t4g.nano"
subnet_id = data.aws_subnet.public.id
user_data = file("install.sh")
user_data_replace_on_change = true
iam_instance_profile = data.aws_iam_instance_profile.ssm.name
root_block_device {
volume_type = "gp3"
volume_size = 8
}
tags = {
Name = "Codebase: Runner"
}
}