little-author-61621
numerous-plastic-31859
09/01/2022, 4:57 PMmodule.aws.module.aws_test.module.infrastructure.module.euc_bastion.module.extra_interfaces[4].aws_eip.service_instance_eip[2]
) they use count = length(whatever)
quite a lot, so looks like it could be kind of the same?little-author-61621
whatever
numerous-plastic-31859
09/01/2022, 5:05 PMcount
instead of for_each
I cannot repro thoughlittle-author-61621
whatever
in count = length(whatever)
. Is the whatever
an expression, local or data resource?numerous-plastic-31859
09/01/2022, 5:09 PMlittle-author-61621
terraform plan
, then it’s not possible to get the result of something which can’t be determined from reading the HCL.
So if this is the case for this, I wonder if you have any thoughts on what we should show in this situation.numerous-plastic-31859
09/01/2022, 5:21 PMlively-journalist-48952
09/01/2022, 5:23 PMlittle-author-61621
My general experience with the HCL parsing feature haven’t been the best, it’s extremely slow to run on our codebase as well.How long does it take? Do you use a lot of external modules? I wonder if it’s also that this bug is causing it to be slow.
Running infracost with the TF plan output only shows we have about 8k spend where we in reality have ~15k, and HCL parsing puts us at 31k 😂Do you use a lot of usage-based services like Lambda/S3/Dynamo? We’re looking more at how we can better handle these. I’ll cc @white-airport-8778 here if he has any follow-up questions
I haven’t had much success setting up the usage file using the aws api’s either, but I guess that might be related to the HCL parsing?What issues are you hitting?
INFRACOST_TERRAFORM_CLOUD_TOKEN
you can set manually that should pull the vars if you’re using remote execution (https://www.infracost.io/docs/integrations/terraform_cloud_enterprise/#with-terraform-cloudenterprise). I wonder if this solves it for your case?lively-journalist-48952
09/01/2022, 5:38 PMlittle-author-61621
numerous-plastic-31859
09/01/2022, 5:53 PMHow long does it take? Do you use a lot of external modules? I wonder if it’s also that this bug is causing it to be slow.It takes about 5 minutes to run
infracost breakdown
, same with infracost diff
- this was using the example github actions workflow from the readme 🙂 Just ran it on my own laptop as well, 4:50min
We use a lot of our own wrapper modules that are already inside the repo to cut down on boilerplate, I wouldn’t call them external though
Do you use a lot of usage-based services like Lambda/S3/Dynamo? We’re looking more at how we can better handle these.We use dynamodb a fair bit, and tbh i don’t have an overview of our dynamo cost atm, so that could be it, I was hoping infracost could pull those metrics automatically from aws’ usage api when generating the usage file
What issues are you hitting?https://www.infracost.io/docs/features/usage_based_resources/#fetch-from-cloudwatch I ran the command here, and
/tmp/ignore.yml
didn’t have any usage specified, it was just 8000 lines of mostly commented out yaml 🙂white-airport-8778
infracost --path
as that works better for your use-case and is supported in v0.10+ too.
Re actual usage data, I’m talking to a few of our top users to explore how we can connect to their bills pull-in actual cost and usage data. DM me if you’re interested in having a call about this as it’s not an easy problem to solve and there are 3 options we’re exploring with users. @lively-journalist-48952 the same offer applies to you! Having the plan JSON method helps with this as the plan JSON has resource IDs whereas HCL does not.numerous-plastic-31859
09/01/2022, 7:46 PMplan.json
as --path
- I’m getting useful values now, will look into it a bit more tomorrow.
Thanks!