https://infracost.io logo
#help
Title
# help
g

gorgeous-napkin-79348

06/06/2023, 4:56 PM
Hey, I am struggling to get costs for an
aws_ecs_service
resource in a terragrunt project. I see the following in the logs:
Copy code
infracost --version
Infracost v0.10.22
Copy code
time="2023-06-06T11:39:48-04:00" level=info msg="Hiding cost with no usage: module.service.aws_ecs_service.this 'Per GB per hour'"
time="2023-06-06T11:39:48-04:00" level=info msg="Hiding cost with no usage: module.service.aws_ecs_service.this 'Per vCPU per hour'"
time="2023-06-06T11:39:48-04:00" level=info msg="Hiding resource with no usage: module.service.aws_ecs_service.this"
The
aws_ecs_service
is deployed via Fargate and has
launch_type
set and the
task_definition
pointing at the arn.
c

crooked-daybreak-55253

06/06/2023, 4:59 PM
Hi, can you share the hcl?
g

gorgeous-napkin-79348

06/06/2023, 5:04 PM
Sure.. any parts that are more useful than others? It's built as a dynamic resource so has all possible options on it. Might be easier to pull the state for the deployed resources so that only the applicable values are noted. Give me a few to do that.
c

crooked-daybreak-55253

06/06/2023, 5:05 PM
yeah ideally some sanitized/minimal example that reproduces the problem
g

gorgeous-napkin-79348

06/06/2023, 5:37 PM
Do you know if the actual task definition needs to be in the same plan/state as the service? In our case that is in a different module so the aws_ecs_service resource in the plan/state just has an ARN reference to the task definition, but the definition itself would be separate.
c

crooked-daybreak-55253

06/06/2023, 5:43 PM
yeah we need some way to read the task definition and we can only process the reference if the definition hcl is loaded also
g

gorgeous-napkin-79348

06/06/2023, 5:45 PM
Okay that would explain it then 🙂 Thank you for that!
22 Views