https://infracost.io logo
Join the conversationJoin Slack
Channels
contributors
general
help
Powered by Linen
help
  • a

    ARUN Thundyill Saseendran

    02/22/2023, 8:27 PM
    Hi Guys, another new user. I was looking for a way to not upload the final data to dashboard in infracost cloud, even if it is free.
    a
    • 2
    • 8
  • n

    Noah

    02/23/2023, 7:58 PM
    Hello. To confirm: if I want to self-host the
    Cloud Pricing API
    server but POST custom GraphQL queries, I can bypass the
    infracost
    cli altogether? Scope: I want to programmatically query for pricing but w/o using Terraform.
    a
    • 2
    • 3
  • a

    ARUN Thundyill Saseendran

    02/24/2023, 11:31 AM
    Hi, I was trying infracost breakdown on a pipeline. What I see is that, the total value gets changing randomly. I mean for the same set of files, once is is $770 and at another time it $1350 So since in Gitlab CI pipeline, if I run the runner multiple times, I get multiple results fluctuating between these. Has anyone else faced a similar situation. And I hitting a known pothole?
    v
    h
    • 3
    • 27
  • s

    Slackbot

    02/24/2023, 1:06 PM
    This message was deleted.
    h
    • 2
    • 5
  • m

    Mayank Khudia

    02/27/2023, 7:17 AM
    Hello All, Just wanted to check here if Infracost is now equipped to track ‘BigTable’ and ‘Bigquery’ costs for GCP projects ??
    v
    • 2
    • 5
  • s

    Scott Emberson

    03/03/2023, 8:13 AM
    Hi, we are looking to do a POC on this tool as it looks great. Just a quick question, we use Azure Pipelines and we use variables to deploy our Iac
    terraform plan -var 'geo=us' -var 'environment=ecos'
    How can we build this into our pull requests to say env ecos cost X, env qa2 cost X, prod1 will cost X.
    h
    • 2
    • 34
  • p

    Paulo Correia

    03/06/2023, 2:22 PM
    Hi gents, I was trying to setting the override location in the config file, but wehn I run the breakdown, it still fallsbacks to aadefault region eastus, different from the one I set as default, any clue why? This si also caused probably because infracost can't seem to find an indexed resource like this: "Using eastus for resource azurerm_storage_account.test_reports[\"uksouth\"] as its 'location' property could not be found." those backslashes are probably the reason infracost can't find the resource, although it exists, (and deployed) Thread in #general
    h
    • 2
    • 29
  • m

    Mayank Khudia

    03/07/2023, 12:09 PM
    Hello Team, We are utilising Infracost to estimate monthly costs for org’s GCP resources. We are running 3 clusters in our GCP project of
    Location Type: Zonal
    . I believe it is not supported by infracost. Correct me if am wrong here.
  • m

    Mayank Khudia

    03/07/2023, 12:10 PM
    Or is it for
    zonal
    clusters under free tier ??
    a
    • 2
    • 10
  • h

    Harshul Goel

    03/07/2023, 6:31 PM
    Hey, I want to pass a step even in GH actions even if infracost runs into an error like this, is that a possibility?
    h
    a
    • 3
    • 3
  • m

    Max Kruger

    03/09/2023, 12:09 PM
    Hey - we’re just getting started with Infrascost today, and have a question about the previous cost. Is there a way to dry-run the terraform code, so the tool knows what we have deployed already with terraform?
    h
    • 2
    • 19
  • h

    Harikrishna Kuchibhotla

    03/10/2023, 9:05 PM
    Hi, I am trying to add infracost to the CICD using this Quick Start: https://github.com/infracost/actions We use Terragrunt and the folder structure is something like this:
    ./tf-repo
    ├── .github
    │   └── workflow.yml
    └── infras
        ├── account1
        │   └── us-east-1
        │       ├── app1
        │       │   └── <http://main.tf|main.tf>
        │       ├── app2
        │       │   └── <http://main.tf|main.tf>
        │       └── app3
        │           └── <http://main.tf|main.tf>
        └── account2
    The PR integration is in-place and the infracost check runs successfully but nothing is displayed on the dashboard. how is the usage file supposed to work? The folder depth is 5 from the root.
    t
    • 2
    • 3
  • n

    Noah

    03/13/2023, 5:03 PM
    Hi everyone. Is there a way to peek at the GraphQL query generated by
    infracost
    ? Our team doesn't use Terraform, but I'm interested in the
    Cloud Pricing API
    server. I'm looking to dynamically construct a GraphQL query to submit to a self-hosted
    Cloud Pricing
    server, and I'm looking to see how
    infracost breakdown
    works. Taking this Terraform example:
    $ cat <http://ec2_simple.tf|ec2_simple.tf>
    resources "aws_instance" "my-web-service" {
      instance_type = "t2.micro"
    }
    Running
    infracost breakdown -p .
    gives us:
    OVERALL TOTAL $9.27
    . I'm looking to see what the GraphQL query looks like in this simple example, then to construct larger Terraform files to see how the query changes.
    a
    • 2
    • 4
  • m

    Mayank Khudia

    03/15/2023, 12:32 PM
    Hello Team, Can you confirm that all the supported GCP resource are ‘not’ in https://github.com/infracost/infracost/blob/master/infracost-usage-example.yml
    h
    • 2
    • 7
  • o

    Oliver Schoenborn

    03/16/2023, 1:37 AM
    Does this look incorrect? AWS RDS price 0 even though it is not free tier: size is
    db.t3.medium
    . The infracost says class is mock, little weird. Latest release 0.10.18 and command used was:
    infracost breakdown --path .
    in the folder that has the tf files and tfvars etc. This stack is live.
    Name                                                                       Monthly Qty  Unit                    Monthly Cost 
     module.dss_comp_database.aws_db_instance.postgres[0]                                                                         
     ├─ Database instance (on-demand, Single-AZ, db_instance_class-mock)                730  hours                          $0.00 
     └─ Storage (general purpose SSD, gp2)                                               20  GB                             $2.54
    t
    • 2
    • 3
  • s

    Sam L'Huillier

    03/17/2023, 12:15 AM
    Hi! Does the Cloud Pricing API have an OpenAPI specification?
    a
    • 2
    • 9
  • s

    Scott Emberson

    03/17/2023, 12:27 PM
    Hi, might sounds like a odd question. I am using the infracost tool inside Visual studio code, when it runs it creates an manifest file. I presume this shouldn't be checked into the repo?
    h
    • 2
    • 1
  • j

    Julius Oh

    03/19/2023, 7:10 AM
    infracost comment github --path /tmp/infracost.json --repo juliusoh/portfolio-aws-terraform --github-token ${{ github.token }} --behavior=update --commit $GITHUB_SHA
    Errors with
    POST <https://api.github.com/repos/juliusoh/portfolio-aws-terraform/commits/8ebabc614fa7b69c006ea450661a2026c40ac179/comments>: 403 Resource not accessible by integration []
    v
    • 2
    • 1
  • m

    Mengying Li

    03/21/2023, 12:49 AM
    Hi, I’m trying to troubleshoot an issue that is showing up the cost showing up as below picture (basically previous cost is $0). This is definitely wrong since all I did is making the rds instance size larger so should be much lower cost. I did run locally using infracost breakdown, then infracost diff. It shows the correct number. This is my setup in atlantis:
    - run: terragrunt show -json "$$PLANFILE" > "$$SHOWFILE"
          - run: |
                infracost breakdown --path="$$SHOWFILE" \
                                    --format=json \
                                    --log-level=info \
                                    --out-file="$$INFRACOST_OUTPUT" \
                                    --project-name="$$REPO_REL_DIR"
          - run: |
                        infracost comment github --repo xxx \
                                       --pull-request $$PULL_NUM \
                                       --path $$INFRACOST_OUTPUT \
                                       --github-token $$ATLANTIS_GH_TOKEN \
                                       --tag $$INFRACOST_COMMENT_TAG \
                                       --behavior new
    I guess I’m trying to understand generally why we don’t need infracost diff inside cicd set up. I’m using terragrunt with atlantis as my set up. Any help would be appreciated, many thanks
    t
    a
    • 3
    • 10
  • s

    Scott Emberson

    03/21/2023, 10:04 AM
    Hi, in the infracost.yml file, can we override the location property per project? To remove the warning
    Using eastus for resource module.network.azurerm_virtual_network_peering.vnet_hub_adm as its 'location' property could not be found.
    as infracost is not picking up the region
    v
    a
    • 3
    • 12
  • j

    John

    03/21/2023, 3:30 PM
    Hello there. I was about creating a workflow.yml for gh action and had an issue. So I have multiple pipeline in 1 workflow (terrafrom fmt, checkov etc...), and all these pipelines can run
    on: pull_request
    but Infracost syntax runs only with this syntax
    on: [pull_request]
    . Is there any other option to fix this issue? Thank you in advance.
    v
    • 2
    • 19
  • n

    Noah

    03/21/2023, 3:56 PM
    Good morning. I'm looking for the file that has the
    Azure Container App
    resource file. I'm looking in
    infracost/internal/resources/azure/
    v
    • 2
    • 19
  • n

    Noah

    03/21/2023, 3:56 PM
    I'd like to see what the default values are, as I'm trying to understand how the GQL query is constructed
  • n

    Noah

    03/21/2023, 7:44 PM
    I'm learning how the GraphQL query generation works. If one of the
    schema.AttributeFilter
    s is removed, will the
    Cloud Pricing API Server
    respond successfully? E.g.:
    // computeCostComponent returns a cost component for server compute requirements.                                                                                                           
    func (r *PostgreSQLFlexibleServer) computeCostComponent() *schema.CostComponent {                                                                                                           
        attrs := getFlexibleServerFilterAttributes(r.Tier, r.InstanceType, r.InstanceVersion)                                                                                                   
                                                                                                                                                                                                
        return &schema.CostComponent{                                                                                                                                                           
            Name:           fmt.Sprintf("Compute (%s)", r.SKU),                                                                                                                                 
            Unit:           "hours",                                                                                                                                                            
            UnitMultiplier: decimal.NewFromInt(1),                                                                                                                                              
            HourlyQuantity: decimalPtr(decimal.NewFromInt(1)),                                                                                                                                  
            ProductFilter: &schema.ProductFilter{                                                                                                                                               
                VendorName:    strPtr("azure"),                                                                                                                                                 
                Region:        strPtr(r.Region),                                                                                                                                                
                Service:       strPtr("Azure Database for PostgreSQL"),                                                                                                                         
                ProductFamily: strPtr("Databases"),                                                                                                                                             
                AttributeFilters: []*schema.AttributeFilter{                                                                                                                                    
                    {Key: "productName", ValueRegex: strPtr(fmt.Sprintf("/^Azure Database for PostgreSQL Flexible Server %s %s/i", attrs.TierName, attrs.Series))}, // <-------------                            
                    {Key: "skuName", ValueRegex: regexPtr(fmt.Sprintf("^%s$", attrs.SKUName))}, // <-------------                                                                                                 
                    {Key: "meterName", ValueRegex: regexPtr(fmt.Sprintf("^%s$", attrs.MeterName))}, // <-------------                                                                                             
                },                                                                                                                                                                              
            },                                                                                                                                                                                  
            PriceFilter: &schema.PriceFilter{                                                                                                                                                   
                PurchaseOption: strPtr("Consumption"),                                                                                                                                          
            },                                                                                                                                                                                  
        }                                                                                                                                                                                       
    }
    a
    h
    • 3
    • 14
  • n

    Noah

    03/22/2023, 6:48 PM
    When `POST`ing to a local
    Cloud Pricing API
    server, I get this:
    ~/cloud-pricing-api $ curl -X POST <http://localhost:4000>
    {"error":"Invalid API key"}
    What is the format for including the API credential in the
    POST
    request?
    v
    • 2
    • 4
  • s

    Slackbot

    03/23/2023, 7:07 PM
    This message was deleted.
  • m

    Mengying Li

    03/27/2023, 5:13 PM
    Hi, I’m currently experimenting with the usage file and trying to use reserve instance cost instead of on demand. Do you maybe have an example of what it looks like for changes like changing xlarge instance to 2xlarge instance for reserved instance (all upfront)? I know the monthly cost is 0 since it charge by yearly so I would love to see how the UI looks like before switching to it. Many thanks
    t
    • 2
    • 1
  • n

    Noah

    03/27/2023, 8:12 PM
    Hello all. I'm still trying to understand the
    infracost/infracost
    source code, as I am building a custom interface to the
    Cloud Pricing API Server
    (we do not use
    terraform
    ). I am looking at
    internal/providers/terraform/azure/application_gateway.go
    , and see the following: • Data processing cost component • Capacity units cost component • Gateway cost component • Fixed for V2 cost component For a custom interface to the pricing API, is the GraphQL query a composite of the 4 price components? E.g. the 4 need to get calculated then added up?
    a
    • 2
    • 1
  • i

    Ilya Zhorov

    03/28/2023, 2:05 PM
    Hey guys, trying to test infra cost github integration -> provided ssh key and token everything per guide. Failing on the read operation to our internal modules (indeed all access provided and ssh key is tested that everything works for gitclone) Any chance by theory it can be due to our reference to TAG ? aka
    git clone '<ssh://git@github.com/contentsquare/platform_terraform_modules.git?ref=7.24.7>'
    which will indeed fail than maybe drop to wrong error handling? some direction appreciated 🙏
    a
    h
    • 3
    • 6
  • s

    Sam L'Huillier

    03/29/2023, 12:56 AM
    Hey! Why is the price returned by the GCP console so different to what the API returns? Am I missing something? Many thanks in advance for the help!
    a
    • 2
    • 3
Powered by Linen
Title
s

Sam L'Huillier

03/29/2023, 12:56 AM
Hey! Why is the price returned by the GCP console so different to what the API returns? Am I missing something? Many thanks in advance for the help!
a

Ali (Infracost)

03/29/2023, 2:51 AM
$539.82 / 730 hours = 0.7394…
s

Sam L'Huillier

03/29/2023, 2:54 AM
Ah ok! How would I get the cost of the gpu in that case?
a

Ali (Infracost)

03/29/2023, 5:46 AM
Great question - you’d need to update the query filters to find those, search for GPU in the infracost/infracost code base to find the google resource filters for it
View count: 1