From 2f3e42a09aeecefb3eb580c589d3f0d1d0d62874 Mon Sep 17 00:00:00 2001 From: Vinay Kumar Chelpuri Date: Wed, 14 Feb 2024 22:32:33 -0500 Subject: [PATCH] delete default route --- main.tf | 2 +- variables.tf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 76838bd..bc2d1d1 100644 --- a/main.tf +++ b/main.tf @@ -14,6 +14,7 @@ resource "google_compute_network" "private_vpc_assn3" { name = "vpc-${random_string.vpc_suffix.result}" auto_create_subnetworks = var.auto_create_subnets routing_mode = var.routing_mode_RGL + delete_default_routes_on_create = var.delete_default_route } resource "google_compute_subnetwork" "webapp_subnet" { @@ -34,6 +35,5 @@ resource "google_compute_route" "webapp_subnet_route" { name = var.webapp_subnet_route network = google_compute_subnetwork.webapp_subnet.network dest_range = var.webapp_destination - priority = 1000 next_hop_gateway = "default-internet-gateway" } \ No newline at end of file diff --git a/variables.tf b/variables.tf index d92fb88..a52b006 100644 --- a/variables.tf +++ b/variables.tf @@ -51,3 +51,8 @@ variable "webapp_subnet_route" { default = "webapp-route" description = "Name of webpp subnet route" } + +variable "delete_default_route" { + type = bool + default = false +} \ No newline at end of file