You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-11Lines changed: 22 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This module is for deploying a highly available MongoDB cluster on Kubernetes us
12
12
13
13
| MongoDB Helm Chart Version | K8s supported version |
14
14
| :-----: | :--- |
15
-
|**13.1.5**|**1.23,1.24,1.25**|
15
+
|**13.1.5**|**1.23,1.24,1.25,1.26,1.27**|
16
16
17
17
18
18
## Usage Example
@@ -22,13 +22,21 @@ module "mongodb" {
22
22
source = "squareops/mongodb/kubernetes"
23
23
cluster_name = "prod-cluster"
24
24
mongodb_config = {
25
-
name = "mongo"
26
-
values_yaml = ""
27
-
environment = "prod"
28
-
volume_size = "10Gi"
29
-
architecture = "replicaset"
30
-
replica_count = 2
31
-
storage_class_name = "gp3"
25
+
name = "mongo"
26
+
values_yaml = ""
27
+
environment = "prod"
28
+
volume_size = "10Gi"
29
+
architecture = "replicaset"
30
+
replica_count = 2
31
+
storage_class_name = "gp3"
32
+
store_password_to_secret_manager = true
33
+
}
34
+
mongodb_custom_credentials_enabled = true
35
+
mongodb_custom_credentials_config = {
36
+
root_user = "root"
37
+
root_password = "NCPFUKEMd7rrWuvMAa73"
38
+
metric_exporter_user = "mongodb_exporter"
39
+
metric_exporter_password = "nvAHhm1uGQNYWVw6ZyAH"
32
40
}
33
41
mongodb_backup_enabled = true
34
42
mongodb_backup_config = {
@@ -64,7 +72,7 @@ The required IAM permissions to create resources from this module can be found [
64
72
5. To deploy Prometheus/Grafana, please follow the installation instructions for each tool in their respective documentation.
65
73
6. Once Prometheus and Grafana are deployed, the exporter can be configured to scrape metrics data from your application or system and send it to Prometheus.
66
74
7. Finally, you can use Grafana to create custom dashboards and visualize the metrics data collected by Prometheus.
67
-
8. This module is compatible with EKS version 1.23, which is great news for users deploying the module on an EKS cluster running that version. Review the module's documentation, meet specific configuration requirements, and test thoroughly after deployment to ensure everything works as expected.
75
+
8. This module is compatible with EKS version 1.23,1.24,1.25,1.26 and 1.27 which is great news for users deploying the module on an EKS cluster running that version. Review the module's documentation, meet specific configuration requirements, and test thoroughly after deployment to ensure everything works as expected.
68
76
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
69
77
## Requirements
70
78
@@ -111,7 +119,9 @@ No modules.
111
119
| <aname="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace)| Specify whether or not to create the namespace if it does not already exist. Set it to true to create the namespace. |`string`|`true`| no |
112
120
| <aname="input_mongodb_backup_config"></a> [mongodb\_backup\_config](#input\_mongodb\_backup\_config)| Configuration options for Mongodb database backups. It includes properties such as the S3 bucket URI, the S3 bucket region, and the cron expression for full backups. |`any`| <pre>{<br> "cron_for_full_backup": "*/5 * * * *",<br> "s3_bucket_region": "us-east-2",<br> "s3_bucket_uri": ""<br>}</pre> | no |
113
121
| <aname="input_mongodb_backup_enabled"></a> [mongodb\_backup\_enabled](#input\_mongodb\_backup\_enabled)| Specifies whether to enable backups for Mongodb database. |`bool`|`false`| no |
114
-
| <aname="input_mongodb_config"></a> [mongodb\_config](#input\_mongodb\_config)| Specify the configuration settings for Mongodb, including the name, environment, storage options, replication settings, and custom YAML values. |`any`| <pre>{<br> "architecture": "",<br> "environment": "",<br> "name": "",<br> "replica_count": 2,<br> "storage_class_name": "",<br> "values_yaml": "",<br> "volume_size": ""<br>}</pre> | no |
122
+
| <aname="input_mongodb_config"></a> [mongodb\_config](#input\_mongodb\_config)| Specify the configuration settings for Mongodb, including the name, environment, storage options, replication settings, and custom YAML values. |`any`| <pre>{<br> "architecture": "",<br> "environment": "",<br> "name": "",<br> "replica_count": 2,<br> "storage_class_name": "",<br> "store_password_to_secret_manager": true,<br> "values_yaml": "",<br> "volume_size": ""<br>}</pre> | no |
123
+
| <aname="input_mongodb_custom_credentials_config"></a> [mongodb\_custom\_credentials\_config](#input\_mongodb\_custom\_credentials\_config)| Specify the configuration settings for Mongodb to pass custom credentials during creation. |`any`| <pre>{<br> "metric_exporter_password": "",<br> "metric_exporter_user": "",<br> "root_password": "",<br> "root_user": ""<br>}</pre> | no |
124
+
| <aname="input_mongodb_custom_credentials_enabled"></a> [mongodb\_custom\_credentials\_enabled](#input\_mongodb\_custom\_credentials\_enabled)| Specifies whether to enable custom credentials for MongoDB database. |`bool`|`false`| no |
115
125
| <aname="input_mongodb_exporter_config"></a> [mongodb\_exporter\_config](#input\_mongodb\_exporter\_config)| Specify whether or not to deploy Mongodb exporter to collect Mongodb metrics for monitoring in Grafana. |`any`| <pre>{<br> "version": "2.9.0"<br>}</pre> | no |
116
126
| <aname="input_mongodb_exporter_enabled"></a> [mongodb\_exporter\_enabled](#input\_mongodb\_exporter\_enabled)| Specify whether or not to deploy Mongodb exporter to collect Mongodb metrics for monitoring in Grafana. |`bool`|`false`| no |
117
127
| <aname="input_mongodb_restore_config"></a> [mongodb\_restore\_config](#input\_mongodb\_restore\_config)| Configuration options for restoring dump to the Mongodb database. |`any`| <pre>{<br> "file_name_full": "",<br> "file_name_incremental": "",<br> "full_restore_enable": false,<br> "incremental_restore_enable": false,<br> "s3_bucket_region": "us-east-2",<br> "s3_bucket_uri": "s3://mymongo/mongodumpfull_20230424_112501.gz"<br>}</pre> | no |
| <aname="output_mongodb_credential"></a> [mongodb\_credential](#output\_mongodb\_credential)| MongoDB credentials used for accessing the MongoDB database. |
137
+
| <aname="output_mongodb_endpoints"></a> [mongodb\_endpoints](#output\_mongodb\_endpoints)| MongoDB endpoints in the Kubernetes cluster. |
| <aname="output_mongodb_credential"></a> [mongodb\_credential](#output\_mongodb\_credential)| MongoDB credentials used for accessing the MongoDB database. |
42
+
| <aname="output_mongodb_endpoints"></a> [mongodb\_endpoints](#output\_mongodb\_endpoints)| MongoDB endpoints in the Kubernetes cluster. |
Copy file name to clipboardExpand all lines: variables.tf
+25-7Lines changed: 25 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,35 @@
1
1
variable"mongodb_config" {
2
2
type=any
3
3
default={
4
-
name =""
5
-
environment =""
6
-
volume_size =""
7
-
architecture =""
8
-
replica_count =2
9
-
values_yaml =""
10
-
storage_class_name =""
4
+
name =""
5
+
environment =""
6
+
volume_size =""
7
+
architecture =""
8
+
replica_count =2
9
+
values_yaml =""
10
+
storage_class_name =""
11
+
store_password_to_secret_manager =true
11
12
}
12
13
description="Specify the configuration settings for Mongodb, including the name, environment, storage options, replication settings, and custom YAML values."
13
14
}
14
15
16
+
variable"mongodb_custom_credentials_enabled" {
17
+
type=bool
18
+
default=false
19
+
description="Specifies whether to enable custom credentials for MongoDB database."
20
+
}
21
+
22
+
variable"mongodb_custom_credentials_config" {
23
+
type=any
24
+
default={
25
+
root_user =""
26
+
root_password =""
27
+
metric_exporter_user =""
28
+
metric_exporter_password =""
29
+
}
30
+
description="Specify the configuration settings for Mongodb to pass custom credentials during creation."
0 commit comments