Skip to content

Commit af84ce0

Browse files
committed
updated namespace condition
1 parent bdfc996 commit af84ce0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "helm_release" "mongodb" {
2828
chart = "mongodb"
2929
version = var.chart_version
3030
timeout = 600
31-
namespace = var.create_namespace ? var.namespace : "default"
31+
namespace = var.namespace
3232
repository = "https://charts.bitnami.com/bitnami"
3333
values = [
3434
templatefile("${path.module}/helm/values/mongodb/values.yaml", {
@@ -55,7 +55,7 @@ resource "helm_release" "mongodb_backup" {
5555
name = "mongodb-backup"
5656
chart = "${path.module}/modules/backup"
5757
timeout = 600
58-
namespace = var.create_namespace ? var.namespace : "default"
58+
namespace = var.namespace
5959
values = [
6060
templatefile("${path.module}/helm/values/backup/values.yaml", {
6161
mongodb_root_user_password = var.mongodb_custom_credentials_enabled ? var.mongodb_custom_credentials_config.root_password : var.root_password,
@@ -78,7 +78,7 @@ resource "helm_release" "mongodb_restore" {
7878
name = "mongodb-restore"
7979
chart = "${path.module}/modules/restore"
8080
timeout = 600
81-
namespace = var.create_namespace ? var.namespace : "default"
81+
namespace = var.namespace
8282
values = [
8383
templatefile("${path.module}/helm/values/restore/values.yaml", {
8484
mongodb_root_user_password = var.mongodb_custom_credentials_enabled ? var.mongodb_custom_credentials_config.root_password : var.root_password,
@@ -101,12 +101,12 @@ resource "helm_release" "mongodb_exporter" {
101101
chart = "prometheus-mongodb-exporter"
102102
version = var.mongodb_exporter_config.version
103103
timeout = 600
104-
namespace = var.create_namespace ? var.namespace : "default"
104+
namespace = var.namespace
105105
repository = "https://prometheus-community.github.io/helm-charts"
106106
values = [
107107
templatefile("${path.module}/helm/values/exporter/values.yaml", {
108108
mongodb_exporter_password = var.mongodb_custom_credentials_enabled ? var.mongodb_custom_credentials_config.metric_exporter_password : "${var.metric_exporter_password}"
109-
service_monitor_namespace = var.create_namespace ? var.namespace : "default"
109+
service_monitor_namespace = var.namespace
110110
}),
111111
var.mongodb_config.values_yaml
112112
]

0 commit comments

Comments
 (0)