-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
61 lines (59 loc) · 1.85 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
provider "ibm" {
region = "eu-de"
ibmcloud_api_key = var.ibmcloud_api_key
}
terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
}
}
}
variable ibmcloud_api_key {
description = "The IBM Cloud platform API key needed to deploy IAM enabled resources"
type = string
}
data "ibm_resource_group" "group" {
name = "pte-interns"
}
resource "ibm_database" "icd_mongo" {
name = "mongo"
service = "databases-for-mongodb"
plan = "standard"
version = "4.2"
resource_group_id = data.ibm_resource_group.group.id
location = "eu-de"
adminpassword = "Passw0rd01"
members_memory_allocation_mb = 3072 # 1GB per member
members_disk_allocation_mb = 61440 # 20GB per member
}
resource "ibm_database" "icd_mongo1" {
depends_on =[ibm_database.icd_mongo]
name = "mongo1"
service = "databases-for-mongodb"
plan = "standard"
version = "4.2"
resource_group_id = data.ibm_resource_group.group.id
location = "eu-de"
adminpassword = "Passw0rd01"
members_memory_allocation_mb = 3072 # 1GB per member
members_disk_allocation_mb = 61440 # 20GB per member
}
resource "ibm_database" "icd_mongo2" {
depends_on =[ibm_database.icd_mongo1]
name = "mongo2"
service = "databases-for-mongodb"
resource_group_id = data.ibm_resource_group.group.id
plan = "standard"
version = "4.2"
location = "eu-de"
adminpassword = "Passw0rd01"
members_memory_allocation_mb = 3072 # 1GB per member
members_disk_allocation_mb = 61440 # 20GB per member
}
resource "null_resource" "sleep" {
depends_on =[ibm_database.icd_mongo2]
provisioner "local-exec" {
command = "sleep 60m"
}
}