Skip to content

Commit

Permalink
cleaning up main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Sep 18, 2024
1 parent 4bf6cff commit 7734288
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,34 +73,28 @@ 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,
"ecs-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
]
Expand Down

0 comments on commit 7734288

Please sign in to comment.