From c38153c178d4adfad79f0602176950027f9b6587 Mon Sep 17 00:00:00 2001 From: gregory hendrickson Date: Wed, 15 Mar 2023 16:32:25 -0700 Subject: [PATCH] add ephemeral external ip --- modules/instances/main.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/instances/main.tf b/modules/instances/main.tf index 1f59e11..437a8eb 100644 --- a/modules/instances/main.tf +++ b/modules/instances/main.tf @@ -17,6 +17,10 @@ resource "google_compute_instance" "backend" { network_interface { network = "default" + access_config { + // Assign a public (external) IP address to the instance + nat_ip = "ephemeral" + } } } @@ -38,5 +42,9 @@ resource "google_compute_instance" "frontend" { network_interface { network = "default" + access_config { + // Assign a public (external) IP address to the instance + nat_ip = "ephemeral" + } } }