diff --git a/main.tf b/main.tf index 0dc9190..0930581 100644 --- a/main.tf +++ b/main.tf @@ -56,6 +56,7 @@ resource "google_compute_instance" "pgbouncer" { network_interface { subnetwork = var.subnetwork subnetwork_project = var.project + network_ip = var.network_ip dynamic "access_config" { for_each = var.disable_public_ip ? [] : [1] diff --git a/variables.tf b/variables.tf index 7bcb1f9..589f17e 100644 --- a/variables.tf +++ b/variables.tf @@ -142,3 +142,9 @@ variable "module_depends_on" { type = list default = [] } + +variable "network_ip" { + description = "Private IP Address of the VM" + type = string + default = null +}