Open apeduru-patreon opened 1 year ago
@justinretzolk this is not an enhancement, but is indeed a bug, this ticket should be labeled as such. The functionality of billing categories breaks if rules are out of defined order. This comes into play heavily when using matches of contains, starts with, and ends with.
Hello guys,
This issue is actually critical for us because we need that feature in order to be able to properly allocate cloud costs to users.
EDIT : actually, I found a very interesting blog post on how to workaround that by using a method to actually order the elements you sends into the rules : https://netmemo.github.io/post/tf-map-ordering/.
To be tested.
Thanks
I'm also having exactly the same issue right now. While the workaround that @jnancel mentioned looks cool, I'd rather have a clean solution to this.
Any updates on when we can get a fix for this?
EDIT:
I'm on v5.33.0 btw.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform provider version 4.29
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
I've redacted some of the
values
as those are company sensitive. Apart from that, this is the terraform configuration that is being used.Debug Output
Panic Output
Expected Behavior
When I define these rules in Terraform, I'm expecting the rules that are defined in order in Terraform to also show up in the same order in the cost category rules editor. i.e.
Actual Behavior
When the Terraform is applied and the rules are processed in AWS, I'm seeing these rules are out of order. It looks like this in the rules editor
Steps to Reproduce
terraform apply
Important Factoids
References