Description
Description
AWS Budgets recently announced improvements in filtering and cost aggregation: https://aws.amazon.com/about-aws/whats-new/2025/04/aws-budgets-cost-metrics-filtering-capabilities/
Would be great to add support of them to aws_budgets_budget resource. From my understanding, SDK was updated already to support it.
Atm if budgets created by Terraform are changed manually to enable new features, next plan/apply shows diff like this (i.e. basically overwriting them back):
Terraform will perform the following actions:
# aws_budgets_budget.this will be updated in-place
~ resource "aws_budgets_budget" "this" {
id = "account:id"
name = "xxx"
tags = {}
# (10 unchanged attributes hidden)
+ cost_filter {
...
]
}
}
+ cost_types {
+ include_credit = false
...
+ use_blended = false
}
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Affected Resource(s) or Data Source(s)
aws_budgets_budget
Potential Terraform Configuration
I think it should be possible to avoid renaming cost_filter and cost_types and add support for new functionality there. Like in case of cost_filter action added and could be "Includes" by default as it was before.
resource "aws_budgets_budget" "this" {
...
cost_filter {
name = "Service"
action = "Includes" # or Excludes
values = [
"Amazon Relational Database Service",
]
}
cost_types {
# and new costs filters here
}
}
References
I think AWS SDK was already updated and this issue is related to this feature implementation #42352
Would you like to implement the enhancement?
No