1
0
mirror of synced 2025-12-19 18:05:44 -05:00

fix a few things from tests

This commit is contained in:
Rob Morgan
2019-06-25 13:53:18 +02:00
parent d5554b29f4
commit 1fdb587e0b
2 changed files with 66 additions and 24 deletions

View File

@@ -41,11 +41,18 @@ 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]
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
@@ -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,11 +169,18 @@ 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]
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
@@ -172,7 +193,14 @@ resource "google_sql_database_instance" "failover_replica" {
disk_size = var.disk_size
disk_type = var.disk_type
database_flags = [var.database_flags]
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,11 +245,18 @@ 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]
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
@@ -234,7 +269,14 @@ resource "google_sql_database_instance" "read_replica" {
disk_size = var.disk_size
disk_type = var.disk_type
database_flags = [var.database_flags]
dynamic "database_flags" {
for_each = var.database_flags
content {
name = database_flags.value.name
value = database_flags.value.value
}
}
user_labels = var.custom_labels
}

View File

@@ -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: