File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
modules/db-backup-restore Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ locals {
1010 instance_class = " db.t4g.micro"
1111 storage_type = " gp3"
1212 cluster_name = " "
13+ replica_count = 1
14+ replica_enable = false
1315 current_identity = data. aws_caller_identity . current . arn
1416 allowed_security_groups = [" sg-xxxxxxxxxxxxxx" ]
1517 custom_user_password = " "
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ output "instance_name" {
1212 value = module. rds-pg . db_instance_name
1313}
1414
15+ output "db_name" {
16+ description = " Database name"
17+ value = module. rds-pg . db_name
18+ }
19+
1520output "rds-mysql_replica_db_instance_name" {
1621 description = " The name of the database instance"
1722 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" {
1414 timeout = 600
1515 namespace = var. namespace
1616 values = [
17- templatefile (" ../../helm/values/backup/values.yaml" , {
17+ templatefile (" ${ path . module } / ../../helm/values/backup/values.yaml" , {
1818 bucket_uri = var.postgresdb_backup_config.bucket_uri,
1919 postgres_database_name = var.postgresdb_backup_config.postgres_database_name,
2020 db_endpoint = var.postgresdb_backup_config.db_endpoint,
@@ -37,7 +37,7 @@ resource "helm_release" "postgresdb_restore" {
3737 timeout = 600
3838 namespace = var. namespace
3939 values = [
40- templatefile (" ../../helm/values/restore/values.yaml" , {
40+ templatefile (" ${ path . module } / ../../helm/values/restore/values.yaml" , {
4141 bucket_uri = var.postgresdb_restore_config.bucket_uri,
4242 db_endpoint = var.postgresdb_restore_config.db_endpoint,
4343 db_password = var.postgresdb_restore_config.db_password,
@@ -46,4 +46,4 @@ resource "helm_release" "postgresdb_restore" {
4646 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 } "
4747 })
4848 ]
49- }
49+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ output "db_instance_username" {
2323 value = nonsensitive (module. db . db_instance_username )
2424}
2525
26+ output "db_name" {
27+ description = " The database name used in the RDS module"
28+ value = var. db_name
29+ }
30+
2631output "db_instance_password" {
2732 description = " Password for accessing the database."
2833 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