Skip to content

Commit

Permalink
add nlb
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Feb 9, 2024
1 parent 04168f2 commit 53ab13a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
module "ecs" {
source = "github.com/ministryofjustice/modernisation-platform-terraform-ecs-cluster//cluster?ref=d3655d31c889272621066ac6b249ceadb7d23e3d"
source = "github.com/ministryofjustice/modernisation-platform-terraform-ecs-cluster//cluster?ref=c195026bcf0a1958fa4d3cc2efefc56ed876507e"

environment = var.env_name
namespace = var.app_name
name = "cluster"

private_dns_namespace_enabled = true

vpc_id = var.account_info.vpc_id

tags = local.tags
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
resource "aws_lb" "delius_microservices" {
name = "delius-microservices"
internal = true
load_balancer_type = "network"
security_groups = [aws_security_group.delius_microservices_nlb.id]
subnets = var.account_config.private_subnet_ids
enable_deletion_protection = true
tags = merge({
Name = "delius-microservices-nlb"
}, var.tags)
}

resource "aws_security_group" "delius_microservices_nlb" {
name = "delius-microservices-nlb"
description = "Security group for delius microservices network load balancer"
vpc_id = var.account_info.vpc_id
tags = merge({
Name = "delius-microservices-nlb"
}, var.tags)
}

resource "aws_vpc_security_group_ingress_rule" "from_bastion" {
referenced_security_group_id = module.bastion_linux.bastion_security_group
ip_protocol = "-1"
security_group_id = aws_security_group.delius_microservices_nlb.id
}

0 comments on commit 53ab13a

Please sign in to comment.