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

The aws_vpc_peering_connection datasource does not support IPv6 CIDR blocks #25746

Closed
SpComb opened this issue Jul 8, 2022 · 2 comments · Fixed by #36391
Closed

The aws_vpc_peering_connection datasource does not support IPv6 CIDR blocks #25746

SpComb opened this issue Jul 8, 2022 · 2 comments · Fixed by #36391
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service.
Milestone

Comments

@SpComb
Copy link

SpComb commented Jul 8, 2022

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

The aws_vpc_peering_connection datasource only supports the IPv4 CIDR block/blocks of a VPC peering connection, but VPC peering connections can also involve IPv6 CIDR blocks.

The necessary information is present in the DescribeVpcPeeringConnections -> VpcPeeringConnectionVpcInfo -> ipv6CidrBlockSet field.

New or Affected Resource(s)

  • data.aws_vpc_peering_connection new ipv6_cidr_block_set and peer_ipv6_cidr_block_set attributes

Potential Terraform Configuration

The aws_vpc_peering_connection datasource is useful for automatically configuring the aws_route resources for a VPC peering connection, but setting up the VPC routes for a dual-stack IPv4/IPv6 VPC peering connection currently requires the peer VPC IPv6 CIDR blocks to be provided manually as variables.

data "aws_vpc_peering_connection" "peer" {
  id     = var.pcx_id
  status = "active"
}

resource "aws_route" "private-peer" {
  for_each = var.vpc_private_route_table_ids

  route_table_id            = each.value
  destination_cidr_block    = data.aws_vpc_peering_connection.peer.peer_cidr_block
  vpc_peering_connection_id = var.pcx_id
}

resource "aws_route" "private-peer6" {
  for_each = var.vpc_private_route_table_ids

  route_table_id              = each.value
  destination_ipv6_cidr_block = data.aws_vpc_peering_connection.peer.peer_ipv6_cidr_block_set[0].cidr_block
  vpc_peering_connection_id   = var.pcx_id
}
@SpComb SpComb added the enhancement Requests to existing resources that expand the functionality or scope. label Jul 8, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/vpc Issues and PRs that pertain to the vpc service. labels Jul 8, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jul 20, 2022
@github-actions github-actions bot added this to the v5.42.0 milestone Mar 20, 2024
Copy link

This functionality has been released in v5.42.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants