-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudSql.tf
27 lines (23 loc) · 915 Bytes
/
cloudSql.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
resource "google_sql_database_instance" "instance" {
name = var.cloudSQL_name
region = var.region
database_version = var.cloudSQL_database_version
settings {
tier = var.cloudSQL_tier
availability_type = var.cloudSQL_availability_type
disk_autoresize = var.cloudSQL_auto_resize
disk_type = var.cloudSQL_disk_type
disk_size = var.cloudSQL_disk_size
backup_configuration {
enabled = var.cloudSQL_backup_enable
point_in_time_recovery_enabled = var.cloudSQL_point_in_time_recovery
}
}
deletion_protection = var.cloudSQL_deletion_protection
}
resource "google_sql_user" "users" {
name = var.cloudSQL_user_name
instance = google_sql_database_instance.instance.name
password = var.cloudSQL_user_password
deletion_policy = var.cloudSQL_user_deletion_policy
}