Starting a networking module to get a private ip address for cloudsql.

This commit is contained in:
Tom Alexander
2021-07-12 00:40:01 -04:00
committed by Tom Alexander
parent edb515da09
commit 07b38295c3
3 changed files with 17 additions and 4 deletions

View File

@@ -29,10 +29,6 @@ resource "google_sql_database_instance" "instance" {
settings {
tier = var.tier
ip_configuration {
private_network = true
}
}
deletion_protection = "true"

View File

@@ -0,0 +1,10 @@
variable "project" {
description = "Project ID."
type = string
}
resource "google_compute_network" "private_network" {
project = var.project
name = "private-network"
auto_create_subnetworks = false
}