Require ssl for cloudsql.
This commit is contained in:
parent
6e99a33921
commit
858d8ad35a
@ -25,6 +25,11 @@ variable "private_network_id" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "connection_name" {
|
||||||
|
description = "The connection string for connecting to the cloudsql instance (for example, through cloudsql proxy)."
|
||||||
|
value = google_sql_database_instance.instance.connection_name
|
||||||
|
}
|
||||||
|
|
||||||
resource "random_id" "cloudsql" {
|
resource "random_id" "cloudsql" {
|
||||||
byte_length = 4
|
byte_length = 4
|
||||||
}
|
}
|
||||||
@ -41,6 +46,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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user