-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cost estimates for ECS service not shown #2581
Comments
Thanks @la-kurt. For this case we'd need to see the following additional code to be able to debug the cause:
|
ecs_service module (main.tf)
ecs_taskdef_config_genThis module is just where we generate values for the task def configuration, such as env vars, image name, cpu/mem config, etc. just so our task def module wouldn't be too big. Here we read from a couple of data sources, such as outputs.tf
main.tf
Here's how the task def module uses the config_gen module
ecs_taskdef module
I'm not sure if I could share the variables we use here publicly, but do let me know if the code snippets here aren't enough. Thanks |
Thanks @la-kurt. I've not yet been able to reproduce it. Are you able to provide the code for the Also can I confirm what version of Infracost you are using? |
var.servers
|
@aliscott another thing that could be causing this: our task def container definitions are marked as sensitive because we use sensitive values in the environment variables. |
Thanks @la-kurt. From what I can tell so far is Infracost is unable to tell that the Infracost does this by checking the following:
So my thoughts so far are since 1 or 2 aren't specified in your Terraform code, then Infracost is trying to work out if it's a Fargate service by checking the Are you able to share the code for the |
sure @aliscott aws_ecs_cluster + capacity provider
cluster_id output
|
For some reason, infracost does not compute our ECS fargate services in the cost breakdown. Might it be because we use
for_each
? Cause I noticed it works fine in one of our projects that don't use for_each for the ecs_service module.Code snippet
Partial output of
infracost breakdown --path . --show-skipped
No ecs_service can be found in the list of computed resources, as well as in the skipped resources list.
However, when I try to run it against a plan json, infracost is able to show a more accurate cost estimation.
Partial output of
infracost breakdown --path test.json --show-skipped
Notice the disparity in # of detected resources, as well as total cost.
The text was updated successfully, but these errors were encountered: