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_lb_listener_rule: Allow empty string for action.redirect.query #19496

Merged
merged 2 commits into from
May 26, 2021

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented May 24, 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 #19376.

Output from acceptance testing:

Commercial

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLBListenerRule_' ACCTEST_PARALLELISM=10
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 10 -run=TestAccAWSLBListenerRule_ -timeout 180m
=== RUN   TestAccAWSLBListenerRule_basic
=== PAUSE TestAccAWSLBListenerRule_basic
=== RUN   TestAccAWSLBListenerRule_tags
=== PAUSE TestAccAWSLBListenerRule_tags
=== RUN   TestAccAWSLBListenerRule_forwardWeighted
=== PAUSE TestAccAWSLBListenerRule_forwardWeighted
=== RUN   TestAccAWSLBListenerRule_BackwardsCompatibility
=== PAUSE TestAccAWSLBListenerRule_BackwardsCompatibility
=== RUN   TestAccAWSLBListenerRule_redirect
=== PAUSE TestAccAWSLBListenerRule_redirect
=== RUN   TestAccAWSLBListenerRule_fixedResponse
=== PAUSE TestAccAWSLBListenerRule_fixedResponse
=== RUN   TestAccAWSLBListenerRule_updateFixedResponse
=== PAUSE TestAccAWSLBListenerRule_updateFixedResponse
=== RUN   TestAccAWSLBListenerRule_updateRulePriority
=== PAUSE TestAccAWSLBListenerRule_updateRulePriority
=== RUN   TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
=== PAUSE TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
=== RUN   TestAccAWSLBListenerRule_priority
=== PAUSE TestAccAWSLBListenerRule_priority
=== RUN   TestAccAWSLBListenerRule_cognito
=== PAUSE TestAccAWSLBListenerRule_cognito
=== RUN   TestAccAWSLBListenerRule_oidc
=== PAUSE TestAccAWSLBListenerRule_oidc
=== RUN   TestAccAWSLBListenerRule_Action_Order
=== PAUSE TestAccAWSLBListenerRule_Action_Order
=== RUN   TestAccAWSLBListenerRule_Action_Order_Recreates
=== PAUSE TestAccAWSLBListenerRule_Action_Order_Recreates
=== RUN   TestAccAWSLBListenerRule_conditionAttributesCount
=== PAUSE TestAccAWSLBListenerRule_conditionAttributesCount
=== RUN   TestAccAWSLBListenerRule_conditionHostHeader
=== PAUSE TestAccAWSLBListenerRule_conditionHostHeader
=== RUN   TestAccAWSLBListenerRule_conditionHttpHeader
=== PAUSE TestAccAWSLBListenerRule_conditionHttpHeader
=== RUN   TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== PAUSE TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== RUN   TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== PAUSE TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== RUN   TestAccAWSLBListenerRule_conditionPathPattern
=== PAUSE TestAccAWSLBListenerRule_conditionPathPattern
=== RUN   TestAccAWSLBListenerRule_conditionQueryString
=== PAUSE TestAccAWSLBListenerRule_conditionQueryString
=== RUN   TestAccAWSLBListenerRule_conditionSourceIp
=== PAUSE TestAccAWSLBListenerRule_conditionSourceIp
=== RUN   TestAccAWSLBListenerRule_conditionUpdateMixed
=== PAUSE TestAccAWSLBListenerRule_conditionUpdateMixed
=== RUN   TestAccAWSLBListenerRule_conditionMultiple
=== PAUSE TestAccAWSLBListenerRule_conditionMultiple
=== RUN   TestAccAWSLBListenerRule_conditionUpdateMultiple
=== PAUSE TestAccAWSLBListenerRule_conditionUpdateMultiple
=== CONT  TestAccAWSLBListenerRule_basic
=== CONT  TestAccAWSLBListenerRule_Action_Order_Recreates
=== CONT  TestAccAWSLBListenerRule_conditionUpdateMultiple
=== CONT  TestAccAWSLBListenerRule_conditionMultiple
=== CONT  TestAccAWSLBListenerRule_conditionUpdateMixed
=== CONT  TestAccAWSLBListenerRule_conditionSourceIp
=== CONT  TestAccAWSLBListenerRule_conditionQueryString
=== CONT  TestAccAWSLBListenerRule_conditionHttpHeader
=== CONT  TestAccAWSLBListenerRule_conditionHostHeader
=== CONT  TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== CONT  TestAccAWSLBListenerRule_conditionAttributesCount
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader_invalid (3.06s)
--- PASS: TestAccAWSLBListenerRule_conditionAttributesCount (19.97s)
=== CONT  TestAccAWSLBListenerRule_conditionPathPattern
--- PASS: TestAccAWSLBListenerRule_conditionSourceIp (195.47s)
=== CONT  TestAccAWSLBListenerRule_conditionHttpRequestMethod
--- PASS: TestAccAWSLBListenerRule_basic (202.24s)
=== CONT  TestAccAWSLBListenerRule_updateRulePriority
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader (202.97s)
=== CONT  TestAccAWSLBListenerRule_Action_Order
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern (186.34s)
=== CONT  TestAccAWSLBListenerRule_oidc
--- PASS: TestAccAWSLBListenerRule_conditionQueryString (213.54s)
=== CONT  TestAccAWSLBListenerRule_cognito
--- PASS: TestAccAWSLBListenerRule_conditionMultiple (213.55s)
=== CONT  TestAccAWSLBListenerRule_priority
=== CONT  TestAccAWSLBListenerRule_Action_Order_Recreates
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/05/24 11:45:05 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: AccessDenied: User: <ARN> is not authorized to perform: iam:DeleteServerCertificate on resource: server certificate tf-acc-test-3585884939490358602
        	status code: 403, request id: de70dfb6-9f10-4284-87f5-31af84df97cd
        
        
