rapid-salesmen-91626
04/05/2023, 11:43 AMinfracost-usage.yml
without them being erased with the next --sync-usage-file
?
My intention is to write helpful comments for the rest of team why some usage param was chosen how it was chosen. E.g.
azurerm_monitor_action_group.default:
monthly_notifications: 90 # 1 notification per every day per every environment
Now it seems that some comments get persisted (when there was a generic comment on the line generated before), but others get erased. Is there some special comment syntax to instruct the sync functionality to ignore that particular comments and leave them in the file? Or some other way how to achieve what I'm trying to achieve? 🙂busy-agent-35515
04/05/2023, 12:04 PMversion: 0.1
resource_usage:
aws_lambda_function.hello_world:
monthly_requests: 100000000 # Foobar
request_duration_ms: 250 # Bar foo
foobar: 111 # test
and I got
resource_usage:
aws_lambda_function.hello_world:
monthly_requests: 0 # Foobar
request_duration_ms: 0 # Bar foo
foobar: 111 # test
azurerm_monitor_action_group.default
resource? If a resource from the usage file is not found, it is deleted. If you want to specify a "default" usage for all resources of the same type, you can use a separate block:
resource_type_default_usage:
azurerm_monitor_action_group:
monthly_notifications: 90 # 1 notification per every day per every environment
rapid-salesmen-91626
04/06/2023, 7:59 AMversion: 0.1
resource_type_default_usage:
# We set storage account usage globally as it's really cheap and we don't mind slight differences
azurerm_storage_account:
...
☝️ comment gets deleted
version: 0.1
resource_type_default_usage:
azurerm_storage_account: # We set storage account usage globally as it's really cheap and we don't mind slight differences
...
☝️ comment gets deleted
version: 0.1
resource_type_default_usage:
azurerm_storage_account:
data_at_rest_storage_gb: 0.0
☝️ here I deleted the comment as it seems unnecessary to me but it gets re-added
(frankly, most of the comments for Azure seem obvious to me as they just copy the name of the property so I'd be nice for me to have the ability of removing all of the comments and only keeping my comments so they "stand out" 🙂)busy-agent-35515
04/06/2023, 9:20 AM--sync-usage-file
flag 😕 One of the possible solutions might be adding an additional flag like --keep-comments
or something to adjust the generator behavior, but we'd need to implement it. May I ask you to create a new issue here so other community members can see it and upvote it and you can follow the status? If there is interest to this problem we may prioritize it, or maybe somebody can contribute too. https://github.com/infracost/infracost/issuesrapid-salesmen-91626
04/13/2023, 10:02 AM