okustera_database_documentdb (Resource)
Manages an enterprise-grade open-source DocumentDB cluster with MongoDB 7.0+ wire-protocol compatibility on port 27017, automated S3 Point-in-Time Recovery (PITR), and replicated NVMe persistent storage.
Example Usage
Production 3-Node DocumentDB Cluster
resource "okustera_database_documentdb" "catalog_db" {
name = "product-catalog-docdb"
namespace = "production"
instances = 3
storage_size = "50Gi"
database_name = "catalog"
username = "docadmin"
password = var.docdb_password
}
output "documentdb_uri" {
value = okustera_database_documentdb.catalog_db.connection_uri
sensitive = true
}
Schema
Required
instances(Number) Number of database replicas (1 for standalone, 3 for production HA).name(String, Forces new resource) Unique name of the DocumentDB cluster.
Optional
database_name(String) Default application database name. Defaults toapp_db.namespace(String, Forces new resource) Kubernetes namespace for the database cluster. Defaults todefault.password(String, Sensitive) Custom database password (auto-generated securely and escrowed in Okustera KMS if omitted).storage_class(String) Optional storage class name (defaults to the platform NVMe block storage class).storage_size(String) Persistent NVMe volume size (e.g.10Gi,100Gi). Defaults to10Gi.username(String) Database administrator username. Defaults todocadmin.
Read-Only
connection_uri(String, Sensitive) Full MongoDB-compatible connection string (mongodb://...:27017/...) with credentials.id(String) Unique cluster identifier UUID.primary_endpoint(String) Primary DocumentDB MongoDB wire-protocol endpoint hostname (:27017).status(String) Cluster health status (e.g.HEALTHY,PROVISIONING).
Import
DocumentDB clusters can be imported using <namespace>/<name> or <name>:
terraform import okustera_database_documentdb.example "production/product-catalog-docdb"