terraform-aws-vpc icon indicating copy to clipboard operation
terraform-aws-vpc copied to clipboard

feat: Add toggle to disable default route creation for public route tables

Open HasseJohansen opened this issue 5 months ago β€’ 0 comments

Description

This changes introduces a variable public_enable_default_route so a default route for public subnets is not created when set to false . This enables the user to create its own default route to other gateways than Internet Gateway (IGW)

Motivation and Context

It fixes the problem of not being able to use ex. Network Firewall and enables the use case where users will need to change default route to something else than the IGW

How Has This Been Tested?

I have tested my changes from a module using the VPC. Setting the public_enable_default_route flag to false -> default route is not created for public subnet route tables

removing the public_enable_default_route flag from the settings passed to the module -> The default route to IGW is created for each public subnet route table

  • [X] I have executed pre-commit run -a on my pull request

HasseJohansen avatar May 12 '25 13:05 HasseJohansen