Skip to content

[Enhancement]: IPAM subnet reservationsΒ #34615

@drewmullen

Description

@drewmullen

Description

AWS Announced VPC Subnets can get their CIDR from AWS IPAM IP Reservations. I'm not 100% what the implementation will look like but will update this issue as the service features become available publicly.

Based on the blog I believe the following changes need to be made

  1. aws_vpc_ipam_pool needs to be able to set resource planning to a vpc
  2. aws_subnet needs to specify the cidr block is from an ipam pool id, ip netmask

These values are

Affected Resource(s) and/or Data Source(s)

  • aws_vpc_ipam_pool
  • aws_subnet

Potential Terraform Configuration

### ipam pool

resource aws_vpc_ipam_pool main {
  source_resource {

	resource_id = <>

	resource_owner = <> # account owner id

	resource_region = <>

	// The source resource type.
	ResourceType = "vpc" # https://github.com/aws/aws-sdk-go-v2/blob/main/service/ec2/types/enums.go#L4776

  }
}

### vpc subnet

```hcl
resource aws_subnet main {
  ipv4_ipam_pool_id = ""
  ipv6_ipam_pool_id = ""

  ipv4_netmask_length = #
  ipv6_netmask_length = #
}


### References

_No response_

### Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/ipamIssues and PRs that pertain to the ipam service.service/vpcIssues and PRs that pertain to the vpc service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions