File tree 4 files changed +15
-3
lines changed
modules/db-backup-restore
4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ locals {
10
10
instance_class = " db.t4g.micro"
11
11
storage_type = " gp3"
12
12
cluster_name = " "
13
+ replica_count = 1
14
+ replica_enable = false
13
15
current_identity = data. aws_caller_identity . current . arn
14
16
allowed_security_groups = [" sg-xxxxxxxxxxxxxx" ]
15
17
custom_user_password = " "
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ output "instance_name" {
12
12
value = module. rds-pg . db_instance_name
13
13
}
14
14
15
+ output "db_name" {
16
+ description = " Database name"
17
+ value = module. rds-pg . db_name
18
+ }
19
+
15
20
output "rds-mysql_replica_db_instance_name" {
16
21
description = " The name of the database instance"
17
22
value = module. rds-pg . replica_db_instance_name
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ resource "helm_release" "postgresdb_backup" {
14
14
timeout = 600
15
15
namespace = var. namespace
16
16
values = [
17
- templatefile (" ../../helm/values/backup/values.yaml" , {
17
+ templatefile (" ${ path . module } / ../../helm/values/backup/values.yaml" , {
18
18
bucket_uri = var.postgresdb_backup_config.bucket_uri,
19
19
postgres_database_name = var.postgresdb_backup_config.postgres_database_name,
20
20
db_endpoint = var.postgresdb_backup_config.db_endpoint,
@@ -37,7 +37,7 @@ resource "helm_release" "postgresdb_restore" {
37
37
timeout = 600
38
38
namespace = var. namespace
39
39
values = [
40
- templatefile (" ../../helm/values/restore/values.yaml" , {
40
+ templatefile (" ${ path . module } / ../../helm/values/restore/values.yaml" , {
41
41
bucket_uri = var.postgresdb_restore_config.bucket_uri,
42
42
db_endpoint = var.postgresdb_restore_config.db_endpoint,
43
43
db_password = var.postgresdb_restore_config.db_password,
@@ -46,4 +46,4 @@ resource "helm_release" "postgresdb_restore" {
46
46
annotations = var.bucket_provider_type == " s3" ? " eks.amazonaws.com/role-arn: ${ aws_iam_role . postgres_restore_role . arn } " : " iam.gke.io/gcp-service-account: ${ var . service_account_restore } "
47
47
})
48
48
]
49
- }
49
+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ output "db_instance_username" {
23
23
value = nonsensitive (module. db . db_instance_username )
24
24
}
25
25
26
+ output "db_name" {
27
+ description = " The database name used in the RDS module"
28
+ value = var. db_name
29
+ }
30
+
26
31
output "db_instance_password" {
27
32
description = " Password for accessing the database."
28
33
value = var. custom_user_password != " " ? var. custom_user_password : nonsensitive (random_password. master [0 ]. result )
You can’t perform that action at this time.
0 commit comments