Add require_tls param to cloudsql module.

master
Tom Alexander 3 years ago committed by Tom Alexander
parent b087d1eed9
commit c3e5b70a84
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -33,6 +33,12 @@ variable "postgres_password" {
default = "hunter2" default = "hunter2"
} }
variable "require_tls" {
description = "Whether or not we should require TLS when connecting to cloudsql."
type = bool
default = false
}
output "connection_name" { output "connection_name" {
description = "The connection string for connecting to the cloudsql instance (for example, through cloudsql proxy)." description = "The connection string for connecting to the cloudsql instance (for example, through cloudsql proxy)."
value = google_sql_database_instance.instance.connection_name value = google_sql_database_instance.instance.connection_name
@ -71,7 +77,7 @@ resource "google_sql_database_instance" "instance" {
ip_configuration { ip_configuration {
ipv4_enabled = false ipv4_enabled = false
private_network = var.private_network_id private_network = var.private_network_id
require_ssl = true require_ssl = var.require_tls
} }
database_flags { database_flags {

Loading…
Cancel
Save