https://infracost.io logo
Title
m

mammoth-microphone-92343

12/20/2022, 2:08 PM
Hi All, I am trying to use
infracost
with our GCP infrastructure along with
infracost-usage.yaml
file, but no luck so far. I've gone through the documentation as well provided for the infracost-usage file. Just looking for some guidance on this.
l

little-author-61621

12/20/2022, 2:09 PM
Hi @mammoth-microphone-92343, are you running infracost in a CI system or locally?
m

mammoth-microphone-92343

12/20/2022, 2:12 PM
Hello Alistair Thanks for the swift response. I am using it locallu
locally
l

little-author-61621

12/20/2022, 2:13 PM
👍 can you paste the command you are running and the output you are seeing?
m

mammoth-microphone-92343

12/20/2022, 2:14 PM
The command I am running
In my usage file, I've replaced the terraform name of the cluster resourcew
but no luck
l

little-author-61621

12/20/2022, 2:23 PM
The
Synced 0 of 583
message is for any resources we are able to sync from the cloud provider. We currently only support this for AWS. So the manual values you are adding should work.
m

mysterious-teacher-68276

12/20/2022, 2:24 PM
@mammoth-microphone-92343 is your file named
.yaml
or
.yml
?
we fail silently when we can’t find the usage file - and it seems that you might be pointing to a file that doesn’t exist
m

mammoth-microphone-92343

12/20/2022, 2:31 PM
.yaml
m

mysterious-teacher-68276

12/20/2022, 2:31 PM
you’re flag is pointing to
infracost-usage.yml
so you’ll need to update to:
--usage-file infracost-usage.yaml
m

mammoth-microphone-92343

12/20/2022, 2:32 PM
that's very embarassing 😄
m

mysterious-teacher-68276

12/20/2022, 2:32 PM
nah it’s confusing
we should fail - I can’t remember why we don’t
w

white-airport-8778

12/20/2022, 2:32 PM
I had run into this too! https://github.com/infracost/infracost/issues/1574 is the issue you should subscribe too, a community member is working on a PR
m

mammoth-microphone-92343

12/20/2022, 2:33 PM
but a developer takes it to the chin and moves on 🙏
@white-airport-8778 let me check on that
@mysterious-teacher-68276 something happened when I pointed it to yaml file this time
the command commented out everything in my usage file automatically, less these two resources
and incremented 1 resource in my output i.e. 584 in total
now
My assumption here is aws_data_transfer.my_region got added as new resource. Would that be correct ??
@mysterious-teacher-68276 not sure why it added aws_data_transfer.my_region as a resource
l

little-author-61621

12/20/2022, 2:49 PM
Yeah
aws_data_transfer
gets added as a new resource. You can comment that out if you don’t want to estimate data transfer costs.
m

mammoth-microphone-92343

12/20/2022, 2:50 PM
already did that
but it still fails silently :s 0 of 584
l

little-author-61621

12/20/2022, 2:52 PM
The
0 out of 584
is what Infracost is able to sync with the cloud, which is only supported for AWS so that is expected. What we would expect is that the estimates that are generated use the usage values you specified. Is that happening or are they still showing ‘Monthly cost depends on usage’?
m

mammoth-microphone-92343

12/20/2022, 2:55 PM
If I am testing only a single resource i.e.
google_container_cluster.mlp-gke-dev-de-anon
then I should not expect ``Monthly cost depends on usage`` in the output for above resource, would that assumption be correct ?
l

little-author-61621

12/20/2022, 2:56 PM
yes, correct
m

mammoth-microphone-92343

12/20/2022, 2:56 PM
Mega Marvelous
cuz I am not, for other GCP resources am still getting
Monthly cost depends on usage
l

little-author-61621

12/20/2022, 2:57 PM
Awesome!