--- FAIL: TestAccAWSLBListenerRule_Action_Order_Recreates (214.32s)
=== CONT  TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMultiple (216.27s)
=== CONT  TestAccAWSLBListenerRule_redirect
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader (223.82s)
=== CONT  TestAccAWSLBListenerRule_fixedResponse
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMixed (269.36s)
=== CONT  TestAccAWSLBListenerRule_forwardWeighted
--- PASS: TestAccAWSLBListenerRule_conditionHttpRequestMethod (186.92s)
=== CONT  TestAccAWSLBListenerRule_BackwardsCompatibility
=== CONT  TestAccAWSLBListenerRule_Action_Order
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/05/24 11:48:21 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: AccessDenied: User: <ARN> is not authorized to perform: iam:DeleteServerCertificate on resource: server certificate tf-acc-test-7705779240479493019
        	status code: 403, request id: e9038774-1ab0-4b45-a825-0df4b55e7c9d
        
        
--- FAIL: TestAccAWSLBListenerRule_Action_Order (195.64s)
=== CONT  TestAccAWSLBListenerRule_tags
=== CONT  TestAccAWSLBListenerRule_oidc
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/05/24 11:48:37 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: AccessDenied: User: <ARN> is not authorized to perform: iam:DeleteServerCertificate on resource: server certificate tf-acc-test-8961799291599779974
        	status code: 403, request id: 04a699ce-1173-41ff-b0fc-58eca4094030
        
        
--- FAIL: TestAccAWSLBListenerRule_oidc (205.98s)
=== CONT  TestAccAWSLBListenerRule_updateFixedResponse
=== CONT  TestAccAWSLBListenerRule_cognito
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/05/24 11:48:32 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: AccessDenied: User: <ARN> is not authorized to perform: iam:DeleteServerCertificate on resource: server certificate tf-acc-test-1811524195052031819
        	status code: 403, request id: 395a0eaa-36ef-4ffa-ae83-dc9b3945be5f
        
        
