Hi All, I am trying to use `infracost` with our G...
# help
m
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
Hi @mammoth-microphone-92343, are you running infracost in a CI system or locally?
m
Hello Alistair Thanks for the swift response. I am using it locallu
locally
l
👍 can you paste the command you are running and the output you are seeing?
m
The command I am running
message has been deleted
In my usage file, I've replaced the terraform name of the cluster resourcew
but no luck
l
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
@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
.yaml
m
you’re flag is pointing to
infracost-usage.yml
so you’ll need to update to:
Copy code
--usage-file infracost-usage.yaml
m
that's very embarassing 😄
m
nah it’s confusing
we should fail - I can’t remember why we don’t
w
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
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 ??
message has been deleted
@mysterious-teacher-68276 not sure why it added aws_data_transfer.my_region as a resource
l
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
already did that
but it still fails silently :s 0 of 584
l
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
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
yes, correct
m
Mega Marvelous
cuz I am not, for other GCP resources am still getting
Monthly cost depends on usage
l
Awesome!