Title
#contributors
Mohammad Yosefpor

Mohammad Yosefpor

07/22/2021, 6:22 PM
• Do we support
count
and
for_each
for modules? It is supported since terraform v0.13, and the format would be such as
<http://module.my|module.my>_module[0].<http://aws_dynamodb_table.my|aws_dynamodb_table.my>_table
and `module.somemodule["some_key"].some and if so, does the estimate usage would apply for all modules together ro per module? I mean when we add an entry like
<http://module.my|module.my>_module.sth
since terraform would interpret this as
<http://module.my|module.my>_module[*]
Alistair (Infracost)

Alistair (Infracost)

07/22/2021, 6:36 PM
I'm not sure off the top of my head. Something we need to test and document/fix.
Mohammad Yosefpor

Mohammad Yosefpor

07/23/2021, 10:03 AM
The wildcard char for module
count
and
for_each
is not working. (also
--sync-usage-file
flag is destructive there too)
version: 0.1
resource_usage:

  module.dev[*].aws_lambda_function.hello_world:
    monthly_requests: 1000000
    request_duration_ms: 100