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

Add preserve_client_ip attribute support in aws_lb_target_group resource #17731

Merged
merged 12 commits into from
Mar 30, 2021

Conversation

amitdaga
Copy link
Contributor

@amitdaga amitdaga commented Feb 20, 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 #17550

Output from acceptance testing:

➜  terraform-provider-aws git:(f-aws_lb_target_group-add_attribute) make testacc TESTARGS='-run=TestAccAWSLBTargetGroup_preserveClientIPValid'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLBTargetGroup_preserveClientIPValid -timeout 120m
=== RUN   TestAccAWSLBTargetGroup_preserveClientIPValid
=== PAUSE TestAccAWSLBTargetGroup_preserveClientIPValid
=== CONT  TestAccAWSLBTargetGroup_preserveClientIPValid
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (174.17s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	175.617s

➜  terraform-provider-aws git:(f-aws_lb_target_group-add_attribute) ✗ make testacc TESTARGS='-run=TestAccDataSourceAWSALBTargetGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAWSALBTargetGroup -timeout 120m
=== RUN   TestAccDataSourceAWSALBTargetGroup_basic
=== PAUSE TestAccDataSourceAWSALBTargetGroup_basic
=== CONT  TestAccDataSourceAWSALBTargetGroup_basic
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (269.39s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	270.936s
➜  terraform-provider-aws git:(f-aws_lb_target_group-add_attribute) ✗ make testacc TESTARGS='-run=TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility -timeout 120m
=== RUN   TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility
=== PAUSE TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility
=== CONT  TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility
--- PASS: TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility (273.39s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	275.069s

@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/elbv2 Issues and PRs that pertain to the elbv2 service. labels Feb 20, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 20, 2021
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 @amitdaga 👋

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 CONTRIBUTING 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! 😃

@ghost ghost added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. size/L Managed by automation to categorize the size of a PR. labels Feb 23, 2021
@amitdaga amitdaga force-pushed the f-aws_lb_target_group-add_attribute branch 3 times, most recently from 1dd2a9b to fb4fb9a Compare February 24, 2021 16:02
@amitdaga amitdaga marked this pull request as ready for review February 24, 2021 16:21
@amitdaga amitdaga requested a review from a team as a code owner February 24, 2021 16:21
@amitdaga amitdaga changed the title WIP: Add preserve_client_ip attribute support in aws_lb_target_group resource Add preserve_client_ip attribute support in aws_lb_target_group resource Feb 24, 2021
@@ -154,6 +154,11 @@ func dataSourceAwsLbTargetGroup() *schema.Resource {
},
},

"preserve_client_id": {

Choose a reason for hiding this comment

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

typo: ip not id.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noticing. It is fixed now.

@YakDriver YakDriver self-assigned this Mar 30, 2021
@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Mar 30, 2021
@YakDriver YakDriver force-pushed the f-aws_lb_target_group-add_attribute branch from c90adcf to 06e1dfc Compare March 30, 2021 13:45
@ghost ghost added size/XL 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 Mar 30, 2021
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Mar 30, 2021
@YakDriver YakDriver added this to the v3.35.0 milestone Mar 30, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

@amitdaga This looks great! Thanks for contributing. I'm impressed that you remembered to add the arg to the data source as well!

Acceptance tests on commercial (us-west-2):

--- PASS: TestAccAWSALBTargetGroup_basic (32.79s)
--- PASS: TestAccAWSALBTargetGroup_changeNameForceNew (66.85s)
--- PASS: TestAccAWSALBTargetGroup_changePortForceNew (91.39s)
--- PASS: TestAccAWSALBTargetGroup_changeProtocolForceNew (83.55s)
--- PASS: TestAccAWSALBTargetGroup_changeVpcForceNew (71.14s)
--- PASS: TestAccAWSALBTargetGroup_generatedName (50.01s)
--- PASS: TestAccAWSALBTargetGroup_lambda (27.28s)
--- PASS: TestAccAWSALBTargetGroup_lambdaMultiValueHeadersEnabled (85.42s)
--- PASS: TestAccAWSALBTargetGroup_missingPortProtocolVpc (34.66s)
--- PASS: TestAccAWSALBTargetGroup_namePrefix (41.66s)
--- PASS: TestAccAWSALBTargetGroup_setAndUpdateSlowStart (73.55s)
--- PASS: TestAccAWSALBTargetGroup_tags (88.33s)
--- PASS: TestAccAWSALBTargetGroup_updateHealthCheck (83.28s)
--- PASS: TestAccAWSALBTargetGroup_updateLoadBalancingAlgorithmType (131.17s)
--- PASS: TestAccAWSALBTargetGroup_updateSticknessEnabled (119.79s)
--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (53.99s)
--- PASS: TestAccAWSLBTargetGroup_basic (45.45s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (43.12s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (102.03s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (98.16s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (99.78s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (95.17s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (41.47s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (58.49s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (75.75s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (36.12s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (41.01s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (136.27s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (95.90s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (55.16s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Geneve (58.18s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (110.57s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (43.58s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (45.24s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (69.20s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (88.52s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (46.28s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (92.68s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (89.21s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (61.07s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (79.56s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (182.43s)
--- PASS: TestAccAWSLBTargetGroup_tags (131.09s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (99.27s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (103.69s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (78.15s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (26.31s)
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (188.54s)
--- PASS: TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility (180.43s)
--- PASS: TestALBTargetGroupCloudwatchSuffixFromARN (0.00s)
--- PASS: TestLBTargetGroupCloudwatchSuffixFromARN (0.00s)

Acceptance tests on GovCloud:

--- PASS: TestAccAWSALBTargetGroup_basic (54.97s)
--- PASS: TestAccAWSALBTargetGroup_changeNameForceNew (94.46s)
--- PASS: TestAccAWSALBTargetGroup_changePortForceNew (99.33s)
--- PASS: TestAccAWSALBTargetGroup_changeProtocolForceNew (103.41s)
--- PASS: TestAccAWSALBTargetGroup_changeVpcForceNew (97.51s)
--- PASS: TestAccAWSALBTargetGroup_generatedName (58.51s)
--- PASS: TestAccAWSALBTargetGroup_lambda (42.23s)
--- PASS: TestAccAWSALBTargetGroup_lambdaMultiValueHeadersEnabled (97.62s)
--- PASS: TestAccAWSALBTargetGroup_missingPortProtocolVpc (41.62s)
--- PASS: TestAccAWSALBTargetGroup_namePrefix (48.67s)
--- PASS: TestAccAWSALBTargetGroup_setAndUpdateSlowStart (89.23s)
--- PASS: TestAccAWSALBTargetGroup_tags (97.99s)
--- PASS: TestAccAWSALBTargetGroup_updateHealthCheck (77.47s)
--- PASS: TestAccAWSALBTargetGroup_updateLoadBalancingAlgorithmType (109.50s)
--- PASS: TestAccAWSALBTargetGroup_updateSticknessEnabled (116.80s)
--- PASS: TestAccAWSLBTargetGroup_BackwardsCompatibility (63.34s)
--- PASS: TestAccAWSLBTargetGroup_basic (55.00s)
--- PASS: TestAccAWSLBTargetGroup_basicUdp (56.16s)
--- PASS: TestAccAWSLBTargetGroup_changeNameForceNew (136.81s)
--- PASS: TestAccAWSLBTargetGroup_changePortForceNew (123.47s)
--- PASS: TestAccAWSLBTargetGroup_changeProtocolForceNew (120.41s)
--- PASS: TestAccAWSLBTargetGroup_changeVpcForceNew (119.10s)
--- PASS: TestAccAWSLBTargetGroup_defaults_application (37.10s)
--- PASS: TestAccAWSLBTargetGroup_defaults_network (74.33s)
--- PASS: TestAccAWSLBTargetGroup_enableHealthCheck (46.49s)
--- PASS: TestAccAWSLBTargetGroup_generatedName (43.66s)
--- PASS: TestAccAWSLBTargetGroup_namePrefix (43.35s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroup (186.24s)
--- PASS: TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy (116.28s)
--- PASS: TestAccAWSLBTargetGroup_preserveClientIPValid (87.92s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol (98.57s)
--- PASS: TestAccAWSLBTargetGroup_Protocol_Tls (55.71s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion (66.65s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_GRPC_HealthCheck (70.81s)
--- PASS: TestAccAWSLBTargetGroup_ProtocolVersion_HTTP_GRPC_Update (112.43s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultALB (58.71s)
--- PASS: TestAccAWSLBTargetGroup_stickinessDefaultNLB (111.95s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidALB (116.79s)
--- PASS: TestAccAWSLBTargetGroup_stickinessInvalidNLB (52.35s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidALB (113.47s)
--- PASS: TestAccAWSLBTargetGroup_stickinessValidNLB (199.68s)
--- PASS: TestAccAWSLBTargetGroup_tags (149.23s)
--- PASS: TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck (125.73s)
--- PASS: TestAccAWSLBTargetGroup_updateHealthCheck (145.56s)
--- PASS: TestAccAWSLBTargetGroup_updateSticknessEnabled (177.52s)
--- PASS: TestAccAWSLBTargetGroup_withoutHealthcheck (34.98s)
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (197.37s)
--- PASS: TestAccDataSourceAWSLBTargetGroup_BackwardsCompatibility (178.83s)
--- PASS: TestALBTargetGroupCloudwatchSuffixFromARN (0.00s)
--- PASS: TestLBTargetGroupCloudwatchSuffixFromARN (0.00s)
--- SKIP: TestAccAWSLBTargetGroup_Protocol_Geneve (0.33s)

@YakDriver YakDriver merged commit 92ead47 into hashicorp:main Mar 30, 2021
@ghost
Copy link

ghost commented Apr 1, 2021

This has been released in version 3.35.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 for triage. Thanks!

@ghost
Copy link

ghost commented Apr 29, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 29, 2021
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. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/XXL 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.

Missing preserve_client_ip attribute in aws_lb_target_group resource
3 participants