Skip to content

fix(ec2): Fix InvalidParameterValue error for TCP load balancer endpoints in Verified Access #42736

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliverjfletcher
Copy link
Contributor

@oliverjfletcher oliverjfletcher commented May 22, 2025

Rollback Plan

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

Changes to Security Controls

No

Description

  • Align the field names between what AWS returns (PortRanges) and what Terraform expects (port_range).
  • Prevent invalid or spurious zero‐port patches when the user hasn’t set a port.
  • Improve acceptance test coverage for Verified Access Endpoint for all protocol types
  • Added short/skip switch for tests added as they take 25 minutes

Relations

Closes #42654

References

Output from Acceptance Testing

terraform-provider-aws git:(b-verified-access-endpoint-ports) make testacc TESTARGS='-run=TestAccVerifiedAccessEndpoint_Port' PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.9 test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVerifiedAccessEndpoint_Port -timeout 360m -vet=off
2025/05/22 22:01:38 Initializing Terraform AWS Provider...
=== RUN   TestAccVerifiedAccessEndpoint_PortRangeTCP
=== PAUSE TestAccVerifiedAccessEndpoint_PortRangeTCP
=== RUN   TestAccVerifiedAccessEndpoint_PortTCP
=== PAUSE TestAccVerifiedAccessEndpoint_PortTCP
=== RUN   TestAccVerifiedAccessEndpoint_PortHTTPS
=== PAUSE TestAccVerifiedAccessEndpoint_PortHTTPS
=== RUN   TestAccVerifiedAccessEndpoint_PortHTTP
=== PAUSE TestAccVerifiedAccessEndpoint_PortHTTP
=== CONT  TestAccVerifiedAccessEndpoint_PortRangeTCP
=== CONT  TestAccVerifiedAccessEndpoint_PortHTTPS
=== CONT  TestAccVerifiedAccessEndpoint_PortTCP
=== CONT  TestAccVerifiedAccessEndpoint_PortHTTP
--- PASS: TestAccVerifiedAccessEndpoint_PortHTTP (1235.41s)
--- PASS: TestAccVerifiedAccessEndpoint_PortHTTPS (1399.81s)
--- PASS: TestAccVerifiedAccessEndpoint_PortTCP (1533.20s)
--- PASS: TestAccVerifiedAccessEndpoint_PortRangeTCP (1533.80s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        1534.471s

...

@oliverjfletcher oliverjfletcher requested a review from a team as a code owner May 22, 2025 21:21
Copy link

Welcome @oliverjfletcher 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider repository. Thank you very much for taking the time to do so, and welcome to the community! 🎉


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.

Copy link

github-actions bot commented May 22, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/verifiedaccess Issues and PRs that pertain to the verifiedaccess service. size/XL Managed by automation to categorize the size of a PR. labels May 22, 2025
@oliverjfletcher oliverjfletcher force-pushed the b-verified-access-endpoint-ports branch 13 times, most recently from 7bfe042 to a2bdad8 Compare May 23, 2025 15:01
@oliverjfletcher oliverjfletcher force-pushed the b-verified-access-endpoint-ports branch from a2bdad8 to b71f5a2 Compare May 23, 2025 17:12
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/verifiedaccess Issues and PRs that pertain to the verifiedaccess service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

load_balancer_options.port not omitted for Verified Access Endpoint with TCP mode with Load Balancer endpoint type
2 participants