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

mammoth-painting-38799

10/26/2022, 8:15 AM
Hi Team, is there any specific trial period to use API key? Once api key is used in one self hosted environment, cannot re use to test in another self hosted environment? Thanks Iam trying to run npm run job:init in self hosted environment, error saying
A new key can be obtained by installing the infraost CLI and running infracost  auth login the key is usually stored in...yaml
l

little-author-61621

10/26/2022, 8:20 AM
@mammoth-painting-38799 the API key doesn’t expire for any calls to the cloud pricing API. Can you check if your
INFRACOST_API_KEY
env variable is set ok?
m

mammoth-painting-38799

10/26/2022, 8:21 AM
Yea its set
l

little-author-61621

10/26/2022, 8:22 AM
Are you seeing a
You do not have permission to download data
error?
m

mammoth-painting-38799

10/26/2022, 8:23 AM
Yes
But i set INFRACOST_API_KEY
message has been deleted
l

little-author-61621

10/26/2022, 8:27 AM
Can you try running the commands here to help narrow this down? https://www.infracost.io/docs/cloud_pricing_api/self_hosted/#troubleshooting
m

mammoth-painting-38799

10/26/2022, 8:45 AM
Health check 200 okey Graphql with --data 200 okey Now getting new
error downloading data getaddrinfo ENOTFOUND <http://pricing.api.infracost.io|pricing.api.infracost.io>
I set http_proxy, no_proxy all good
b

busy-agent-35515

10/26/2022, 8:58 AM
@mammoth-painting-38799 Hey! Can it be the issue we found yesterday? When
INFRACOST_API_KEY
is set to CPAPI's generated key?
Yesterday it was vice versa, CLI was picking the key that Infracost generated. And today it's the opposite? 🙂
m

mammoth-painting-38799

10/26/2022, 9:08 AM
Today iam trying to host only CPAPI in different instance (as podman container) to test in dev environment. CLI part iam clear
b

busy-agent-35515

10/26/2022, 9:09 AM
How do you set up the
INFRACOST_API_KEY
?
m

mammoth-painting-38799

10/26/2022, 9:53 AM
Yes its set.
seems i cannot access infracost.io
b

busy-agent-35515

10/26/2022, 10:05 AM
Is
curl -i <https://pricing.api.infracost.io/health>
working?
m

mammoth-painting-38799

10/26/2022, 10:20 AM
@busy-agent-35515 seems issue at my side... I have other question...is there any possibility to add markup to the pricing output ? Something like add/deduct 10% of total pricing ?
l

little-author-61621

10/26/2022, 10:27 AM
@mammoth-painting-38799 great! That functionality is only part of our Infracost Cloud SaaS product.
m

mammoth-painting-38799

10/27/2022, 5:27 AM
@busy-agent-35515 i have updated code to v0.3.9, build the local image, run the CPAPI container (haven't run init job)... its throwing error pls help.
l

little-author-61621

10/27/2022, 7:31 AM
@mammoth-painting-38799 let me have a look at this. Seems related to a recent change, so it’s something to do with IPv4/IPv6 support.
@mammoth-painting-38799 so it looks like the ipv6 fallback doesn’t work in some Operating Systems. I’ve pushed a fix in v0.3.10.
2 Views