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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
2 participants