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

[New Resource]: aws_lb_target_registration #32380

Closed
wants to merge 2 commits into from

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jul 5, 2023

Description

Adds a new aws_lb_target_registration resource, allowing practitioners to manage registration of multiple targets within the same resource. This behavior aligns more closely with the underlying RegisterTargets and DeregisterTargets APIs.

The singular aws_[lb|alb]_target_group_attachment resource is now deprecated.

Relations

Closes #9901

References

Output from Acceptance Testing

$ make testacc PKG=elbv2 TESTS=TestAccELBV2TargetRegistration_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run='TestAccELBV2TargetRegistration_'  -timeout 180m

--- PASS: TestAccELBV2TargetRegistration_basic (73.07s)
--- PASS: TestAccELBV2TargetRegistration_Type_lambdaFunction (101.73s)
--- PASS: TestAccELBV2TargetRegistration_disappears (103.30s)
--- PASS: TestAccELBV2TargetRegistration_Type_ipAddress (112.61s)
--- PASS: TestAccELBV2TargetRegistration_update (188.49s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/elbv2      191.855s

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

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/elbv2 Issues and PRs that pertain to the elbv2 service. generators Relates to code generators. size/XL Managed by automation to categorize the size of a PR. labels Jul 5, 2023
@jar-b jar-b force-pushed the f-aws_lb_target_registration branch from c6b7be6 to e0510bd Compare July 5, 2023 19:48
@github-actions github-actions bot added repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. github_actions Pull requests that update Github_actions code labels Jul 5, 2023
@jar-b jar-b marked this pull request as ready for review July 5, 2023 22:49
@gdavison gdavison self-assigned this Jul 6, 2023
@jar-b
Copy link
Member Author

jar-b commented Jul 6, 2023

Moving back into draft state while we assess whether we can standardize rules for registration/attachment type resources across the provider.

@jar-b
Copy link
Member Author

jar-b commented Jul 18, 2023

Hello everyone - after some internal discussion, we decided to step back and assess how "relationship" resources have historically been handled in the AWS provider. This research has been collected in a new proposal #32552, currently open for community feedback.

In summary, the AWS provider has historically maintained a strong preference for "singular" representations of parent-child relationships (ie. one child per resource versus many in a single resource). This means we'd propose leaving aws_lb_target_group_attachment as-is, but supplementing the documentation with examples of how to register multiple targets via Terraform meta-arguments (see #32518) and closing this PR.

Given that this design decision has a practical impact on the resolution of this PR, please feel free to leave feedback on the proposal. We'll plan to leave it open for at least the next week to allow time for community suggestions. Thanks for your patience!

@jar-b
Copy link
Member Author

jar-b commented Jul 31, 2023

The "relationship" resource proposal from #32552 has been accepted. As outlined in this standard, a plural load balancer target registrations resource does not follow preferred design patterns. We will be closing this PR and instead resolving the underlying issue with documentation enhancements added in #32518.

@jar-b jar-b closed this Jul 31, 2023
@jar-b jar-b deleted the f-aws_lb_target_registration branch July 31, 2023 18:09
@github-actions
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 Aug 31, 2023
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. generators Relates to code generators. github_actions Pull requests that update Github_actions code repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. service/elbv2 Issues and PRs that pertain to the elbv2 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.

aws_lb_target_group_attachment: target_id should be a list
2 participants