From 9e806d2f6011ec949001e85d4fd81d20da89d1e7 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 11 Jan 2025 22:50:13 -0500 Subject: [PATCH] feat: submit id --- terraform/main.tf | 2 +- terraform/variables.tf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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