Skip to content

Commit 79dc67b

Browse files
Updated examples and readme references
1 parent 809b633 commit 79dc67b

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module "rds-pg" {
3232
environment = "prod"
3333
storage_type = "gp3"
3434
replica_enable = false
35+
replica_count = 1
3536
kms_key_arn = "arn:aws:kms:region:2222222222:key/f8c8d802-a34b"
3637
engine_version = "15.2"
3738
instance_class = "db.m5.large"

examples/complete-psql-replica/main.tf

+12-10
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ locals {
77
Expires = "Never"
88
Department = "Engineering"
99
}
10+
family = "postgres15"
1011
vpc_cidr = "10.20.0.0/16"
11-
family = "postgres15"
12+
storage_type = "gp3"
1213
engine_version = "15.2"
1314
current_identity = data.aws_caller_identity.current.arn
1415
allowed_security_groups = ["sg-0a680afd35"]
@@ -25,10 +26,10 @@ module "kms" {
2526

2627
deletion_window_in_days = 7
2728
description = "Complete key example showing various configurations available"
28-
enable_key_rotation = false
29+
enable_key_rotation = true
2930
is_enabled = true
3031
key_usage = "ENCRYPT_DECRYPT"
31-
multi_region = false
32+
multi_region = true
3233

3334
# Policy
3435
enable_default_policy = true
@@ -82,14 +83,15 @@ module "rds-pg" {
8283
source = "squareops/rds-postgresql/aws"
8384
name = local.name
8485
db_name = "postgres"
85-
multi_az = "true"
8686
family = local.family
87-
replica_enable = local.replica_enable
88-
replica_count = local.replica_count
87+
multi_az = "true"
8988
vpc_id = module.vpc.vpc_id
9089
subnet_ids = module.vpc.database_subnets ## db subnets
9190
environment = local.environment
91+
replica_enable = local.replica_enable
92+
replica_count = local.replica_count
9293
kms_key_arn = module.kms.key_arn
94+
storage_type = local.storage_type
9395
engine_version = local.engine_version
9496
instance_class = local.instance_class
9597
master_username = "pguser"
@@ -101,11 +103,11 @@ module "rds-pg" {
101103
maintenance_window = "Mon:00:00-Mon:03:00"
102104
final_snapshot_identifier_prefix = "final"
103105
major_engine_version = local.engine_version
104-
deletion_protection = false
106+
deletion_protection = true
105107
cloudwatch_metric_alarms_enabled = true
106108
alarm_cpu_threshold_percent = 70
107109
disk_free_storage_space = "10000000" # in bytes
108-
slack_username = ""
109-
slack_channel = ""
110-
slack_webhook_url = ""
110+
slack_username = "Admin"
111+
slack_channel = "postgresql-notification"
112+
slack_webhook_url = "https://hooks/xxxxxxxx"
111113
}

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module "db" {
2121
subnet_ids = var.subnet_ids
2222
kms_key_id = var.kms_key_arn
2323
instance_class = var.instance_class
24-
storage_type = var.storage_type
24+
storage_type = var.storage_type
2525
engine_version = var.engine_version
2626
allocated_storage = var.allocated_storage
2727
storage_encrypted = var.storage_encrypted

0 commit comments

Comments
 (0)