29 lines
654 B
HCL
29 lines
654 B
HCL
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"
|
|
}
|
|
} |