-
Notifications
You must be signed in to change notification settings - Fork 2
/
example_datastore.tf
58 lines (48 loc) · 1.25 KB
/
example_datastore.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
terraform {
required_providers {
ccx = {
source = "severalnines/ccx"
version = "~> 0.3.2"
}
}
}
provider "ccx" {
client_id = "replace_with_your_own_client_id"
client_secret = "replace_with_your_own_client_secret"
# base_url = "optionally_use_a_different_base_url"
}
resource "ccx_datastore" "luna" {
name = "luna"
size = 1
db_vendor = "postgres"
tags = ["new", "test"]
cloud_provider = "aws"
cloud_region = "eu-north-1"
instance_size = "m5.large"
volume_size = 80
volume_type = "gp2"
network_type = "public"
db_params = {
statement_timeout = "500"
}
firewall {
source = "2.3.41.5/32"
description = "hello"
}
firewall {
source = "2.2.2.2/24"
description = "world"
}
notifications_enabled = true # or false
notifications_emails = ["[email protected]"] # list of emails
maintenance_day_of_week = 1 # 1-7, 1 is Monday
maintenance_start_hour = 2 # 0-23
maintenance_end_hour = 4
}
output "MOTD" {
value = <<EOF
### Congratulations, your datastore ${ccx_datastore.luna.name} with id ${ccx_datastore.luna.id}
has been sucessfully created ###
### Please visit: https://app.mydbservice.net/ to view the status of its deployment
EOF
}