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

lb_target_group: Handle attributes on create #21187

Merged
merged 8 commits into from
Oct 8, 2021

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Oct 6, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #19953
Closes #17310
Closes #17309
Relates #15612

Output from acceptance testing (us-west-2):

--- PASS: TestAccAWSLBTargetGroup_generatedName (31.99s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (32.21s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (32.46s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (32.82s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (33.36s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (37.67s)
--- PASS: TestAccAWSLBTargetGroup_basic (38.65s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (39.79s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (49.29s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (53.91s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (53.95s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (59.15s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (61.72s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (31.10s)
--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (31.06s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (65.61s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (68.82s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (34.86s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (27.23s)
--- PASS: TestAccAWSLBTargetGroup_tags (82.20s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (86.69s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Geneve (38.77s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (90.29s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (37.10s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (58.65s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (58.62s)
--- PASS: TestAccAWSLBTargetGroup_updateAppSticknessEnabled (93.54s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (36.59s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (65.69s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (59.39s)
--- PASS: TestAccAWSLBTargetGroup_attrsOnCreate (53.79s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (60.20s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (91.33s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (129.03s)

Output of acceptance tests (GovCloud):

--- PASS: TestAccAWSLBTargetGroup_attrsOnCreate (47.37s)
--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (51.16s)
--- PASS: TestAccAWSLBTargetGroup_basic (51.97s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (30.79s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (74.47s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (53.87s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (83.13s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (49.10s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (44.31s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (31.78s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (37.85s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (43.73s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (31.50s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (107.15s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (79.89s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (79.80s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Geneve (34.96s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (79.95s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (51.40s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (51.34s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (53.05s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (54.46s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (26.21s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (72.29s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (79.95s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (59.47s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (55.97s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (140.27s)
--- PASS: TestAccAWSLBTargetGroup_tags (73.65s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (79.65s)
--- PASS: TestAccAWSLBTargetGroup_updateAppSticknessEnabled (102.04s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (53.14s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (101.86s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (39.08s)

@github-actions github-actions bot added service/elbv2 Issues and PRs that pertain to the elbv2 service. size/M Managed by automation to categorize the size of a PR. labels Oct 6, 2021
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Oct 6, 2021
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 6, 2021
@gdavison gdavison self-assigned this Oct 6, 2021
@YakDriver
Copy link
Member Author

Much of the logic in here probably needs to be looked at more thoroughly. As I recall, it was not revamped and cleaned up with the advent of GWLBs.

One of the issues here was caused by stickiness.enabled having a default value. Since GWLBs don't support stickiness.enabled, even if it is false, we have this problem. This fixes that problem by simply not including stickiness if the protocol is GENEVE.

However, based on these docs, we can probably do better than this.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Oct 7, 2021
@YakDriver
Copy link
Member Author

YakDriver commented Oct 7, 2021

New output from acceptance tests (us-west-2):

--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (28.51s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (23.62s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (33.43s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (66.25s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (46.57s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (38.93s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (50.49s)
--- PASS: TestAccAWSLBTargetGroup_attrsOnCreate (42.06s)
--- PASS: TestAccAWSLBTargetGroup_basic (32.44s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (23.54s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (67.62s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (50.47s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (63.17s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (47.81s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (24.26s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (39.13s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (30.38s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (32.39s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (35.55s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (71.71s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (54.39s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (55.38s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneve (27.68s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneveNotSticky (43.18s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (27.02s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (64.68s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (60.09s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (41.59s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (55.07s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (101.62s)
--- PASS: TestAccAWSLBTargetGroup_tags (75.63s)
--- PASS: TestAccAWSLBTargetGroup_updateAppSticknessEnabled (62.93s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (56.27s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (59.78s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (14.54s)

Output from acceptance tests (GovCloud):

--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (30.40s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (40.95s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (26.36s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (52.30s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (61.55s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (27.01s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (51.20s)
--- PASS: TestAccAWSLBTargetGroup_attrsOnCreate (51.77s)
--- PASS: TestAccAWSLBTargetGroup_basic (38.79s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (28.75s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (63.10s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (63.58s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (61.78s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (58.91s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (39.37s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (39.35s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (40.51s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (39.37s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (27.65s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (74.94s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (62.49s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (62.52s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneve (31.51s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneveNotSticky (48.65s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (28.72s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (70.51s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (64.62s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (50.40s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (64.49s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (115.18s)
--- PASS: TestAccAWSLBTargetGroup_tags (83.85s)
--- PASS: TestAccAWSLBTargetGroup_updateAppSticknessEnabled (89.36s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (56.73s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (80.98s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (18.24s)

@gdavison gdavison added this to the v3.62.0 milestone Oct 7, 2021
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Looks good 🚀

Acceptance test results in Commercial partition

--- PASS: TestLBTargetGroupCloudwatchSuffixFromARN (0.00s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (57.41s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (59.65s)
--- PASS: TestAccAWSLBTargetGroup_basic (59.98s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (61.49s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (63.90s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (64.53s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneve (88.67s)
--- PASS: TestAccAWSLBTargetGroupAttachment_lambda (96.14s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (123.22s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (124.39s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (125.18s)
--- PASS: TestAccAWSLBTargetGroup_protocolGeneveNotSticky (126.40s)
--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (71.56s)
--- PASS: TestAccAWSLBTargetGroup_attrsOnCreate (131.56s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (72.15s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (72.35s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (133.03s)
--- PASS: TestAccAWSLBTargetGroupAttachment_disappears (156.75s)
--- PASS: TestAccAWSLBTargetGroupAttachment_basic (158.87s)
--- PASS: TestAccAWSLBTargetGroupAttachment_ipAddress (159.76s)
--- PASS: TestAccAWSLBTargetGroupAttachment_BackwardsCompatibility (160.24s)
--- PASS: TestAccAWSLBTargetGroupAttachment_Port (160.79s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (124.39s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (126.95s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (128.21s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (66.12s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (198.21s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (65.59s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (119.64s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (85.43s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (103.13s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (102.64s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (71.08s)
--- PASS: TestAccAWSLBTargetGroup_tags (145.21s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (87.65s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (85.91s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (86.19s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (124.30s)
--- PASS: TestAccAWSLBTargetGroup_updateAppSticknessEnabled (124.05s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (118.99s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (138.74s)

@gdavison gdavison merged commit 60b58a5 into main Oct 8, 2021
@gdavison gdavison deleted the b-lb-target-group-create-attrs branch October 8, 2021 00:21
github-actions bot pushed a commit that referenced this pull request Oct 8, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

This functionality has been released in v3.62.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!

@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 Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
2 participants