Skip to content

Update replica count and path module. #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 7, 2025
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
2 changes: 2 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ locals {
instance_class = "db.t4g.micro"
storage_type = "gp3"
cluster_name = ""
replica_count = 1
replica_enable = false
current_identity = data.aws_caller_identity.current.arn
allowed_security_groups = ["sg-xxxxxxxxxxxxxx"]
custom_user_password = ""
Expand Down
5 changes: 5 additions & 0 deletions examples/complete/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ output "instance_name" {
value = module.rds-pg.db_instance_name
}

output "db_name" {
description = "Database name"
value = module.rds-pg.db_name
}

output "rds-mysql_replica_db_instance_name" {
description = "The name of the database instance"
value = module.rds-pg.replica_db_instance_name
Expand Down
6 changes: 3 additions & 3 deletions modules/db-backup-restore/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "helm_release" "postgresdb_backup" {
timeout = 600
namespace = var.namespace
values = [
templatefile("../../helm/values/backup/values.yaml", {
templatefile("${path.module}/../../helm/values/backup/values.yaml", {
bucket_uri = var.postgresdb_backup_config.bucket_uri,
postgres_database_name = var.postgresdb_backup_config.postgres_database_name,
db_endpoint = var.postgresdb_backup_config.db_endpoint,
Expand All @@ -37,7 +37,7 @@ resource "helm_release" "postgresdb_restore" {
timeout = 600
namespace = var.namespace
values = [
templatefile("../../helm/values/restore/values.yaml", {
templatefile("${path.module}/../../helm/values/restore/values.yaml", {
bucket_uri = var.postgresdb_restore_config.bucket_uri,
db_endpoint = var.postgresdb_restore_config.db_endpoint,
db_password = var.postgresdb_restore_config.db_password,
Expand All @@ -46,4 +46,4 @@ resource "helm_release" "postgresdb_restore" {
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}"
})
]
}
}
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ output "db_instance_username" {
value = nonsensitive(module.db.db_instance_username)
}

output "db_name" {
description = "The database name used in the RDS module"
value = var.db_name
}

output "db_instance_password" {
description = "Password for accessing the database."
value = var.custom_user_password != "" ? var.custom_user_password : nonsensitive(random_password.master[0].result)
Expand Down