Skip to content

Commit 402f8a7

Browse files
authored
Mongo - User name parameterization (#228)
1 parent e7532fa commit 402f8a7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

terraform-modules/aws/mongodb-atlas-users/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ terraform {
99
}
1010

1111
resource "mongodbatlas_database_user" "admin" {
12-
username = "admin"
12+
username = database_username
1313
password = var.create_aws_secret ? aws_secretsmanager_secret_version.this[0].secret_string : var.user_password
1414
project_id = var.mongodbatlas_projectid
1515
auth_database_name = "admin"

terraform-modules/aws/mongodb-atlas-users/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ variable "tags" {
4646
description = "A list of Tags"
4747
type = map(any)
4848
}
49+
50+
variable "database_username" {
51+
description = "The username to create"
52+
type = string
53+
default = "admin"
54+
}

0 commit comments

Comments
 (0)