-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
43 lines (36 loc) · 868 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = "1.15.1"
}
}
}
provider "mongodbatlas" {
}
resource "mongodbatlas_advanced_cluster" "test" {
project_id = var.atlas_project_ID
name = "???"
cluster_type = "REPLICASET"
replication_specs {
region_configs {
electable_specs {
instance_size = "M0"
}
provider_name = var.provider_name
backing_provider_name = var.backing_provider_name
region_name = "US_EAST_1"
priority = 7
}
}
}
resource "mongodbatlas_database_user" "user1" {
username = "???"
password = var.password
project_id = var.atlas_project_ID
auth_database_name = "admin"
roles {
role_name = "atlasAdmin"
database_name = "admin"
}
}