Skip to content

Commit

Permalink
Add infrastructure deployments for EU and AP (#89)
Browse files Browse the repository at this point in the history
* Fix infrastructure deployments for different regions

* Add versions.tf

* Add infrastructure deployments for eu and ap
  • Loading branch information
klejejs authored Sep 25, 2024
1 parent 4820f10 commit 4485ecf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ module "us_east_1" {
ecs_policy = aws_iam_instance_profile.ecs_instance_profile.arn
network_cidr = var.network_cidr["us-east-1"]
}

module "eu_central_1" {
source = "./region"
region = "eu-central-1"
ecs_policy = aws_iam_instance_profile.ecs_instance_profile.arn
network_cidr = var.network_cidr["eu-central-1"]
}

module "ap_southeast_1" {
source = "./region"
region = "ap-southeast-1"
ecs_policy = aws_iam_instance_profile.ecs_instance_profile.arn
network_cidr = var.network_cidr["ap-southeast-1"]
}
20 changes: 20 additions & 0 deletions infrastructure/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ output "us-east-1" {
"network_id" : module.us_east_1.network_id,
}
}

output "eu-central-1" {
description = "Outputs for the eu-central-1 region"
value = {
"public_subnets" : module.eu_central_1.public_subnets,
"private_subnets" : module.eu_central_1.private_subnets,
"ecs_cluster" : module.eu_central_1.ecs_cluster,
"network_id" : module.eu_central_1.network_id,
}
}

output "ap-southeast-1" {
description = "Outputs for the ap-southeast-1 region"
value = {
"public_subnets" : module.ap_southeast_1.public_subnets,
"private_subnets" : module.ap_southeast_1.private_subnets,
"ecs_cluster" : module.ap_southeast_1.ecs_cluster,
"network_id" : module.ap_southeast_1.network_id,
}
}
3 changes: 3 additions & 0 deletions infrastructure/region/module.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
provider "aws" {
region = var.region
}

0 comments on commit 4485ecf

Please sign in to comment.