As requested in #25243 i'd like to have a data source which calls the ListCostAllocationTags API. The mentioned issue was closed by the assumption that #25272 closes the issue in Terraform 4.20.0. However, this only provides the resource and not the data source to look up cost allocation tags.
A remediation for this issue was introduced by the data source "aws_ce_tags", but this is too verbose and covers another use case.
The behavior i wish for should match the return of the ListCostAllocationTags API.
My use case is to activate a bunch of tags in the cost allocation. AWS does only allow to activate tags in the cost allocation after they have been used for ~24 hours. This means if you create a new tag which should be a cost allocation tag, terraform apply will fail. The reason is that the tag has not yet been scraped and is unavailable for usage in cost allocation.
A possible workaround for this issue would be to gather the list of available cost allocation tags with the status of "Inactive" and match those against the list of tags i want to have activated. This keeps my runs clean from errors.
I do acknowledge, that this does not solve the general error and that i have to run another apply until the tags can be used for cost allocation.
Even though i would like to implement this, my hardware is unable to compile the current code base. So i won't be able to do it.
Affected Resource(s) and/or Data Source(s)
aws_ce_cost_allocation_tags
Not sure how the resource would be called.
Potential Terraform Configuration
data "aws_ce_cost_allocation_tags" "aws_generated" {
status = "Active" # Or "Inactive"
tag_keys = ["tag-a", "tag-b"] # set(string) of tag keys to look up
type = "AWSGenerated" # Or "UserDefined"
}
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
As requested in #25243 i'd like to have a data source which calls the ListCostAllocationTags API. The mentioned issue was closed by the assumption that #25272 closes the issue in Terraform 4.20.0. However, this only provides the resource and not the data source to look up cost allocation tags.
A remediation for this issue was introduced by the data source "aws_ce_tags", but this is too verbose and covers another use case.
The behavior i wish for should match the return of the ListCostAllocationTags API.
My use case is to activate a bunch of tags in the cost allocation. AWS does only allow to activate tags in the cost allocation after they have been used for ~24 hours. This means if you create a new tag which should be a cost allocation tag, terraform apply will fail. The reason is that the tag has not yet been scraped and is unavailable for usage in cost allocation.
A possible workaround for this issue would be to gather the list of available cost allocation tags with the status of "Inactive" and match those against the list of tags i want to have activated. This keeps my runs clean from errors.
I do acknowledge, that this does not solve the general error and that i have to run another apply until the tags can be used for cost allocation.
Even though i would like to implement this, my hardware is unable to compile the current code base. So i won't be able to do it.
Affected Resource(s) and/or Data Source(s)
Not sure how the resource would be called.
Potential Terraform Configuration
References
Would you like to implement a fix?
No