Add staging and prod environment root modules

This commit is contained in:
Philipp Keller 2026-01-23 11:00:00 +00:00
parent f2f452f300
commit 6e6c2127b9
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,29 @@
terraform {
backend "s3" {
bucket = "nexus-tfstate"
key = "prod/terraform.tfstate"
region = "eu-central-1"
dynamodb_table = "nexus-tfstate-lock"
}
}
module "vpc" {
source = "../../modules/vpc"
environment = "prod"
}
module "eks" {
source = "../../modules/eks"
cluster_name = "nexus-prod"
subnet_ids = module.vpc.private_subnet_ids
min_nodes = 3
max_nodes = 8
}
module "rds" {
source = "../../modules/rds"
identifier = "nexus-prod-postgres"
db_name = "nexus"
username = "nexus_app"
subnet_ids = module.vpc.isolated_subnet_ids
}

View file

@ -0,0 +1,21 @@
terraform {
backend "s3" {
bucket = "nexus-tfstate"
key = "staging/terraform.tfstate"
region = "eu-central-1"
dynamodb_table = "nexus-tfstate-lock"
}
}
module "vpc" {
source = "../../modules/vpc"
environment = "staging"
}
module "eks" {
source = "../../modules/eks"
cluster_name = "nexus-staging"
subnet_ids = module.vpc.private_subnet_ids
min_nodes = 2
max_nodes = 4
}