From 77342885c738c759a40015da580a954736b6f901 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Wed, 18 Sep 2024 14:43:25 -0400 Subject: [PATCH] cleaning up main.tf --- main.tf | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/main.tf b/main.tf index e6f4754..be2bbb0 100644 --- a/main.tf +++ b/main.tf @@ -73,16 +73,16 @@ module "github-runner" { for_each = toset([for repo in local.all_repos : repo]) source = "HappyPathway/github-runner/ecs" ecs_cluster = aws_ecs_cluster.github-runner.name - hostname = each.value.hostname + hostname = each.value image = "229685449397.dkr.ecr.us-gov-west-1.amazonaws.com/docker-image-pipeline/${var.image_name}:${var.image_version}" repo_org = var.repo_org repo_name = each.value namespace = "${terraform.workspace}-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}" log_group = aws_cloudwatch_log_group.function_log_group.name - runner_group = each.value.runner_group + runner_group = { create = false } server_url = var.server_url runner_labels = [ - each.value.hostname, + each.value, "${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}", data.aws_caller_identity.current.account_id, data.aws_region.current.name, @@ -90,17 +90,11 @@ module "github-runner" { ] certs = var.certs network_configuration = { - subnets = coalescelist( - lookup(each.value, "subnets", var.subnets), - var.subnets - ) - security_groups = coalescelist( - lookup(each.value, "security_groups", var.security_groups), - var.security_groups - ) - assign_public_ip = lookup(each.value, "assign_public_ip", var.assign_public_ip) + subnets = var.subnets + security_groups = var.security_groups + assign_public_ip = var.assign_public_ip } - tag = lookup(each.value, "tag", "github-runner") + tag = "github-runner" depends_on = [ aws_ecs_cluster.github-runner ]