--- FAIL: TestAccAWSLBListenerRule_cognito (207.64s)
--- PASS: TestAccAWSLBListenerRule_fixedResponse (218.06s)
--- PASS: TestAccAWSLBListenerRule_redirect (241.61s)
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (265.00s)
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (253.82s)
--- PASS: TestAccAWSLBListenerRule_forwardWeighted (230.14s)
--- PASS: TestAccAWSLBListenerRule_BackwardsCompatibility (185.88s)
--- PASS: TestAccAWSLBListenerRule_updateFixedResponse (206.89s)
--- PASS: TestAccAWSLBListenerRule_priority (431.97s)
--- PASS: TestAccAWSLBListenerRule_tags (253.64s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	655.876s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to this change.

GovCloud

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLBListenerRule_' ACCTEST_PARALLELISM=6
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 6 -run=TestAccAWSLBListenerRule_ -timeout 180m
=== RUN   TestAccAWSLBListenerRule_basic
=== PAUSE TestAccAWSLBListenerRule_basic
=== RUN   TestAccAWSLBListenerRule_tags
=== PAUSE TestAccAWSLBListenerRule_tags
=== RUN   TestAccAWSLBListenerRule_forwardWeighted
=== PAUSE TestAccAWSLBListenerRule_forwardWeighted
=== RUN   TestAccAWSLBListenerRule_BackwardsCompatibility
=== PAUSE TestAccAWSLBListenerRule_BackwardsCompatibility
=== RUN   TestAccAWSLBListenerRule_redirect
=== PAUSE TestAccAWSLBListenerRule_redirect
=== RUN   TestAccAWSLBListenerRule_fixedResponse
=== PAUSE TestAccAWSLBListenerRule_fixedResponse
=== RUN   TestAccAWSLBListenerRule_updateFixedResponse
=== PAUSE TestAccAWSLBListenerRule_updateFixedResponse
=== RUN   TestAccAWSLBListenerRule_updateRulePriority
=== PAUSE TestAccAWSLBListenerRule_updateRulePriority
=== RUN   TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
=== PAUSE TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
=== RUN   TestAccAWSLBListenerRule_priority
=== PAUSE TestAccAWSLBListenerRule_priority
=== RUN   TestAccAWSLBListenerRule_cognito
=== PAUSE TestAccAWSLBListenerRule_cognito
=== RUN   TestAccAWSLBListenerRule_oidc
=== PAUSE TestAccAWSLBListenerRule_oidc
=== RUN   TestAccAWSLBListenerRule_Action_Order
=== PAUSE TestAccAWSLBListenerRule_Action_Order
=== RUN   TestAccAWSLBListenerRule_Action_Order_Recreates
=== PAUSE TestAccAWSLBListenerRule_Action_Order_Recreates
=== RUN   TestAccAWSLBListenerRule_conditionAttributesCount
=== PAUSE TestAccAWSLBListenerRule_conditionAttributesCount
=== RUN   TestAccAWSLBListenerRule_conditionHostHeader
=== PAUSE TestAccAWSLBListenerRule_conditionHostHeader
=== RUN   TestAccAWSLBListenerRule_conditionHttpHeader
=== PAUSE TestAccAWSLBListenerRule_conditionHttpHeader
=== RUN   TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== PAUSE TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== RUN   TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== PAUSE TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== RUN   TestAccAWSLBListenerRule_conditionPathPattern
=== PAUSE TestAccAWSLBListenerRule_conditionPathPattern
=== RUN   TestAccAWSLBListenerRule_conditionQueryString
=== PAUSE TestAccAWSLBListenerRule_conditionQueryString
=== RUN   TestAccAWSLBListenerRule_conditionSourceIp
=== PAUSE TestAccAWSLBListenerRule_conditionSourceIp
=== RUN   TestAccAWSLBListenerRule_conditionUpdateMixed
=== PAUSE TestAccAWSLBListenerRule_conditionUpdateMixed
=== RUN   TestAccAWSLBListenerRule_conditionMultiple
=== PAUSE TestAccAWSLBListenerRule_conditionMultiple
=== RUN   TestAccAWSLBListenerRule_conditionUpdateMultiple
=== PAUSE TestAccAWSLBListenerRule_conditionUpdateMultiple
=== CONT  TestAccAWSLBListenerRule_basic
=== CONT  TestAccAWSLBListenerRule_Action_Order_Recreates
=== CONT  TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== CONT  TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== CONT  TestAccAWSLBListenerRule_conditionHttpHeader
=== CONT  TestAccAWSLBListenerRule_conditionPathPattern
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader_invalid (2.84s)
=== CONT  TestAccAWSLBListenerRule_conditionHostHeader
--- PASS: TestAccAWSLBListenerRule_Action_Order_Recreates (172.95s)
=== CONT  TestAccAWSLBListenerRule_conditionAttributesCount
--- PASS: TestAccAWSLBListenerRule_basic (172.93s)
=== CONT  TestAccAWSLBListenerRule_cognito
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader (175.72s)
=== CONT  TestAccAWSLBListenerRule_Action_Order
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern (180.37s)
=== CONT  TestAccAWSLBListenerRule_oidc
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader (181.47s)
=== CONT  TestAccAWSLBListenerRule_redirect
--- PASS: TestAccAWSLBListenerRule_conditionHttpRequestMethod (183.12s)
=== CONT  TestAccAWSLBListenerRule_updateFixedResponse
--- PASS: TestAccAWSLBListenerRule_conditionAttributesCount (25.48s)
=== CONT  TestAccAWSLBListenerRule_fixedResponse
=== CONT  TestAccAWSLBListenerRule_cognito
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/24 11:31:03 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating LB Listener Rule: ValidationError: Action type 'authenticate-cognito' must be one of 'redirect,fixed-response,forward,authenticate-oidc'
        	status code: 400, request id: a1a3ded7-2b12-44f1-8fc1-9acd50d63aee
        
          on terraform_plugin_test.tf line 2, in resource "aws_lb_listener_rule" "cognito":
           2: resource "aws_lb_listener_rule" "cognito" {
        
        
--- PASS: TestAccAWSLBListenerRule_Action_Order (158.74s)
=== CONT  TestAccAWSLBListenerRule_updateRulePriority
--- SKIP: TestAccAWSLBListenerRule_cognito (174.60s)
=== CONT  TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
--- PASS: TestAccAWSLBListenerRule_oidc (167.72s)
=== CONT  TestAccAWSLBListenerRule_priority
--- PASS: TestAccAWSLBListenerRule_fixedResponse (169.30s)
=== CONT  TestAccAWSLBListenerRule_conditionUpdateMixed
--- PASS: TestAccAWSLBListenerRule_updateFixedResponse (202.58s)
=== CONT  TestAccAWSLBListenerRule_conditionUpdateMultiple
--- PASS: TestAccAWSLBListenerRule_redirect (236.69s)
=== CONT  TestAccAWSLBListenerRule_conditionMultiple
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (196.91s)
=== CONT  TestAccAWSLBListenerRule_conditionSourceIp
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (217.22s)
=== CONT  TestAccAWSLBListenerRule_conditionQueryString
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMultiple (199.28s)
=== CONT  TestAccAWSLBListenerRule_tags
--- PASS: TestAccAWSLBListenerRule_conditionMultiple (168.93s)
=== CONT  TestAccAWSLBListenerRule_BackwardsCompatibility
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMixed (228.90s)
=== CONT  TestAccAWSLBListenerRule_forwardWeighted
--- PASS: TestAccAWSLBListenerRule_conditionQueryString (168.76s)
--- PASS: TestAccAWSLBListenerRule_conditionSourceIp (188.33s)
--- PASS: TestAccAWSLBListenerRule_priority (399.44s)
--- PASS: TestAccAWSLBListenerRule_BackwardsCompatibility (164.84s)
--- PASS: TestAccAWSLBListenerRule_tags (215.32s)
--- PASS: TestAccAWSLBListenerRule_forwardWeighted (218.09s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	818.055s

@ewbankkit ewbankkit requested a review from a team as a code owner May 24, 2021 15:23
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label May 24, 2021
@github-actions github-actions bot added service/elbv2 Issues and PRs that pertain to the elbv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 24, 2021
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. labels May 24, 2021
@anGie44 anGie44 self-assigned this May 26, 2021
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ewbankkit ewbankkit merged commit a8e6c9e into main May 26, 2021
@ewbankkit ewbankkit deleted the b-aws_lb_listener_rule-blank-redirect-query branch May 26, 2021 17:02
@github-actions github-actions bot added this to the v3.43.0 milestone May 26, 2021
github-actions bot pushed a commit that referenced this pull request May 26, 2021
@ghost
Copy link

ghost commented Jun 1, 2021

This has been released in version 3.43.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!

@github-actions
Copy link

github-actions bot commented Jul 2, 2021

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 Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/M 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_listener_rule doesn't allow blank query since 3.40.0
2 participants