diff --git a/terraform/main.tf b/terraform/main.tf index aa92978..dda419f 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -7,7 +7,7 @@ resource "aws_instance" "gitea" { # ami = data.aws_ami.amazon-linux-2.id ami = "ami-0adec96dc0cdc7bca" instance_type = "t4g.nano" - subnet_id = module.vpc.private_subnets[0] + subnet_id = var.subnet user_data = file("install.sh") user_data_replace_on_change = true diff --git a/terraform/variables.tf b/terraform/variables.tf index 6add0e5..75e36f2 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -16,4 +16,9 @@ variable "boot_key" { variable "boot_role" { type = string description = "The name of the role for boot access." +} + +variable "subnet" { + type = string + description = "The ID of the subnet that the instance will be housed in." } \ No newline at end of file