Skip to content

Commit c4ba875

Browse files
committed
updated readme
1 parent ccb91b2 commit c4ba875

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,40 +34,41 @@ module "aws" {
3434
}
3535
3636
module "mongodb" {
37-
source = "squareops/mongodb/kubernetes"
37+
source = "squareops/mongodb/kubernetes"
38+
namespace = local.namespace
39+
create_namespace = local.create_namespace
3840
mongodb_config = {
39-
name = "mongodb"
40-
values_yaml = ""
41-
environment = "prod"
41+
name = local.name
42+
namespace = local.namespace
43+
values_yaml = file("./helm/values.yaml")
44+
environment = local.environment
4245
volume_size = "10Gi"
4346
architecture = "replicaset"
47+
custom_databases = "['db1', 'db2']"
48+
custom_databases_usernames = "['admin', 'admin']"
49+
custom_databases_passwords = "['pass1', 'pass2']"
4450
replica_count = 2
45-
storage_class_name = "gp3"
46-
store_password_to_secret_manager = "true"
51+
storage_class_name = "gp2"
52+
store_password_to_secret_manager = local.store_password_to_secret_manager
4753
}
48-
mongodb_custom_credentials_enabled = "true"
49-
mongodb_custom_credentials_config = {
50-
root_user = "root"
51-
root_password = "NCPFUKEMd7rrWuvMAa73"
52-
metric_exporter_user = "mongodb_exporter"
53-
metric_exporter_password = "nvAHhm1uGQNYWVw6ZyAH"
54-
}
55-
root_password = mongodb_custom_credentials_enabled ? "" : module.aws.root_password
56-
metric_exporter_pasword = mongodb_custom_credentials_enabled ? "" : module.aws.metric_exporter_pasword
54+
mongodb_custom_credentials_enabled = local.mongodb_custom_credentials_enabled
55+
mongodb_custom_credentials_config = local.mongodb_custom_credentials_config
56+
root_password = local.mongodb_custom_credentials_enabled ? "" : module.aws.root_password
57+
metric_exporter_password = local.mongodb_custom_credentials_enabled ? "" : module.aws.metric_exporter_password
5758
bucket_provider_type = "s3"
5859
mongodb_backup_enabled = true
5960
iam_role_arn_backup = module.aws.iam_role_arn_backup
6061
mongodb_backup_config = {
61-
bucket_uri = "backup-bucket-uri"
62-
s3_bucket_region = "backup-bucket-region"
63-
cron_for_full_backup = "* */12 * * *"
62+
bucket_uri = "s3://mongo-demo-backup"
63+
s3_bucket_region = "us-east-2"
64+
cron_for_full_backup = "* * * * *"
6465
}
6566
mongodb_restore_enabled = true
6667
iam_role_arn_restore = module.aws.iam_role_arn_restore
6768
mongodb_restore_config = {
68-
bucket_uri = "restore-bucket-uri/restore-file-name"
69-
s3_bucket_region = "restore-bucket-region"
70-
file_name = "restore-file-name"
69+
bucket_uri = "s3://mongo-demo-backup/mongodumpfull_20230523_092110.gz"
70+
s3_bucket_region = "us-east-2"
71+
file_name = "mongodumpfull_20230523_092110.gz"
7172
}
7273
mongodb_exporter_enabled = true
7374
}

examples/complete/aws/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ locals {
77
Expires = "Never"
88
Department = "Engineering"
99
}
10-
create_namespace = false
11-
namespace = ""
10+
create_namespace = true
11+
namespace = "mongodb"
1212
store_password_to_secret_manager = true
1313
mongodb_custom_credentials_enabled = true
1414
mongodb_custom_credentials_config = {

0 commit comments

Comments
 (0)