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_globalaccelerator_endpoint_group: add attachment_arn to endpoint_configuration #39507

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

Conversation

tcarreira
Copy link

(continuing #37269)

Description

In #35991 we added support for making cross account attachments (docs). There was one part missing, using them in the endpoint group for the Global Accelerator (AGA).

This add support for setting this field AttachmentArn: https://docs.aws.amazon.com/global-accelerator/latest/api/API_EndpointConfiguration.html

Relations

Closes #37631
Closes #37269

References

Completing the work started on #37269
Following feature from #35991

Output from Acceptance Testing

new test:

make testacc TESTS=TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment PKG=globalaccelerator
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/globalaccelerator/... -v -count 1 -parallel 10 -run='TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment'  -timeout 360m
=== RUN   TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
=== CONT  TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
--- PASS: TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment (410.65s)
PASS

note: I had to run this test without the PreCheck acctest.PreCheckOrganizationsAccount(ctx, t) bc I don't have multiple AWS accounts on different Orgs. I should not affect the result.

All tests for this resource:

ACCTEST_PARALLELISM=10 make testacc TESTS=TestAccGlobalAcceleratorEndpointGroup PKG=globalaccelerator
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/globalaccelerator/... -v -count 1 -parallel 10 -run='TestAccGlobalAcceleratorEndpointGroup'  -timeout 360m
=== RUN   TestAccGlobalAcceleratorEndpointGroup_basic
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_basic
=== RUN   TestAccGlobalAcceleratorEndpointGroup_disappears
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_disappears
=== RUN   TestAccGlobalAcceleratorEndpointGroup_ALBEndpoint_clientIP
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_ALBEndpoint_clientIP
=== RUN   TestAccGlobalAcceleratorEndpointGroup_multiRegion
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_multiRegion
=== RUN   TestAccGlobalAcceleratorEndpointGroup_portOverrides
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_portOverrides
=== RUN   TestAccGlobalAcceleratorEndpointGroup_tcpHealthCheckProtocol
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_tcpHealthCheckProtocol
=== RUN   TestAccGlobalAcceleratorEndpointGroup_update
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_update
=== RUN   TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
=== PAUSE TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
=== CONT  TestAccGlobalAcceleratorEndpointGroup_basic
=== CONT  TestAccGlobalAcceleratorEndpointGroup_portOverrides
=== CONT  TestAccGlobalAcceleratorEndpointGroup_multiRegion
=== CONT  TestAccGlobalAcceleratorEndpointGroup_update
=== CONT  TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment
=== CONT  TestAccGlobalAcceleratorEndpointGroup_tcpHealthCheckProtocol
=== CONT  TestAccGlobalAcceleratorEndpointGroup_disappears
=== CONT  TestAccGlobalAcceleratorEndpointGroup_ALBEndpoint_clientIP
--- PASS: TestAccGlobalAcceleratorEndpointGroup_multiRegion (220.51s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_tcpHealthCheckProtocol (221.80s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_basic (222.12s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_disappears (227.17s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_portOverrides (301.86s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_update (302.70s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_crossAccountAttachment (389.49s)
--- PASS: TestAccGlobalAcceleratorEndpointGroup_ALBEndpoint_clientIP (984.85s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/globalaccelerator  984.993s

(I did not run TestAccGlobalAcceleratorEndpointGroup_instanceEndpoint)

@tcarreira tcarreira requested a review from a team as a code owner September 26, 2024 18:44
Copy link

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/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. needs-triage Waiting for first response or review from a maintainer. labels Sep 26, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @tcarreira 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

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. needs-triage Waiting for first response or review from a maintainer. service/globalaccelerator Issues and PRs that pertain to the globalaccelerator service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants