It creates the budget but it is not working as expected, does not show us the current cost and I’ve checked the filter via GUI and I saw this that when you open the ‘value’ field, it doesn’t show anything:
But, if I select again the tag KE and then I open the Value field again, I can see everything.
So looks like the tag ‘name’ is failing for some reason.
I updated your configuration a bit for testing purposes and was able to create the budget with a Tag filter. I can see in the AWS Management Console that the the tag KE and the value SomeValue exists, however I also get the spinner when I click on the Values drop-down list:
And the Tag drop-down list has nothing because I’ve not enabled any cost allocation tags in my test account. While I can’t validate now because it takes up to 24 hours for the cost allocation tag to activate, I suspect that the KE tag is not activated as a cost allocation tag in your account. If the tag is not available for selection, then the values also don’t show.
The hardcoded values are showing in the budget created by Terraform probably because of differences in validation with the AWS API, i.e. the UI might be doing more validation with the fields.
So if your KE tag is not activated yet, try activating it in CE and see if it works after some time.
Thanks for your answer! But I have already enabled the cost allocation tag… Anyway, now you can see it better. If you go to the GUI > edit the budget > edit filter and you click on “Values” you will have this infinite spinner, but if you click on “Tag”, select again the “KE” and then open the “Value” it works fine… so es something from terraform deployment…
In that case, I suspect that it’s either an AWS API issue or AWS Management Console issue, in either case opening an AWS support case would be the best course of action.
I yielded the same result when I converted the Terraform configuration to an AWS CLI command that I run in a CloudShell. The budget and the issue in the UI is exactly the same, indicating that it’s an upstream AWS issue.
If you want to use User-Defined Cost Allocation tags you need to add a “user:<TAG_NAME>” in the cost-filter. This information is also provided by the official AWS Docs on Cost Filters Budget filters - AWS Cost Management (amazon.com). That fixed the problem for me.