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

feat: Allow adding custom routes to private route tables (#1130) #1143

Conversation

blackapple805
Copy link

Description

This PR adds the ability to specify custom routes for private route tables by introducing a new variable private_route_table_routes. This feature allows users to add custom routes to private route tables created by the module, addressing the need outlined in issue #1130.

Changes

  • Added private_route_table_routes variable to variables.tf.
  • Implemented logic in main.tf to create routes in private route tables based on the new variable.
  • Updated README.md to document the new variable and provide usage examples.

Usage

module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "x.y.z"

  # ... other configurations ...

  private_route_table_routes = {
    for idx, rt_id in module.vpc.private_route_table_ids :
    rt_id => [
      {
        destination_cidr_block = "0.0.0.0/0"
        nat_gateway_id         = module.vpc.natgw_ids[idx]
      }
    ]
  }
}

References
Closes #1130
Checklist
 I have read the Contributing Guidelines.
 I have updated the documentation accordingly.
 I have added tests to cover my changes.
 All new and existing tests passed.

Remove duplicate required_providers in examples/ipam.
Add missing required_providers and provider blocks in examples/complete and examples/ipv6-dualstack.
Initialize Terraform:

Run terraform init in each example directory to download required providers.
Run Pre-commit Hooks:

Execute pre-commit run --all-files to ensure all hooks pass.
@rahul799
Copy link

rahul799 commented Dec 6, 2024

@antonbabenko can we please review the PR and merge? I too want the functionality to add custom routes

@bryantbiggs
Copy link
Member

Most of these changes are not valid nor are they relevant to what is described in the PR title

@rahul799
Copy link

rahul799 commented Dec 6, 2024

ohh my bad, I didn't went through the actual changes. Let me try to fix it and raise a new PR

@bryantbiggs
Copy link
Member

It's to easy to just @ people to ask them to do stuff without doing any work ourselves

@bryantbiggs
Copy link
Member

closing since 90%+ of this is not valid nor applicable

@bryantbiggs bryantbiggs closed this Dec 6, 2024
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.

3 participants