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
10 changes: 6 additions & 4 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ locals {
engine_version = "15.4"
instance_class = "db.t4g.micro"
storage_type = "gp3"
cluster_name = ""
current_identity = data.aws_caller_identity.current.arn
allowed_security_groups = ["sg-xxxxxxxxxxxxxxxx"]
allowed_security_groups = ["sg-xxxxxxxxxxxxxx"]
custom_user_password = ""
additional_tags = {
Owner = "Organization_Name"
Expand Down Expand Up @@ -100,13 +101,14 @@ module "vpc" {

module "rds-pg" {
source = "squareops/rds-postgresql/aws"
version = "2.0.0"
name = local.name
db_name = "test"
multi_az = "true"
multi_az = false
family = local.family
vpc_id = module.vpc.vpc_id
allowed_security_groups = local.allowed_security_groups
subnet_ids = module.vpc.database_subnets ## db subnets
subnet_ids = module.vpc.database_subnets
environment = local.environment
kms_key_arn = module.kms.key_arn
storage_type = local.storage_type
Expand All @@ -132,7 +134,7 @@ module "rds-pg" {
custom_user_password = local.custom_user_password
#if you want backup and restore then you have to create your cluster with rds vpc id , private subnets, kms key.
#And allow cluster security group in rds security group
cluster_name = ""
cluster_name = local.cluster_name
namespace = local.namespace
create_namespace = local.create_namespace
postgresdb_backup_enabled = false
Expand Down
2 changes: 1 addition & 1 deletion modules/db-backup-restore/backup/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
serviceAccountName: sa-postgres-backup
containers:
- name: backup-postgresdb
image: amanravi12/postgresql-backup:v5
image: squareops01/rds-postgresql-backup:v1
imagePullPolicy: Always
command: ["/backup/backup_script.sh"]
env:
Expand Down
4 changes: 1 addition & 3 deletions modules/db-backup-restore/restore/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
serviceAccountName: sa-postgres-restore
containers:
- name: restore-postgresdb
image: amanravi12/postgresql-restore:v6
image: squareops01/rds-postgresql-restore:v1
imagePullPolicy: Always
command: ["/restore/restore_script.sh"]
env:
Expand All @@ -23,8 +23,6 @@ spec:
value: {{ .Values.restore.bucket_uri }}
- name: DB_PORT
value: "5432"
# - name: DB_NAME
# value: {{ .Values.restore.DB_NAME }}
- name: RESTORE_FILE_NAME
value: {{ .Values.restore.backup_file_name }}
resources: {{ .Values.restorejob.resources | toYaml | nindent 12 }}
Expand Down