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_host_header argument to aws_lb #26056

Merged

Conversation

bschaatsbergen
Copy link
Member

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 #26024

Output from acceptance testing:

bruno@pop-os ~/G/terraform-provider-aws (f/aws-alb-preserve-host-header)> make testacc TESTS=TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader PKG=elbv2                                                (base) 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run='TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader'  -timeout 180m
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader (364.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/elbv2      364.049s

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/elbv2 Issues and PRs that pertain to the elbv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 30, 2022
@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 Jul 30, 2022
@ewbankkit ewbankkit 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 Aug 1, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccELBV2LoadBalancer' PKG=elbv2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 2  -run=TestAccELBV2LoadBalancer -timeout 180m
=== RUN   TestAccELBV2LoadBalancerDataSource_basic
=== PAUSE TestAccELBV2LoadBalancerDataSource_basic
=== RUN   TestAccELBV2LoadBalancerDataSource_outpost
=== PAUSE TestAccELBV2LoadBalancerDataSource_outpost
=== RUN   TestAccELBV2LoadBalancerDataSource_backwardsCompatibility
=== PAUSE TestAccELBV2LoadBalancerDataSource_backwardsCompatibility
=== RUN   TestAccELBV2LoadBalancer_ALB_basic
=== PAUSE TestAccELBV2LoadBalancer_ALB_basic
=== RUN   TestAccELBV2LoadBalancer_NLB_basic
=== PAUSE TestAccELBV2LoadBalancer_NLB_basic
=== RUN   TestAccELBV2LoadBalancer_LoadBalancerType_gateway
=== PAUSE TestAccELBV2LoadBalancer_LoadBalancerType_gateway
=== RUN   TestAccELBV2LoadBalancer_ipv6SubnetMapping
=== PAUSE TestAccELBV2LoadBalancer_ipv6SubnetMapping
=== RUN   TestAccELBV2LoadBalancer_LoadBalancerTypeGateway_enableCrossZoneLoadBalancing
=== PAUSE TestAccELBV2LoadBalancer_LoadBalancerTypeGateway_enableCrossZoneLoadBalancing
=== RUN   TestAccELBV2LoadBalancer_ALB_outpost
=== PAUSE TestAccELBV2LoadBalancer_ALB_outpost
=== RUN   TestAccELBV2LoadBalancer_networkLoadBalancerEIP
=== PAUSE TestAccELBV2LoadBalancer_networkLoadBalancerEIP
=== RUN   TestAccELBV2LoadBalancer_NLB_privateIPv4Address
=== PAUSE TestAccELBV2LoadBalancer_NLB_privateIPv4Address
=== RUN   TestAccELBV2LoadBalancer_backwardsCompatibility
=== PAUSE TestAccELBV2LoadBalancer_backwardsCompatibility
=== RUN   TestAccELBV2LoadBalancer_generatedName
=== PAUSE TestAccELBV2LoadBalancer_generatedName
=== RUN   TestAccELBV2LoadBalancer_generatesNameForZeroValue
=== PAUSE TestAccELBV2LoadBalancer_generatesNameForZeroValue
=== RUN   TestAccELBV2LoadBalancer_namePrefix
=== PAUSE TestAccELBV2LoadBalancer_namePrefix
=== RUN   TestAccELBV2LoadBalancer_tags
=== PAUSE TestAccELBV2LoadBalancer_tags
=== RUN   TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
=== PAUSE TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateHTTP2
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateHTTP2
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDropInvalidHeaderFields
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDropInvalidHeaderFields
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDeletionProtection
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDeletionProtection
=== RUN   TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateWAFFailOpen
=== PAUSE TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateWAFFailOpen
=== RUN   TestAccELBV2LoadBalancer_updatedSecurityGroups
=== PAUSE TestAccELBV2LoadBalancer_updatedSecurityGroups
=== RUN   TestAccELBV2LoadBalancer_updatedSubnets
=== PAUSE TestAccELBV2LoadBalancer_updatedSubnets
=== RUN   TestAccELBV2LoadBalancer_updatedIPAddressType
=== PAUSE TestAccELBV2LoadBalancer_updatedIPAddressType
=== RUN   TestAccELBV2LoadBalancer_noSecurityGroup
=== PAUSE TestAccELBV2LoadBalancer_noSecurityGroup
=== RUN   TestAccELBV2LoadBalancer_ALB_accessLogs
=== PAUSE TestAccELBV2LoadBalancer_ALB_accessLogs
=== RUN   TestAccELBV2LoadBalancer_ALBAccessLogs_prefix
=== PAUSE TestAccELBV2LoadBalancer_ALBAccessLogs_prefix
=== RUN   TestAccELBV2LoadBalancer_NLB_accessLogs
=== PAUSE TestAccELBV2LoadBalancer_NLB_accessLogs
=== RUN   TestAccELBV2LoadBalancer_NLBAccessLogs_prefix
=== PAUSE TestAccELBV2LoadBalancer_NLBAccessLogs_prefix
=== RUN   TestAccELBV2LoadBalancer_NetworkLoadBalancerSubnet_change
=== PAUSE TestAccELBV2LoadBalancer_NetworkLoadBalancerSubnet_change
=== RUN   TestAccELBV2LoadBalancer_updateDesyncMitigationMode
=== PAUSE TestAccELBV2LoadBalancer_updateDesyncMitigationMode
=== CONT  TestAccELBV2LoadBalancerDataSource_basic
=== CONT  TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
--- PASS: TestAccELBV2LoadBalancerDataSource_basic (203.47s)
=== CONT  TestAccELBV2LoadBalancer_ALB_outpost
    acctest.go:1298: skipping since no Outposts found
--- SKIP: TestAccELBV2LoadBalancer_ALB_outpost (0.56s)
=== CONT  TestAccELBV2LoadBalancer_tags
--- PASS: TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone (314.38s)
=== CONT  TestAccELBV2LoadBalancer_namePrefix
--- PASS: TestAccELBV2LoadBalancer_tags (269.15s)
=== CONT  TestAccELBV2LoadBalancer_generatesNameForZeroValue
--- PASS: TestAccELBV2LoadBalancer_namePrefix (177.17s)
=== CONT  TestAccELBV2LoadBalancer_generatedName
--- PASS: TestAccELBV2LoadBalancer_generatesNameForZeroValue (168.54s)
=== CONT  TestAccELBV2LoadBalancer_backwardsCompatibility
--- PASS: TestAccELBV2LoadBalancer_generatedName (176.39s)
=== CONT  TestAccELBV2LoadBalancer_NLB_privateIPv4Address
--- PASS: TestAccELBV2LoadBalancer_backwardsCompatibility (167.31s)
=== CONT  TestAccELBV2LoadBalancer_networkLoadBalancerEIP
--- PASS: TestAccELBV2LoadBalancer_NLB_privateIPv4Address (214.48s)
=== CONT  TestAccELBV2LoadBalancer_updatedIPAddressType
--- PASS: TestAccELBV2LoadBalancer_networkLoadBalancerEIP (221.29s)
=== CONT  TestAccELBV2LoadBalancer_updateDesyncMitigationMode
--- PASS: TestAccELBV2LoadBalancer_updatedIPAddressType (252.87s)
=== CONT  TestAccELBV2LoadBalancer_NetworkLoadBalancerSubnet_change
--- PASS: TestAccELBV2LoadBalancer_updateDesyncMitigationMode (261.85s)
=== CONT  TestAccELBV2LoadBalancer_NLBAccessLogs_prefix
--- PASS: TestAccELBV2LoadBalancer_NetworkLoadBalancerSubnet_change (230.55s)
=== CONT  TestAccELBV2LoadBalancer_NLB_accessLogs
--- PASS: TestAccELBV2LoadBalancer_NLBAccessLogs_prefix (323.75s)
=== CONT  TestAccELBV2LoadBalancer_ALBAccessLogs_prefix
--- PASS: TestAccELBV2LoadBalancer_NLB_accessLogs (353.39s)
=== CONT  TestAccELBV2LoadBalancer_ALB_accessLogs
--- PASS: TestAccELBV2LoadBalancer_ALBAccessLogs_prefix (256.02s)
=== CONT  TestAccELBV2LoadBalancer_noSecurityGroup
--- PASS: TestAccELBV2LoadBalancer_noSecurityGroup (162.68s)
=== CONT  TestAccELBV2LoadBalancerDataSource_backwardsCompatibility
--- PASS: TestAccELBV2LoadBalancer_ALB_accessLogs (404.32s)
=== CONT  TestAccELBV2LoadBalancer_ALB_basic
--- PASS: TestAccELBV2LoadBalancerDataSource_backwardsCompatibility (227.42s)
=== CONT  TestAccELBV2LoadBalancer_ipv6SubnetMapping
--- PASS: TestAccELBV2LoadBalancer_ALB_basic (217.06s)
=== CONT  TestAccELBV2LoadBalancer_LoadBalancerTypeGateway_enableCrossZoneLoadBalancing
--- PASS: TestAccELBV2LoadBalancer_ipv6SubnetMapping (214.27s)
=== CONT  TestAccELBV2LoadBalancer_LoadBalancerType_gateway
--- PASS: TestAccELBV2LoadBalancer_LoadBalancerTypeGateway_enableCrossZoneLoadBalancing (146.07s)
=== CONT  TestAccELBV2LoadBalancer_NLB_basic
--- PASS: TestAccELBV2LoadBalancer_LoadBalancerType_gateway (100.78s)
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDropInvalidHeaderFields
--- PASS: TestAccELBV2LoadBalancer_NLB_basic (209.60s)
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDeletionProtection
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDropInvalidHeaderFields (264.16s)
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateDeletionProtection (297.78s)
=== CONT  TestAccELBV2LoadBalancer_updatedSubnets
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updatePreserveHostHeader (306.92s)
=== CONT  TestAccELBV2LoadBalancer_updatedSecurityGroups
--- PASS: TestAccELBV2LoadBalancer_updatedSubnets (252.14s)
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateWAFFailOpen
--- PASS: TestAccELBV2LoadBalancer_updatedSecurityGroups (265.82s)
=== CONT  TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateHTTP2
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateWAFFailOpen (267.58s)
=== CONT  TestAccELBV2LoadBalancerDataSource_outpost
    acctest.go:1298: skipping since no Outposts found
--- SKIP: TestAccELBV2LoadBalancerDataSource_outpost (0.52s)
--- PASS: TestAccELBV2LoadBalancer_ApplicationLoadBalancer_updateHTTP2 (321.10s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elbv2	3743.132s

@ewbankkit
Copy link
Contributor

@bschaatsbergen Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 818e322 into hashicorp:main Aug 1, 2022
@github-actions github-actions bot added this to the v4.25.0 milestone Aug 1, 2022
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

This functionality has been released in v4.25.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

github-actions bot commented Sep 4, 2022

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 Sep 4, 2022
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. enhancement Requests to existing resources that expand the functionality or scope. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/L 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.

loadbalancer missing attribute routing.http.preserve_host_header.enabled
2 participants