Hey, I am struggling to get costs for an `aws_ecs_...
# help
g
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
Hi, can you share the hcl?
g
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
yeah ideally some sanitized/minimal example that reproduces the problem
g
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
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
Okay that would explain it then 🙂 Thank you for that!