@@ -18,20 +18,35 @@ This module is for deploying a highly available MongoDB cluster on Kubernetes us
1818## Usage Example
1919
2020``` hcl
21- module "aws" {
22- source = "squareops/mongodb/kubernetes//modules/resources/aws"
23- environment = "prod"
24- name = "mongodb"
25- cluster_name = "prod-eks"
26- mongodb_custom_credentials_enabled = "true"
27- store_password_to_secret_manager = "true"
28- mongodb_custom_credentials_config = {
21+ locals {
22+ name = "mongo"
23+ region = "us-east-2"
24+ environment = "prod"
25+ additional_tags = {
26+ Owner = "organization_name"
27+ Expires = "Never"
28+ Department = "Engineering"
29+ }
30+ create_namespace = true
31+ namespace = "mongodb"
32+ store_password_to_secret_manager = true
33+ mongodb_custom_credentials_enabled = true
34+ mongodb_custom_credentials_config = {
2935 root_user = "root"
3036 root_password = "NCPFUKEMd7rrWuvMAa73"
3137 metric_exporter_user = "mongodb_exporter"
3238 metric_exporter_password = "nvAHhm1uGQNYWVw6ZyAH"
3339 }
3440}
41+ module "aws" {
42+ source = "squareops/mongodb/kubernetes//modules/resources/aws"
43+ environment = local.environment
44+ name = local.name
45+ store_password_to_secret_manager = local.store_password_to_secret_manager
46+ cluster_name = ""
47+ mongodb_custom_credentials_enabled = local.mongodb_custom_credentials_enabled
48+ mongodb_custom_credentials_config = local.mongodb_custom_credentials_config
49+ }
3550
3651module "mongodb" {
3752 source = "squareops/mongodb/kubernetes"
@@ -40,7 +55,7 @@ module "mongodb" {
4055 mongodb_config = {
4156 name = local.name
4257 namespace = local.namespace
43- values_yaml = file("./helm/values.yaml")
58+ values_yaml = ""
4459 environment = local.environment
4560 volume_size = "10Gi"
4661 architecture = "replicaset"
0 commit comments