Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESWE-1234 add DPR security gp and configure param groups on dev #29856

Merged
merged 10 commits into from
Feb 21, 2025
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module "rds" {
source = "github.com/ministryofjustice/cloud-platform-terraform-rds-instance?ref=7.2.2"

# Add security group id
vpc_security_group_ids = [data.aws_security_group.mp_dps_sg.id]

# VPC configuration
vpc_name = var.vpc_name

Expand All @@ -26,6 +29,35 @@ module "rds" {
is_production = var.is_production
namespace = var.namespace
team_name = var.team_name

# add parameter group
db_parameter = [
{
name = "rds.logical_replication"
value = "1"
apply_method = "pending-reboot"
},
{
name = "shared_preload_libraries"
value = "pglogical"
apply_method = "pending-reboot"
},
{
name = "max_wal_size"
value = "1024"
apply_method = "immediate"
},
{
name = "wal_sender_timeout"
value = "0"
apply_method = "immediate"
},
{
name = "max_slot_wal_keep_size"
value = "40000"
apply_method = "immediate"
}
]
}

resource "kubernetes_secret" "rds" {
Expand Down Expand Up @@ -55,3 +87,8 @@ resource "kubernetes_config_map" "rds" {
db_identifier = module.rds.db_identifier
}
}

# Retrieve mp_dps_sg_name SG group ID, CP-MP-INGRESS
data "aws_security_group" "mp_dps_sg" {
name = var.mp_dps_sg_name
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ variable "number_cache_clusters" {
variable "eks_cluster_name" {
description = "The name of the eks cluster to retrieve the OIDC information"
}

variable "mp_dps_sg_name" {
type = string
description = "Required for MP DPR Traffic ingress into CP DPS"
default = "cloudplatform-mp-dps-sg"
}
Loading