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

resource/aws_lb_listener(_rule): Allow order to be based on Terraform configuration ordering #6124

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 11, 2018

The Computed change was just merged with #6119 😄

Changes proposed in this pull request:

  • resource/aws_lb_listener: Allow default_action order to be based on Terraform configuration ordering
  • resource/aws_lb_listener_rule: Allow action order to be based on Terraform configuration ordering

Output from acceptance testing:

17 tests passed (all tests)
--- PASS: TestAccAWSLBListenerRule_multipleConditionThrowsError (2.04s)
--- PASS: TestAccAWSLBListenerRule_fixedResponse (169.65s)
--- PASS: TestAccAWSLBListener_oidc (177.07s)
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (189.36s)
--- PASS: TestAccAWSLBListenerRule_cognito (198.84s)
--- PASS: TestAccAWSLBListener_https (198.96s)
--- PASS: TestAccAWSLBListenerRule_Action_Order (199.11s)
--- PASS: TestAccAWSLBListener_cognito (206.89s)
--- PASS: TestAccAWSLBListenerRule_oidc (208.13s)
--- PASS: TestAccAWSLBListener_basic (209.63s)
--- PASS: TestAccAWSLBListener_redirect (212.40s)
--- PASS: TestAccAWSLBListenerRule_redirect (216.05s)
--- PASS: TestAccAWSLBListener_fixedResponse (218.69s)
--- PASS: TestAccAWSLBListenerRule_basic (227.21s)
--- PASS: TestAccAWSLBListenerRule_priority (254.50s)
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (258.13s)
--- PASS: TestAccAWSLBListener_DefaultAction_Order (275.35s)

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/elbv2 Issues and PRs that pertain to the elbv2 service. labels Oct 11, 2018
@bflad bflad requested a review from a team October 11, 2018 15:54
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 11, 2018
@donbavand
Copy link

Hi bflad, I was about to create an issue relating to #6119, this has broken our builds. We will pin our stuff to the previous version, but would be keen to see this go in. Thanks.

@bflad
Copy link
Contributor Author

bflad commented Oct 11, 2018

@donbavand can you clarify what you mean by your builds are broken? Is Terraform crashing or just reporting a plan difference?

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

One minor comment but this otherwise LGTM 👍

}

action {
order = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it'd be better to flip the ordering of these (e.g. 2 then 1) to check this avoids this logic altogether?

@donbavand
Copy link

We're not explicitly setting the rule order in terraform.

During a terraform apply to an existing ALB listener, we get a validation error on the rule order.

e.g

aws_alb_listener_rule.listener: Modifying...  
    action.0.order: "1" => "0" 

...


aws_alb_listener_rule.listener: Error modifying LB Listener Rule: InvalidParameter: 1 validation error(s) found. 
- minimum field value of 1, ModifyRuleInput.Actions[0].Order. 

@bflad bflad added this to the v1.41.0 milestone Oct 12, 2018
@bflad bflad merged commit 60316b1 into master Oct 12, 2018
@bflad bflad deleted the f-elbv2-automatic-order branch October 12, 2018 00:31
bflad added a commit that referenced this pull request Oct 12, 2018
@bflad
Copy link
Contributor Author

bflad commented Oct 18, 2018

This has been released in version 1.41.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 2, 2020

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 and limited conversation to collaborators Apr 2, 2020
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/XL 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.

3 participants