bumpy-match-12594
08/02/2022, 9:33 AMlittle-author-61621
bumpy-match-12594
08/02/2022, 9:37 AMlittle-author-61621
/status
endpoint. Have you tried /health
. There’s some troubleshooting curls here that might help: https://www.infracost.io/docs/cloud_pricing_api/self_hosted/#troubleshootingbumpy-match-12594
08/02/2022, 9:50 AMlittle-author-61621
bumpy-match-12594
08/02/2022, 9:51 AMlittle-author-61621
bumpy-match-12594
08/02/2022, 9:54 AMinfracost configure set api_key <api_key>
INFRACOST_API_KEY
little-author-61621
/graphql
endpoint return okay from the VM with the CLI?bumpy-match-12594
08/02/2022, 9:57 AMX-Api-Key: <key>
little-author-61621
bumpy-match-12594
08/02/2022, 10:20 AMlittle-author-61621
Getting pricing details from
in the logs? If so, is that looking at the correct pricing API endpoint?bumpy-match-12594
08/02/2022, 10:34 AMazurerm_managed_disk
little-author-61621
bumpy-match-12594
08/02/2022, 10:42 AMlittle-author-61621
provider "aws" {
region = "us-east-1" # <<<<< Try changing this to eu-west-1 to compare the costs
skip_credentials_validation = true
skip_requesting_account_id = true
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
resource "aws_instance" "web_app" {
ami = "ami-674cbc1e"
instance_type = "m5.4xlarge" # <<<<< Try changing this to m5.8xlarge to compare the costs
root_block_device {
volume_size = 50
}
ebs_block_device {
device_name = "my_data"
volume_type = "io1" # <<<<< Try changing this to gp2 to compare costs
volume_size = 1000
iops = 800
}
}
resource "aws_lambda_function" "hello_world" {
function_name = "hello_world"
role = "arn:aws:lambda:us-east-1:account-id:resource-id"
handler = "exports.test"
runtime = "nodejs12.x"
memory_size = 1024 # <<<<< Try changing this to 512 to compare costs
}
output "aws_instance_type" {
value = aws_instance.web_app.instance_type
}
.env
or .env.local
files in the directory Infracost is running in?bumpy-match-12594
08/02/2022, 11:40 AMlittle-author-61621
bumpy-match-12594
08/02/2022, 11:42 AMlittle-author-61621
bumpy-match-12594
08/02/2022, 12:35 PMlittle-author-61621
curl -i $INFRACOST_PRICING_API_ENDPOINT/graphql -H "X-Api-Key: WRONG_API_KEY"
I want to see if that returns an “Invalid API key” error or a “403 Forbidden” errorbumpy-match-12594
08/02/2022, 12:39 PMlittle-author-61621
INFRACOST_API_KEY
env variable to WRONG_API_KEY as well to see if it changes the error for the CLIbumpy-match-12594
08/02/2022, 12:40 PMlittle-author-61621
error="Invalid API key"
for the CLI, so this makes me think it’s not the Cloud Pricing API returning the error but something else. That would also make sense by the fact we’re not seeing any logs in the Cloud Pricing API for these requests.bumpy-match-12594
08/02/2022, 12:54 PMlittle-author-61621
Is there a way I can disable proxy for the cli command?No, we just pick up whatever is in the environment. Can you echo out $http_proxy $https_proxy $HTTP_PROXY and $HTTPS_PROXY. We might be able to tell from that.
bumpy-match-12594
08/02/2022, 12:56 PMlittle-author-61621
curl --proxy="$HTTP_PROXY" ...
and we can see if they have the same errorbumpy-match-12594
08/02/2022, 1:02 PMlittle-author-61621
export no_proxy=<vm>:<port>
with your VM’s IP and port and see if that works.bumpy-match-12594
08/02/2022, 1:18 PMlittle-author-61621
bumpy-match-12594
08/02/2022, 6:36 PM