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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aws_default_route resource #20663

Open
DonBower opened this issue Aug 23, 2021 · 2 comments
Open

Add aws_default_route resource #20663

DonBower opened this issue Aug 23, 2021 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@DonBower
Copy link

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Much like the aws_default_route_table, which will assume the existence of the route table with an empty state-file, having a resource that will assume the state of a default route (0.0.0.0/0, ::/0) for a supplied route table, would allow for the modification or creation, as appropriate, of a default route

New or Affected Resource(s)

  • aws_default_route

Potential Terraform Configuration

resource aws_default_route defaultRoute {
  route_table_id            = "rtb-4fbb3ac4"

  ipv4_default_route = {
    gateway_id = aws_internet_gateway.example.id
  }
  
  ipv6_default_route = {
    egress_only_gateway_id = aws_egress_only_internet_gateway.example.id
  }
}

References

@DonBower DonBower added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 23, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 23, 2021
@ewbankkit ewbankkit added new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 23, 2021
@DonBower
Copy link
Author

An alternative would be to allow for a lifecycle parameter that allows to overwrite the existing route entry, regardless of state.

i.e.:

resource "aws_route" "r" {
  route_table_id            = "rtb-4fbb3ac4"
  destination_cidr_block    = "0.0.0.0/0"
  vpc_peering_connection_id = "pcx-45ff3dc1"
  lifecycle {
    overwrite = true
  }
}

@ewbankkit
Copy link
Contributor

Similar: #21350.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

2 participants