-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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/lb_listener_rule - add validations + tagging support #19285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLBListenerRule_' ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 3 -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
--- PASS: TestAccAWSLBListenerRule_Action_Order_Recreates (228.95s)
=== CONT TestAccAWSLBListenerRule_conditionMultiple
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMultiple (241.32s)
=== CONT TestAccAWSLBListenerRule_conditionUpdateMixed
--- PASS: TestAccAWSLBListenerRule_basic (291.44s)
=== CONT TestAccAWSLBListenerRule_conditionSourceIp
--- PASS: TestAccAWSLBListenerRule_conditionMultiple (208.39s)
=== CONT TestAccAWSLBListenerRule_conditionQueryString
--- PASS: TestAccAWSLBListenerRule_conditionSourceIp (230.16s)
=== CONT TestAccAWSLBListenerRule_conditionPathPattern
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMixed (284.81s)
=== CONT TestAccAWSLBListenerRule_conditionHttpRequestMethod
--- PASS: TestAccAWSLBListenerRule_conditionQueryString (217.45s)
=== CONT TestAccAWSLBListenerRule_conditionHttpHeader_invalid
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader_invalid (0.77s)
=== CONT TestAccAWSLBListenerRule_conditionHttpHeader
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern (239.16s)
=== CONT TestAccAWSLBListenerRule_conditionHostHeader
--- PASS: TestAccAWSLBListenerRule_conditionHttpRequestMethod (248.91s)
=== CONT TestAccAWSLBListenerRule_conditionAttributesCount
--- PASS: TestAccAWSLBListenerRule_conditionAttributesCount (16.39s)
=== CONT TestAccAWSLBListenerRule_updateRulePriority
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader (238.42s)
=== CONT TestAccAWSLBListenerRule_Action_Order
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader (231.09s)
=== CONT TestAccAWSLBListenerRule_oidc
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (232.84s)
=== CONT TestAccAWSLBListenerRule_cognito
--- PASS: TestAccAWSLBListenerRule_Action_Order (209.47s)
=== CONT TestAccAWSLBListenerRule_priority
--- PASS: TestAccAWSLBListenerRule_oidc (208.80s)
=== CONT TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
--- PASS: TestAccAWSLBListenerRule_cognito (227.82s)
=== CONT TestAccAWSLBListenerRule_redirect
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (242.85s)
=== CONT TestAccAWSLBListenerRule_updateFixedResponse
--- PASS: TestAccAWSLBListenerRule_redirect (238.79s)
=== CONT TestAccAWSLBListenerRule_fixedResponse
--- PASS: TestAccAWSLBListenerRule_priority (413.69s)
=== CONT TestAccAWSLBListenerRule_forwardWeighted
--- PASS: TestAccAWSLBListenerRule_updateFixedResponse (251.91s)
=== CONT TestAccAWSLBListenerRule_BackwardsCompatibility
--- PASS: TestAccAWSLBListenerRule_fixedResponse (219.12s)
=== CONT TestAccAWSLBListenerRule_tags
--- PASS: TestAccAWSLBListenerRule_forwardWeighted (275.54s)
--- PASS: TestAccAWSLBListenerRule_BackwardsCompatibility (207.20s)
--- PASS: TestAccAWSLBListenerRule_tags (243.09s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1956.733s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLBListenerRule_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -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_conditionPathPattern
=== CONT TestAccAWSLBListenerRule_conditionHttpHeader_invalid
=== CONT TestAccAWSLBListenerRule_conditionHttpRequestMethod
=== CONT TestAccAWSLBListenerRule_conditionAttributesCount
=== CONT TestAccAWSLBListenerRule_priority
=== CONT TestAccAWSLBListenerRule_conditionUpdateMixed
=== CONT TestAccAWSLBListenerRule_conditionSourceIp
=== CONT TestAccAWSLBListenerRule_conditionQueryString
=== CONT TestAccAWSLBListenerRule_conditionHttpHeader
=== CONT TestAccAWSLBListenerRule_conditionHostHeader
=== CONT TestAccAWSLBListenerRule_cognito
=== CONT TestAccAWSLBListenerRule_updateRulePriority
=== CONT TestAccAWSLBListenerRule_Action_Order
=== CONT TestAccAWSLBListenerRule_oidc
=== CONT TestAccAWSLBListenerRule_forwardWeighted
=== CONT TestAccAWSLBListenerRule_updateFixedResponse
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader_invalid (6.06s)
=== CONT TestAccAWSLBListenerRule_BackwardsCompatibility
--- PASS: TestAccAWSLBListenerRule_conditionAttributesCount (37.06s)
=== CONT TestAccAWSLBListenerRule_fixedResponse
=== RUN TestAccAWSLBListenerRule_cognito
resource_aws_lb_listener_rule_test.go:521: LB Listener Rule action type 'authenticate-cognito' type is not supported in GovCloud partition
--- SKIP: TestAccAWSLBListenerRule_cognito (0.00s)
=== CONT TestAccAWSLBListenerRule_tags
--- PASS: TestAccAWSLBListenerRule_conditionQueryString (180.93s)
=== CONT TestAccAWSLBListenerRule_redirect
--- PASS: TestAccAWSLBListenerRule_conditionHttpRequestMethod (193.24s)
=== CONT TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew
--- PASS: TestAccAWSLBListenerRule_Action_Order (198.57s)
--- PASS: TestAccAWSLBListenerRule_oidc (200.60s)
--- PASS: TestAccAWSLBListenerRule_basic (201.20s)
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader (203.08s)
--- PASS: TestAccAWSLBListenerRule_Action_Order_Recreates (207.32s)
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader (214.90s)
--- PASS: TestAccAWSLBListenerRule_fixedResponse (180.28s)
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern (226.74s)
--- PASS: TestAccAWSLBListenerRule_conditionMultiple (235.66s)
--- PASS: TestAccAWSLBListenerRule_BackwardsCompatibility (231.47s)
--- PASS: TestAccAWSLBListenerRule_conditionSourceIp (241.74s)
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMultiple (241.76s)
--- PASS: TestAccAWSLBListenerRule_updateFixedResponse (243.76s)
--- PASS: TestAccAWSLBListenerRule_forwardWeighted (260.92s)
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (265.04s)
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMixed (266.60s)
--- PASS: TestAccAWSLBListenerRule_redirect (166.37s)
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (210.83s)
--- PASS: TestAccAWSLBListenerRule_tags (247.26s)
--- PASS: TestAccAWSLBListenerRule_priority (442.39s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 446.018s
This has been released in version 3.40.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! |
With these changes it's no longer possible to override the default redirect values with blank. e.g. I'm using the following config with a blank query parameter to override the default value of resource "aws_lb_listener_rule" "bare_domain_redirect" {
listener_arn = aws_lb_listener.example.arn
action {
type = "redirect"
redirect {
protocol = "HTTPS"
host = "www.example.com"
port = 443
path = "/"
query = ""
status_code = "HTTP_301"
}
}
condition {
host_header {
values = [var.external_domain_name]
}
}
} |
@alext Thanks for noticing this 👏. |
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. |
Community Note
Output from acceptance testing: