Skip to content

Commit

Permalink
[DEV-1381] - Create RDS Database Aurora for Strapi (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
maurodandrea authored Feb 26, 2024
1 parent 1323f1e commit 776c942
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .infrastructure/15_database.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# RDS Aurora PostgreSQL Serverless for CMS Strapi
module "cms_rds" {
source = "git::https://github.com/terraform-aws-modules/terraform-aws-rds-aurora.git?ref=7bf5933100eb355b13854232e5d63c62ea7cad35" # v9.0.0

name = "cms-database"
engine = "aurora-postgresql"
engine_mode = "provisioned"
engine_version = "14.6"
database_name = "strapidb"
master_username = "postgres"
master_password = module.secret_cms_database_password.value
vpc_id = module.vpc.vpc_id
db_subnet_group_name = module.vpc.database_subnet_group_name
vpc_security_group_ids = [aws_security_group.cms_database.id]
apply_immediately = true
skip_final_snapshot = true
manage_master_user_password = false
backup_retention_period = 1

serverlessv2_scaling_configuration = {
min_capacity = 0.5
max_capacity = 1
}

instance_class = "db.serverless"
instances = {
one = {}
}
}

0 comments on commit 776c942

Please sign in to comment.