<@U02FC3YBE5V> <@U01G5T3C76W> where did the `cloud...
# help
d
@mysterious-teacher-68276 @white-airport-8778 where did the
cloud-pricing-api
repo disappear to? I need to submit a PR to add
aws_elasticache_cluster
and
aws_elasticache_replication_group
pricing
1
w
Thanks @dazzling-journalist-91580! You shouldn’t need to update the cloud-pricing-api for resource additions or changes as all of that logic lives in the CLI. Re the cloud-pricing-api, the self-hosted version is now under our enterprise tier. If you send an email to hello@infracost.io, our team can pick it up and can see if your company already has purchased or not etc. Also, both of those resources are already supported in the CLI: https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/elasticache_cluster.go#L10 and https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/elasticache_replication_group.go#L10 but perhaps there are issues with them?
d
then I must be doing something else wrong, since this is the message I'm getting
w
what does
infracost --version
show? is it using v0.10.38? (latest)
d
yeah, it's the latest version
w
can you check
vi ~/.config/infracost/configuration.yml
and ensure that the cloud-pricing-api key is not set? so it uses the hosted version that has the latest price data
d
the hosted version is throwing the exact same error, that's what started me down this path of debugging with a local instance 😅
w
let me test my version locally…
d
oops
Copy code
api-1  | {"level":50,"time":1720892396218,"pid":18,"hostname":"8ee8b30713b9","msg":"GraphQL encountered errors:\n[{\"message\":\"GraphQL operations must contain a non-empty `query` or a `persistedQuery` extension.\"}]"}
w
Copy code
$  cat <http://main.tf|main.tf>
provider "aws" {
  region                      = "us-east-1"
  skip_credentials_validation = true
  skip_requesting_account_id  = true
  access_key                  = "mock_access_key"
  secret_key                  = "mock_secret_key"
}

resource "aws_elasticache_cluster" "example" {
  cluster_id           = "cluster-example"
  engine               = "memcached"
  node_type            = "cache.m4.large"
  num_cache_nodes      = 2
  parameter_group_name = "default.memcached1.4"
  port                 = 11211
}


$ infracost breakdown --path .
INFO Autodetected 1 Terraform project across 1 root module
INFO Found Terraform project main at directory .

Project: main

 Name                                        Monthly Qty  Unit   Monthly Cost

 aws_elasticache_cluster.example
 └─ ElastiCache (on-demand, cache.m4.large)        1,460  hours       $227.76
d
yeah, as I sent in dm, for some reason I'm seeing this in the debug report for redis:
Copy code
ElastiCache (on-demand, )