-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysql.tf
57 lines (52 loc) · 1.63 KB
/
mysql.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
resource "oci_mysql_mysql_db_system" "monitoring_mysql_db_system" {
#Required
count = var.autoscaling_monitoring && var.autoscaling_mysql_service ? 1 : 0
admin_password = var.admin_password
admin_username = var.admin_username
availability_domain = var.controller_ad
compartment_id = var.targetCompartment
shape_name = var.monitoring_shape_name
subnet_id = local.subnet_id
display_name = "autoscaling_monitoring"
is_highly_available = false
data_storage_size_in_gb= "50"
backup_policy {
is_enabled = false
}
}
resource "oci_mysql_mysql_db_system" "billing_mysql_db_system" {
count = var.billing ? 1 : 0
# Required
availability_domain = var.controller_ad
compartment_id = var.targetCompartment
shape_name = var.billing_shape_name
subnet_id = local.subnet_id
# Optional
admin_password = var.billing_mysql_db_admin_password
admin_username = var.billing_mysql_db_admin_username
backup_policy {
is_enabled = true
# Point-In-Time Recovery
pitr_policy {
is_enabled = true
}
retention_in_days = "7"
}
description = "MySQL DB System for billing"
display_name = "billing"
mysql_version = "8.0.35"
port = "3306"
port_x = "33060"
is_highly_available = "true"
crash_recovery = "ENABLED"
data_storage_size_in_gb = "50"
deletion_policy {
automatic_backup_retention = "RETAIN"
final_backup = "REQUIRE_FINAL_BACKUP"
is_delete_protected = "true"
}
freeform_tags = {
"Template" = "Production",
"CreatedTime" = timestamp()
}
}