Skip to content

Conversation

@revtron
Copy link

@revtron revtron commented Nov 13, 2025

Description

This PR removes the hardcoded upper limit (7) for the partition_count argument in the aws_placement_group resource.

AWS has mutable service limits for partition count, so Terraform should defer validation to the AWS API instead of enforcing a static upper bound. This change replaces validation.IntBetween(0, 7) with validation.IntAtLeast(0).

Motivation and Context

Deferring this validation to AWS allows Terraform to remain compatible with future updates without requiring provider releases whenever limits change.

This aligns with HashiCorp’s principle of avoiding hardcoded API limits that can change on the AWS side.

Affected Resource(s)

  • aws_placement_group

Changes Made

- ValidateFunc: validation.IntBetween(0, 7),
+ ValidateFunc: validation.IntAtLeast(0),

@revtron revtron requested a review from a team as a code owner November 13, 2025 08:23
@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR. labels Nov 13, 2025
@ChaosCypher
Copy link

ChaosCypher commented Nov 13, 2025

PR already opened and under review here - #45042

In the future please check the issue for existing contributions so duplicate work isn't done.

@revtron
Copy link
Author

revtron commented Nov 13, 2025

PR already opened and under review here - #45042

In the future please check the issue for existing contributions so duplicate work isn't done.

Yes sure will look into ,this was my first contribution wasn't aware.

@revtron revtron closed this Nov 13, 2025
@revtron revtron deleted the fix/remove-hardcoded-partition-limit branch November 13, 2025 14:36
@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Nov 13, 2025
@github-actions
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants