We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cafd70 commit 2c5fb47Copy full SHA for 2c5fb47
instance.tf
@@ -1,6 +1,7 @@
1
resource "google_sql_database_instance" "instance" {
2
database_version = var.database_version
3
name = var.instance_name
4
+ deletion_protection = var.deletion_protection
5
master_instance_name = var.primary_instance_name
6
settings {
7
availability_type = var.highly_available == true ? "REGIONAL" : "ZONAL"
variables.tf
@@ -16,6 +16,11 @@ variable "databases" {
16
type = list(string)
17
}
18
19
+variable "deletion_protection" {
20
+ type = bool
21
+ default = true
22
+}
23
+
24
variable "environment" {
25
type = string
26
validation {
0 commit comments