Skip to content

Commit ecc6036

Browse files
Merge pull request #4 from amanravi-squareops/release-1.1.3
added backup restore functionality and fixed security group
2 parents 79a953b + 9487cdd commit ecc6036

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/complete/main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ locals {
99
engine_version = "15.4"
1010
instance_class = "db.t4g.micro"
1111
storage_type = "gp3"
12+
cluster_name = ""
1213
current_identity = data.aws_caller_identity.current.arn
13-
allowed_security_groups = ["sg-xxxxxxxxxxxxxxxx"]
14+
allowed_security_groups = ["sg-xxxxxxxxxxxxxx"]
1415
custom_user_password = ""
1516
additional_tags = {
1617
Owner = "Organization_Name"
@@ -100,13 +101,14 @@ module "vpc" {
100101

101102
module "rds-pg" {
102103
source = "squareops/rds-postgresql/aws"
104+
version = "2.0.0"
103105
name = local.name
104106
db_name = "test"
105-
multi_az = "true"
107+
multi_az = false
106108
family = local.family
107109
vpc_id = module.vpc.vpc_id
108110
allowed_security_groups = local.allowed_security_groups
109-
subnet_ids = module.vpc.database_subnets ## db subnets
111+
subnet_ids = module.vpc.database_subnets
110112
environment = local.environment
111113
kms_key_arn = module.kms.key_arn
112114
storage_type = local.storage_type
@@ -132,7 +134,7 @@ module "rds-pg" {
132134
custom_user_password = local.custom_user_password
133135
#if you want backup and restore then you have to create your cluster with rds vpc id , private subnets, kms key.
134136
#And allow cluster security group in rds security group
135-
cluster_name = ""
137+
cluster_name = local.cluster_name
136138
namespace = local.namespace
137139
create_namespace = local.create_namespace
138140
postgresdb_backup_enabled = false

modules/db-backup-restore/backup/templates/cronjob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
serviceAccountName: sa-postgres-backup
1919
containers:
2020
- name: backup-postgresdb
21-
image: amanravi12/postgresql-backup:v5
21+
image: squareops01/rds-postgresql-backup:v1
2222
imagePullPolicy: Always
2323
command: ["/backup/backup_script.sh"]
2424
env:

modules/db-backup-restore/restore/templates/job.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
serviceAccountName: sa-postgres-restore
1010
containers:
1111
- name: restore-postgresdb
12-
image: amanravi12/postgresql-restore:v6
12+
image: squareops01/rds-postgresql-restore:v1
1313
imagePullPolicy: Always
1414
command: ["/restore/restore_script.sh"]
1515
env:
@@ -23,8 +23,6 @@ spec:
2323
value: {{ .Values.restore.bucket_uri }}
2424
- name: DB_PORT
2525
value: "5432"
26-
# - name: DB_NAME
27-
# value: {{ .Values.restore.DB_NAME }}
2826
- name: RESTORE_FILE_NAME
2927
value: {{ .Values.restore.backup_file_name }}
3028
resources: {{ .Values.restorejob.resources | toYaml | nindent 12 }}

0 commit comments

Comments
 (0)