-
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
Add authentication options to aws_lb_listener and aws_lb_listener_rule #6094
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.
I left some reservations below, but none of them are blockers for merge. Overall this functionality is a huge win to get in! Thanks, @mikael-lindstrom and @atsushi-ishibashi! 🚀
--- PASS: TestAccAWSLBListenerRule_multipleConditionThrowsError (1.03s)
--- PASS: TestAccAWSLBListener_https (173.29s)
--- PASS: TestAccAWSLBListenerRule_oidc (185.61s)
--- PASS: TestAccAWSLBListener_basic (189.27s)
--- PASS: TestAccAWSLBListenerRule_redirect (193.78s)
--- PASS: TestAccAWSLBListenerRule_fixedResponse (194.34s)
--- PASS: TestAccAWSLBListenerRule_basic (201.07s)
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (206.48s)
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (206.70s)
--- PASS: TestAccAWSLBListenerRule_cognito (233.09s)
--- PASS: TestAccAWSLBListenerRule_priority (250.97s)
--- PASS: TestAccAWSLBListener_redirect (178.58s)
--- PASS: TestAccAWSLBListener_cognito (200.54s)
--- PASS: TestAccAWSLBListener_oidc (200.81s)
--- PASS: TestAccAWSLBListener_fixedResponse (208.96s)
"on_unauthenticated_request": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Computed: true, |
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.
I have some concerns that we will see some bug reports about detecting drift for a few of these attributes marked as Computed: true
, but I think getting the initial functionality merged is more important.
action.Order = aws.Int64(int64(order.(int))) | ||
} | ||
if len(defaultActions) != 1 && action.Order == nil { | ||
return errors.New("when using more then one action, you need to specify 'order' for each action") |
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.
I think at some point in the future we may be able to base Order
on the ordering within the Terraform configuration, but that is certainly not an enhancement blocking this from merge. 👍
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.
That sounds like a great enhancement, might look into this later 👍
@@ -1907,6 +1908,20 @@ func sortListBasedonTFFile(in []string, d *schema.ResourceData, listName string) | |||
return in, fmt.Errorf("Could not find list: %s", listName) | |||
} | |||
|
|||
// This function sorts LB Actions to look like whats found in the tf file | |||
func sortActionsBasedonTypeinTFFile(actionName string, actions []*elbv2.Action, d *schema.ResourceData) []*elbv2.Action { |
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.
This sorting logic feels a little awkward, but if it does the job for now, I'm okay with it!
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.
Yes, I'm not 100% happy about it but it does the job according to the testing I did. Hopefully we can refactor this part at a later stage to be a bit cleaner 👍
This has been released in version 1.40.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Fixes #4707 and #4711
This is based on #4722 and #5336 which is refactored since the changes for
fixed_reponse
andredirect
was added.Changes proposed in this pull request:
Documentation updated and acceptance tests added.
Output from acceptance testing: