-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_lb_listener_rule action implicit order is broken #6116
Comments
This is very strange behavior indeed! Sorry for the trouble. 😅 Its not showing up in our acceptance testing, but our acceptance testing is also freshly creating these resources each time. Were any of the affected resources adjusted via the AWS console by chance? |
Until a more permanent fix is implemented, there are two workarounds for this scenario: Adding the configuration to match the API response, e.g. resource "aws_lb_listener_rule" "example" {
# ... other configuration ...
action {
# ... other configuration ...
order = 1
}
} Or, using resource "aws_lb_listener_rule" "example" {
# ... other configuration
lifecycle {
ignore_changes = ["action.0.order"]
}
} There is also a good chance that |
Potential fix submitted: #6119 |
I checked it and 1 seems to be the appropriate default for this - version pinning to 1.39.0 the change disappears so I don’t think it was changed manually.
…Sent from my iPhone
On Oct 10, 2018, at 5:22 PM, Brian Flad ***@***.***> wrote:
This is very strange behavior indeed! Sorry for the trouble. 😅
Its not showing up in our acceptance testing, but our acceptance testing is also freshly creating these resources each time. Were any of the affected resources adjusted via the AWS console by chance?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There seems to be two scenarios occurring: the API returning |
Confirmed fixed - thank you! |
@bflad is there any chance of the fix being merged and released quickly or will it wait until the next provider release? Was waiting for the Cognito LB auth functionality with baited breath and hit a variation of the problem in this issue. It actually caused Terraform to crash in my experience and was definitely when "order = X" was added to the lb_listener resource. It worked up to that point. |
We can confirm the same happening in our use case after editing listener rules in console: resource "aws_alb_listener_rule" "rule_12" {
listener_arn = "${aws_alb_listener.listener.arn}"
priority = "12"
action {
target_group_arn = "${data.aws_alb_target_group.target.arn}"
type = "forward"
}
condition {
field = "path-pattern"
values = ["/somepath/*"]
}
} Running plan on configuration using rules like above in v1.39 results in No changes; doing the same on v1.40 results in Terraform trying to change order from 1 to 0. Which on apply results in following:
|
I merged the initial fix for this which is schedule to be released with version 1.41.0 of the AWS provider, likely middle of next week (on our normal weekly release cadence). Version 1.39.0 or the workarounds mentioned here (#6116 (comment)) can be used in the meantime. I also have a followup pull request to make |
For those that are interested, followup PR to make |
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. |
Thanks @bflad, Terraform is still crashing with 1.41.0 so I'm going to submit the logs in the morning. |
@bflad Actually that does look exactly like it. Thanks for linking me to it! |
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! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
I'll provide this if needed/requested.
Expected Behavior
Implicit action order should match the previous behavior
Actual Behavior
Implicit action order is being calculated as 0 when aws provider is updated to 1.40.0 which is invalid:
Steps to Reproduce
terraform apply
Important Factoids
We actually have multiple similar rules on this listener but this is the only one impacted. We even have a nearly identical rule for QA that is not impacted (slightly different host header condition).
References
The text was updated successfully, but these errors were encountered: