Skip to content

Commit

Permalink
add: load_balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
ghannay10 committed Apr 17, 2024
1 parent 844a707 commit 3ad412b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infrastructure/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ module "ecs" {
vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id
private_subnets = data.terraform_remote_state.vpc.outputs.private_subnets
container_port = "8000"
load_balancer_security_group = data.terraform_remote_state.platform.outputs.load_balancer_security_group_id["default"]
aws_lb_arn = data.terraform_remote_state.platform.outputs.load_balancer_arn["default"]
load_balancer_security_group = module.load_balancer.load_balancer_security_group_id["default"]
aws_lb_arn = module.load_balancer.alb_arn["default"]
host = local.host
route53_record_name = aws_route53_record.type_a_record.name

ip_whitelist = var.external_ips
}


Expand Down
13 changes: 13 additions & 0 deletions infrastructure/load_balancer.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module "load_balancer" {
source = "../../i-ai-core-infrastructure/modules/load_balancer"
project = var.project_name
region = var.region
state_bucket = var.state_bucket
account_id = var.account_id
vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id
public_subnets = data.terraform_remote_state.vpc.outputs.public_subnets
certificate_arn = data.terraform_remote_state.universal.outputs.certificate_arn
internal_user_ips = var.internal_ips
developer_ips = var.developer_ips
env = var.env
}
5 changes: 5 additions & 0 deletions infrastructure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ variable "hosted_zone_id" {
description = "Route 53 Hosted Zone"
}

variable "internal_ips" {
type = list(string)
description = "IP's of No10 and CO"
}

variable "image_tag" {
type = string
description = "The tag of the image to use"
Expand Down

0 comments on commit 3ad412b

Please sign in to comment.