Skip to content

Conversation

@YakDriver
Copy link
Member

@YakDriver YakDriver commented Dec 16, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

The build error occurred because validation.IntBetween(1, 4294967295) was trying to pass the literal 4294967295 (which equals 2^32- 1, the maximum 32-bit unsigned integer value) as an int parameter to the validation function. On 32-bit architectures, Go's int type is only 32 bits and has a maximum value of 2^31 - 1 (2147483647), so the literal 4294967295 overflows when used as an int argument. The fix creates a new IntBetween64 validation function that accepts int64 parameters instead of int parameters, allowing it to handle the full 32-bit ASN range (1-4294967295) without overflow issues. The function still validates int values from the schema, but internally converts them to int64 for range checking, maintaining backward compatibility while supporting the complete ASN value range on all architectures.

Relations

Problem introduced by #45246

References

Output from Acceptance Testing

% make testacc TESTS=TestAccXXX PKG=ec2

...

@YakDriver YakDriver requested a review from a team as a code owner December 16, 2025 23:11
@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 service/networkmanager Issues and PRs that pertain to the networkmanager service. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/XS Managed by automation to categorize the size of a PR. labels Dec 16, 2025
@YakDriver
Copy link
Member Author

YakDriver commented Dec 16, 2025

Couldn't find SDK int64 validator. If there is one, we could use that instead. But, one thing we know, validation.IntBetween(1, 4294967295) is DOA due to int arg.

johnsonaj
johnsonaj previously approved these changes Dec 16, 2025
Copy link
Member

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@johnsonaj johnsonaj merged commit b9ba585 into main Dec 16, 2025
57 checks passed
@johnsonaj johnsonaj deleted the b-builds-failing branch December 16, 2025 23:39
@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

prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/networkmanager Issues and PRs that pertain to the networkmanager service. size/XS Managed by automation to categorize the size of a PR. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants