Skip to content

INTMDB-795: [Terraform] Improve Self-Managed x509 Database User Docs #1336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions website/docs/r/x509_authentication_database_user.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ description: |-
### Example Usage: Generate an Atlas-managed X.509 certificate for a MongoDB user
```terraform
resource "mongodbatlas_database_user" "user" {
project_id = "<PROJECT-ID>"
project_id = "64b926dd56206839b1c8bae9"
username = "myUsername"
x509_type = "MANAGED"
database_name = "$external"
Expand All @@ -45,7 +45,7 @@ resource "mongodbatlas_x509_authentication_database_user" "test" {
}
```

### Example Usage: Save a customer-managed X.509 configuration for an Atlas project
### Example Usage: Save a self-managed X.509 certificate for an Atlas project and use it with a dababase user
```terraform
resource "mongodbatlas_x509_authentication_database_user" "test" {
project_id = "<PROJECT-ID>"
Expand All @@ -68,6 +68,23 @@ resource "mongodbatlas_x509_authentication_database_user" "test" {
-----END CERTIFICATE-----"
EOT
}

resource "mongodbatlas_database_user" "user" {
project_id = "64b926dd56206839b1c8bae9"
username = "myUsername"
x509_type = "CUSTOMER" # Make sure to set x509_type = "CUSTOMER"
database_name = "$external"

roles {
role_name = "atlasAdmin"
database_name = "admin"
}

labels {
key = "My Key"
value = "My Value"
}
}
```

## Argument Reference
Expand Down