Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Terraform Initialize
working-directory: ChatInfra
working-directory: ChatInfra/environments/dev
run: terraform init -backend=false

- name: Terraform validate
working-directory: ChatInfra
working-directory: ChatInfra/environments/dev
run: terraform validate

# If terraform is valid check terraform formatting
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Check formatting
working-directory: ChatInfra
working-directory: ChatInfra/environments/dev
run: terraform fmt -recursive -check

# If terraform format is valid check server formatting
Expand Down
22 changes: 11 additions & 11 deletions ChatInfra/main.tf → ChatInfra/environments/dev/main.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module "vpc" {
source = "./modules/vpc"
source = "../../modules/vpc"
project_name = var.project_name
}

module "security_groups" {
source = "./modules/security_groups"
source = "../../modules/security_groups"
project_name = var.project_name
vpc_id = module.vpc.vpc_id
}

module "alb" {
source = "./modules/alb"
source = "../../modules/alb"
project_name = var.project_name
vpc_id = module.vpc.vpc_id
alb_sg_id = module.security_groups.alb_sg_id
Expand All @@ -20,35 +20,35 @@ module "alb" {
}

module "dynamodb" {
source = "./modules/dynamodb"
source = "../../modules/dynamodb"
project_name = var.project_name
}

module "rds" {
source = "./modules/rds"
source = "../../modules/rds"
project_name = var.project_name
db_name = var.db_name
private_subnet_ids = module.vpc.private_subnets
rds_sg_id = module.security_groups.rds_sg_id
}

module "elasticache" {
source = "./modules/elasticache"
source = "../../modules/elasticache"
project_name = var.project_name
private_subnet_ids = module.vpc.private_subnets
elasticache_sg_id = module.security_groups.elasticache_sg_id
}

module "secrets" {
source = "./modules/secrets"
source = "../../modules/secrets"
project_name = var.project_name
db_name = var.db_name
db_password = module.rds.db_password
db_address = module.rds.db_address
}

module "ecs" {
source = "./modules/ecs"
source = "../../modules/ecs"
project_name = var.project_name
region = var.aws_region
db_secret_arn = module.secrets.db_secret_arn
Expand All @@ -58,19 +58,19 @@ module "ecs" {
}

module "static_site" {
source = "./modules/static_site"
source = "../../modules/static_site"
project_name = var.project_name
alb_dns_name = module.alb.public_alb_dns_name
chatserver_nlb_dns_name = module.alb.chatserver_nlb_dns_name
}

module "cloudtrail" {
source = "./modules/cloudtrail"
source = "../../modules/cloudtrail"
project_name = var.project_name
}

module "ecs_services" {
source = "./modules/ecs_services"
source = "../../modules/ecs_services"
project_name = var.project_name
region = var.aws_region
cluster_id = module.ecs.cluster_id
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ variable "project_name" {
variable "db_name" {
type = string
default = "chatsystem"
}
}
Loading