Skip to content

Commit

Permalink
delete default route
Browse files Browse the repository at this point in the history
  • Loading branch information
vk-NEU7 committed Feb 15, 2024
1 parent 064dc3c commit 96c9d9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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"
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 96c9d9d

Please sign in to comment.