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

[Enhancement]: EIP support for AWS provided public IP Pools #39449

Closed
nothere517 opened this issue Sep 23, 2024 · 4 comments · Fixed by #39604
Closed

[Enhancement]: EIP support for AWS provided public IP Pools #39449

nothere517 opened this issue Sep 23, 2024 · 4 comments · Fixed by #39604
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. service/ipam Issues and PRs that pertain to the ipam service.
Milestone

Comments

@nothere517
Copy link

nothere517 commented Sep 23, 2024

Description

I am unsure if this needs to be an enhancement or a bug so apologies in advance if enhancement is the wrong label.

AWS recently announced the ability to request Amazon-provided contiguous IPv4 blocks via their IPAM service. This allows you to request a public IP CIDR block and then allocate those to Elastic IP's to then be used for EC2 resources. I was able to follow their guide and create the resources via Terraform. I was able to create an IPAM, create a public IP pool provided by Amazon, and create a continuous CIDR block of IP's. The issue occurs when I try to create an EIP (elastic IP) resource specifying use of that pool. I included AWS links on how to do this via AWS CLI in the references section. It looks like there is a new property called "ipam-pool-id" which is not the same as "public_ipv_4_pool".

#this errors as ipam-pool is not a valid parameter value for public_ipv_4_pool. ipam-pool-id does not exist as a property for the existing aws_eip resource.
resource "awscc_ec2_eip" "demo_eip_ecs_cluster" {
  domain = "vpc"
  public_ipv_4_pool = "ipam-pool-{unique_aws_resource_value}"
}

There seems to be a new property called ipam-pool-id which is not a current option in the aws_eip resource.

This is availabe in AWS CLI specifying the IPAM pool ID.
aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam-pool-{unique_aws_resource_value}

Terraform code sample to create the IPAM pool:

#create an IPAM in the account. This is used to allocate a Public IP CIDR block for the ECS cluster
resource "aws_vpc_ipam" "demo_ipam" {
  operating_regions {
    region_name = var.region
  }
  tier = "free"
}

#create a a pool in IPAM
resource "aws_vpc_ipam_pool" "demo_public_pool" {
  address_family = "ipv4"
  ipam_scope_id  = aws_vpc_ipam.demo_ipam.public_default_scope_id
  locale         = var.region
  public_ip_source = "amazon"
  description = "Public IP Pool for ECS Cluster"
  aws_service = "ec2"
}

#create a CIDR block in the pool
resource "aws_vpc_ipam_pool_cidr" "demo_public_pool_cidr" {
  ipam_pool_id   = aws_vpc_ipam_pool.demo_public_pool.id
  netmask_length = 30
}

The current resource property "public_ipv4_pool" not the same as the CLI property "ipam-pool-id"

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

  • aws_eip

Potential Terraform Configuration

#support for a new property called ipam-pool-id
resource "aws_eip" "demo_eip_ecs_cluster" {
  domain = "vpc"
  ipam_pool_id = aws_vpc_ipam_pool.demo_public_pool.id
}

References

https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-provided-contiguous-ipv4-blocks/

https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-eip-pool.html

Would you like to implement a fix?

None

@nothere517 nothere517 added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 23, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/ec2 Issues and PRs that pertain to the ec2 service. service/ipam Issues and PRs that pertain to the ipam service. needs-triage Waiting for first response or review from a maintainer. labels Sep 23, 2024
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Oct 7, 2024
Copy link

github-actions bot commented Oct 8, 2024

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.71.0 milestone Oct 8, 2024
Copy link

This functionality has been released in v5.72.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 Nov 15, 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/ec2 Issues and PRs that pertain to the ec2 service. service/ipam Issues and PRs that pertain to the ipam service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants