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

r/aws_vpc_endpoint: Add support for user-defined IP addresses #37226

Merged
merged 12 commits into from
Jun 13, 2024

Conversation

ddericco
Copy link
Contributor

@ddericco ddericco commented May 2, 2024

Description

Adds support for user-defined IP addressed on PrivateLink interface endpoints.

Notes:

Relations

Closes #34147

References

Output from Acceptance Testing

$ make testacc TESTS='TestAccVPCEndpoint_' PKG=ec2                                                                            ==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpoint_'  -timeout 360m
=== RUN   TestAccVPCEndpoint_gatewayBasic
=== PAUSE TestAccVPCEndpoint_gatewayBasic
=== RUN   TestAccVPCEndpoint_interfaceBasic
=== PAUSE TestAccVPCEndpoint_interfaceBasic
=== RUN   TestAccVPCEndpoint_interfacePrivateDNS
=== PAUSE TestAccVPCEndpoint_interfacePrivateDNS
=== RUN   TestAccVPCEndpoint_interfacePrivateDNSNoGateway
=== PAUSE TestAccVPCEndpoint_interfacePrivateDNSNoGateway
=== RUN   TestAccVPCEndpoint_disappears
=== PAUSE TestAccVPCEndpoint_disappears
=== RUN   TestAccVPCEndpoint_tags
=== PAUSE TestAccVPCEndpoint_tags
=== RUN   TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
=== PAUSE TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
=== RUN   TestAccVPCEndpoint_gatewayPolicy
=== PAUSE TestAccVPCEndpoint_gatewayPolicy
=== RUN   TestAccVPCEndpoint_ignoreEquivalent
=== PAUSE TestAccVPCEndpoint_ignoreEquivalent
=== RUN   TestAccVPCEndpoint_ipAddressType
=== PAUSE TestAccVPCEndpoint_ipAddressType
=== RUN   TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
=== PAUSE TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
=== RUN   TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
=== PAUSE TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
=== RUN   TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
=== PAUSE TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedIPv6
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedIPv6
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedDualstack
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedDualstack
=== RUN   TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
=== PAUSE TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
=== CONT  TestAccVPCEndpoint_gatewayBasic
=== CONT  TestAccVPCEndpoint_ipAddressType
=== CONT  TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedDualstack
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedIPv6
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== CONT  TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
=== CONT  TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
=== CONT  TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
=== CONT  TestAccVPCEndpoint_tags
=== CONT  TestAccVPCEndpoint_ignoreEquivalent
=== CONT  TestAccVPCEndpoint_gatewayPolicy
=== CONT  TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
=== CONT  TestAccVPCEndpoint_interfacePrivateDNSNoGateway
=== CONT  TestAccVPCEndpoint_disappears
=== CONT  TestAccVPCEndpoint_interfacePrivateDNS
=== CONT  TestAccVPCEndpoint_interfaceBasic
--- PASS: TestAccVPCEndpoint_disappears (143.89s)
--- PASS: TestAccVPCEndpoint_gatewayBasic (177.58s)
--- PASS: TestAccVPCEndpoint_ignoreEquivalent (206.74s)
--- PASS: TestAccVPCEndpoint_gatewayPolicy (268.70s)
--- PASS: TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy (276.24s)
--- PASS: TestAccVPCEndpoint_interfaceBasic (294.32s)
--- PASS: TestAccVPCEndpoint_tags (305.60s)
=== NAME  TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
    vpc_endpoint_test.go:439: Step 3/3 error running import: ImportStateVerify attributes not equivalent. Difference is shown below. The - symbol indicates attributes missing after import.
        
          map[string]string{
        -       "network_interface_ids.#":           "1",
        +       "network_interface_ids.#":           "3",
        +       "network_interface_ids.1":           "eni-05125770040de7ddf",
        +       "network_interface_ids.2":           "eni-0d77f6a5403fe9404",
        -       "subnet_configurations.#":           "1",
        +       "subnet_configurations.#":           "3",
        -       "subnet_configurations.0.ipv4":      "10.0.56.7",
        +       "subnet_configurations.0.ipv4":      "10.0.100.247",
        -       "subnet_configurations.0.subnet_id": "subnet-0a106f8bbf441060c",
        +       "subnet_configurations.0.subnet_id": "subnet-0633fe7fe9b6b73b5",
        +       "subnet_configurations.1.%":         "3",
        +       "subnet_configurations.1.ipv4":      "10.0.142.22",
        +       "subnet_configurations.1.ipv6":      "",
        +       "subnet_configurations.1.subnet_id": "subnet-0932af53a9cbb46a1",
        +       "subnet_configurations.2.%":         "3",
        +       "subnet_configurations.2.ipv4":      "10.0.56.7",
        +       "subnet_configurations.2.ipv6":      "",
        +       "subnet_configurations.2.subnet_id": "subnet-0a106f8bbf441060c",
          }
--- PASS: TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate (413.80s)
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedDualstack (420.40s)
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedIPv6 (420.72s)
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedIPv4 (431.61s)
--- PASS: TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate (459.53s)
--- PASS: TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer (483.80s)
--- FAIL: TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup (526.23s)
--- PASS: TestAccVPCEndpoint_ipAddressType (528.26s)
--- PASS: TestAccVPCEndpoint_interfacePrivateDNSNoGateway (575.41s)
--- PASS: TestAccVPCEndpoint_interfacePrivateDNS (605.29s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/ec2        613.889s
FAIL
make: *** [testacc] Error 1

...

Copy link

github-actions bot commented May 2, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. labels May 2, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels May 2, 2024
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels May 2, 2024
@ddericco ddericco marked this pull request as ready for review May 3, 2024 16:10
@ewbankkit ewbankkit self-assigned this Jun 13, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 13, 2024
# Conflicts:
#	internal/service/ec2/vpc_endpoint.go
@ewbankkit ewbankkit requested a review from a team as a code owner June 13, 2024 15:39
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccVPCEndpoint_' PKG=ec2 ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 4  -run=TestAccVPCEndpoint_ -timeout 360m
=== RUN   TestAccVPCEndpoint_gatewayBasic
=== PAUSE TestAccVPCEndpoint_gatewayBasic
=== RUN   TestAccVPCEndpoint_interfaceBasic
=== PAUSE TestAccVPCEndpoint_interfaceBasic
=== RUN   TestAccVPCEndpoint_interfaceNoPrivateDNS
=== PAUSE TestAccVPCEndpoint_interfaceNoPrivateDNS
=== RUN   TestAccVPCEndpoint_interfacePrivateDNS
=== PAUSE TestAccVPCEndpoint_interfacePrivateDNS
=== RUN   TestAccVPCEndpoint_interfacePrivateDNSNoGateway
=== PAUSE TestAccVPCEndpoint_interfacePrivateDNSNoGateway
=== RUN   TestAccVPCEndpoint_disappears
=== PAUSE TestAccVPCEndpoint_disappears
=== RUN   TestAccVPCEndpoint_tags
=== PAUSE TestAccVPCEndpoint_tags
=== RUN   TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
=== PAUSE TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
=== RUN   TestAccVPCEndpoint_gatewayPolicy
=== PAUSE TestAccVPCEndpoint_gatewayPolicy
=== RUN   TestAccVPCEndpoint_ignoreEquivalent
=== PAUSE TestAccVPCEndpoint_ignoreEquivalent
=== RUN   TestAccVPCEndpoint_ipAddressType
=== PAUSE TestAccVPCEndpoint_ipAddressType
=== RUN   TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
=== PAUSE TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
=== RUN   TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
=== PAUSE TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
=== RUN   TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
=== PAUSE TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedIPv6
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedIPv6
=== RUN   TestAccVPCEndpoint_interfaceUserDefinedDualstack
=== PAUSE TestAccVPCEndpoint_interfaceUserDefinedDualstack
=== RUN   TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
=== PAUSE TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
=== CONT  TestAccVPCEndpoint_gatewayBasic
=== CONT  TestAccVPCEndpoint_ignoreEquivalent
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedIPv4
=== CONT  TestAccVPCEndpoint_disappears
--- PASS: TestAccVPCEndpoint_disappears (31.97s)
=== CONT  TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate
--- PASS: TestAccVPCEndpoint_gatewayBasic (37.37s)
=== CONT  TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate
--- PASS: TestAccVPCEndpoint_ignoreEquivalent (42.72s)
=== CONT  TestAccVPCEndpoint_interfacePrivateDNS
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedIPv4 (226.19s)
=== CONT  TestAccVPCEndpoint_interfacePrivateDNSNoGateway
--- PASS: TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnCreate (290.02s)
=== CONT  TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup
--- PASS: TestAccVPCEndpoint_interfaceNonAWSServiceAcceptOnUpdate (313.16s)
=== CONT  TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy
--- PASS: TestAccVPCEndpoint_gatewayWithRouteTableAndPolicy (66.87s)
=== CONT  TestAccVPCEndpoint_gatewayPolicy
--- PASS: TestAccVPCEndpoint_gatewayPolicy (68.02s)
=== CONT  TestAccVPCEndpoint_interfaceNoPrivateDNS
--- PASS: TestAccVPCEndpoint_interfaceNoPrivateDNS (73.98s)
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedDualstack
--- PASS: TestAccVPCEndpoint_interfacePrivateDNS (575.31s)
=== CONT  TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer
--- PASS: TestAccVPCEndpoint_interfaceWithSubnetAndSecurityGroup (292.61s)
=== CONT  TestAccVPCEndpoint_interfaceUserDefinedIPv6
--- PASS: TestAccVPCEndpoint_interfacePrivateDNSNoGateway (521.96s)
=== CONT  TestAccVPCEndpoint_tags
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedDualstack (219.13s)
=== CONT  TestAccVPCEndpoint_ipAddressType
--- PASS: TestAccVPCEndpoint_tags (71.10s)
=== CONT  TestAccVPCEndpoint_interfaceBasic
--- PASS: TestAccVPCEndpoint_interfaceBasic (72.13s)
--- PASS: TestAccVPCEndpoint_interfaceUserDefinedIPv6 (260.25s)
--- PASS: TestAccVPCEndpoint_VPCEndpointType_gatewayLoadBalancer (386.28s)
--- PASS: TestAccVPCEndpoint_ipAddressType (325.66s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	1108.639s

@ewbankkit
Copy link
Contributor

@ddericco Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9c6e723 into hashicorp:main Jun 13, 2024
44 checks passed
@github-actions github-actions bot added this to the v5.54.0 milestone Jun 13, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 14, 2024
Copy link

This functionality has been released in v5.54.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 pull request 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 related to this change, 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 Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. service/vpc Issues and PRs that pertain to the vpc 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.

[Enhancement]: User Defined IP on VPC endpoints
3 participants