fix a few things from tests
This commit is contained in:
@@ -41,14 +41,21 @@ resource "google_sql_database_instance" "master" {
|
||||
settings {
|
||||
tier = var.machine_type
|
||||
activation_policy = var.activation_policy
|
||||
authorized_gae_applications = [var.authorized_gae_applications]
|
||||
authorized_gae_applications = var.authorized_gae_applications
|
||||
disk_autoresize = var.disk_autoresize
|
||||
|
||||
ip_configuration {
|
||||
authorized_networks = [var.authorized_networks]
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
dynamic "authorized_networks" {
|
||||
for_each = var.authorized_networks
|
||||
content {
|
||||
name = authorized_networks.value.name
|
||||
value = authorized_networks.value.value
|
||||
}
|
||||
}
|
||||
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
}
|
||||
|
||||
location_preference {
|
||||
@@ -70,9 +77,16 @@ resource "google_sql_database_instance" "master" {
|
||||
|
||||
disk_size = var.disk_size
|
||||
disk_type = var.disk_type
|
||||
database_flags = [var.database_flags]
|
||||
availability_type = local.actual_availability_type
|
||||
|
||||
dynamic "database_flags" {
|
||||
for_each = var.database_flags
|
||||
content {
|
||||
name = database_flags.value.name
|
||||
value = database_flags.value.value
|
||||
}
|
||||
}
|
||||
|
||||
user_labels = var.custom_labels
|
||||
}
|
||||
|
||||
@@ -155,14 +169,21 @@ resource "google_sql_database_instance" "failover_replica" {
|
||||
crash_safe_replication = true
|
||||
|
||||
tier = var.machine_type
|
||||
authorized_gae_applications = [var.authorized_gae_applications]
|
||||
authorized_gae_applications = var.authorized_gae_applications
|
||||
disk_autoresize = var.disk_autoresize
|
||||
|
||||
ip_configuration {
|
||||
authorized_networks = [var.authorized_networks]
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
dynamic "authorized_networks" {
|
||||
for_each = var.authorized_networks
|
||||
content {
|
||||
name = authorized_networks.value.name
|
||||
value = authorized_networks.value.value
|
||||
}
|
||||
}
|
||||
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
}
|
||||
|
||||
location_preference {
|
||||
@@ -170,9 +191,16 @@ resource "google_sql_database_instance" "failover_replica" {
|
||||
zone = var.mysql_failover_replica_zone
|
||||
}
|
||||
|
||||
disk_size = var.disk_size
|
||||
disk_type = var.disk_type
|
||||
database_flags = [var.database_flags]
|
||||
disk_size = var.disk_size
|
||||
disk_type = var.disk_type
|
||||
|
||||
dynamic "database_flags" {
|
||||
for_each = var.database_flags
|
||||
content {
|
||||
name = database_flags.value.name
|
||||
value = database_flags.value.value
|
||||
}
|
||||
}
|
||||
|
||||
user_labels = var.custom_labels
|
||||
}
|
||||
@@ -217,14 +245,21 @@ resource "google_sql_database_instance" "read_replica" {
|
||||
|
||||
settings {
|
||||
tier = var.machine_type
|
||||
authorized_gae_applications = [var.authorized_gae_applications]
|
||||
authorized_gae_applications = var.authorized_gae_applications
|
||||
disk_autoresize = var.disk_autoresize
|
||||
|
||||
ip_configuration {
|
||||
authorized_networks = [var.authorized_networks]
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
dynamic "authorized_networks" {
|
||||
for_each = var.authorized_networks
|
||||
content {
|
||||
name = authorized_networks.value.name
|
||||
value = authorized_networks.value.value
|
||||
}
|
||||
}
|
||||
|
||||
ipv4_enabled = var.enable_public_internet_access
|
||||
private_network = var.private_network
|
||||
require_ssl = var.require_ssl
|
||||
}
|
||||
|
||||
location_preference {
|
||||
@@ -232,9 +267,16 @@ resource "google_sql_database_instance" "read_replica" {
|
||||
zone = element(var.read_replica_zones, count.index)
|
||||
}
|
||||
|
||||
disk_size = var.disk_size
|
||||
disk_type = var.disk_type
|
||||
database_flags = [var.database_flags]
|
||||
disk_size = var.disk_size
|
||||
disk_type = var.disk_type
|
||||
|
||||
dynamic "database_flags" {
|
||||
for_each = var.database_flags
|
||||
content {
|
||||
name = database_flags.value.name
|
||||
value = database_flags.value.value
|
||||
}
|
||||
}
|
||||
|
||||
user_labels = var.custom_labels
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ variable "activation_policy" {
|
||||
|
||||
variable "authorized_networks" {
|
||||
description = "A list of authorized CIDR-formatted IP address ranges that can connect to this DB. Only applies to public IP instances."
|
||||
type = list(string)
|
||||
type = list(any)
|
||||
default = []
|
||||
|
||||
# Example:
|
||||
@@ -125,7 +125,7 @@ variable "db_collation" {
|
||||
|
||||
variable "database_flags" {
|
||||
description = "List of Cloud SQL flags that are applied to the database server"
|
||||
type = list(map(string))
|
||||
type = list(any)
|
||||
default = []
|
||||
|
||||
# Example:
|
||||
|
||||
Reference in New Issue
Block a user