Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPC Module - Allow disabling of the internet gateway #107

Merged
merged 12 commits into from
Jan 10, 2025
Merged

Conversation

Jakeasaurus
Copy link
Collaborator

@Jakeasaurus Jakeasaurus commented Dec 17, 2024

Description

Variable in order to allow for igw to not be created along with public route and route table. Disabling the igw can be performed either by settings enable_internet_gateway = false or by setting the public_subnets_list = null or by setting the public_subnets_list = []

Issue or Ticket

Fixes #106

Type of change

  • Bugfix
  • New feature
  • Version update

Breaking Changes

  • Yes
  • No

Breaking Changes Description

This change will recreate the internet gateway, public route table, and default route associated with each. This is due to the index value of each resource changing. To work around this, you can use the move {} block in terraform to move the index of any existing igw, public route table, and public default route.

For example:

moved {
  from = module.vpc.aws_internet_gateway.igw
  to = module.vpc.aws_internet_gateway.igw[0]
}

TODOs

  • Validate your code matches the style of the project.
  • Update the docs.
  • Validate all tests run successfull, including pre-commit checks.
  • Include release notes and description. This should include both a summary of the changes and any necessary context.

@zachreborn zachreborn changed the title updated igw args to allow false == 0 count VPC Module - Allow disabling of the internet gateway Dec 19, 2024
@zachreborn zachreborn merged commit 0e8f64b into main Jan 10, 2025
5 of 8 checks passed
@zachreborn zachreborn deleted the dev_igw branch January 10, 2025 02:48
Jakeasaurus added a commit that referenced this pull request Jan 14, 2025
* updated igw args to allow false == 0 count

* added new logic for igw

* added two new examples for disabling the igw

* fixed index of the pointers

* corrected variable to enable_internet_gateway

* added type to all vpc variables

* chore: terraform fmt and terraform-docs

---------

Co-authored-by: Jakeasaurus <Jakeasaurus@users.noreply.github.com>
Co-authored-by: Zachary Hill <zhill@octo.ventures>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module - VPC
2 participants