-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathmain.tf
More file actions
27 lines (22 loc) · 687 Bytes
/
main.tf
File metadata and controls
27 lines (22 loc) · 687 Bytes
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
# create vars.auto.tf with the following content:
variable "mongodb_atlas_username" {}
variable "mongodb_atlas_api_key" {}
variable "mongodb_atlas_org_id" {}
variable "pagerduty_service_key" {}
# Configure the MongoDB Atlas Provider
provider "mongodbatlas" {
username = "${var.mongodb_atlas_username}"
api_key = "${var.mongodb_atlas_api_key}"
}
module "cluster" {
source = "./examples/basic"
mongodb_atlas_org_id = "${var.mongodb_atlas_org_id}"
project_name = "terraform"
cluster_name = "test"
}
module "alerts" {
source = "./examples/alerts"
group_id = "${module.cluster.group_id}"
pagerduty_service_key = "${var.pagerduty_service_key}"
cluster_name = "test"
}