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

    Alistair (Infracost)

    07/30/2021, 11:28 AM
    Hi all, we will be migrating our hosted cloud pricing API to new infra tomorrow (Saturday) starting at 08:00 UK / 00:00 PT. We're not anticipating downtime, but there may be some glitches around this time. Some extra info for anyone interested... we will be migrating from MongoDB to PostgreSQL (RDS) and will deploy on EKS using our official helm chart for the Cloud Pricing API, which will be the same chart we will recommend for anyone wanting to self-host.
    🚀 2
    🙌 2
    • 1
    • 1
  • v

    Vasant rana

    08/12/2021, 2:08 AM
    Hey Everyone ! I would like to know how many hits are free for users in Infracost , like price details to access infrascost ?
    a
    • 2
    • 1
  • j

    JO

    08/17/2021, 2:29 AM
    👋 Hi everyone! where do I find a guide to integrate Infracost with Azure devops ?
    a
    a
    • 3
    • 2
  • t

    thomas v

    08/17/2021, 6:15 PM
    👋 hi'ya, i'm using infracost with atlantis and trying to figure out how i can prevent this bug:
    Terraform command failed with:
        panic: value is marked, so must be unmarked first
        goroutine 1 [running]:
        <http://github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)|github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)>
        /home/circleci/go/pkg/mod/github.com/zclconf/go-cty@v1.8.4/cty/marks.go:141
        <http://github.com/zclconf/go-cty/cty.Value.LengthInt|github.com/zclconf/go-cty/cty.Value.LengthInt>(0x2cbab00, 0xc001b1ed70, 0x25536a0, 0xc001b089f0, 0x2cbab01)
        /home/circleci/go/pkg/mod/github.com/zclconf/go-cty@v1.8.4/cty/value_ops.go:1050 +0x4f
    The command I'm using with infracost is:
    INFRACOST_TERRAFORM_WORKSPACE=$WORKSPACE TF_WORKSPACE=$WORKSPACE INFRACOST_TERRAFORM_BINARY=terraform$ATLANTIS_TERRAFORM_VERSION infracost diff --log-level warn --no-color --path $PLANFILE || true
    a
    • 2
    • 10
  • a

    Ali (Infracost)

    08/24/2021, 6:30 PM
    https://twitter.com/AliKhajeh/status/1430235136210128904
    a
    t
    • 3
    • 4
  • d

    Deepak Joshi

    08/27/2021, 6:02 AM
    Hi ,I Hope you all are doing great , I am new to open source and this infracost . I had started exploring this infracost and i want to use cloud pricing api . I have few doubts regrading cloud pricing api response of infracost , for some attributes of azure it's giving multiple prices , i figured out in one is for windows and other is for linux  . I verified it from azure pricing cal "prices": [                     {                         "USD": "40.582"                     },                     {                         "USD": "34.694"                     }                 ]  but for this response i am confused  "prices": [                     {                         "USD": "37676"                     },                     {                         "USD": "3.584"                     },                     {                         "USD": "18838"                     }                 ]  because middle is for linux machine of Das v4 series of instance D64as v4 but the first and third in array is confusing .Can some one throw some light in this
    p
    • 2
    • 9
  • v

    Victor Rodriguez Nuñez

    09/24/2021, 11:24 AM
    Hi, is there a flags to change terrraform version in docker image ?
    a
    • 2
    • 2
  • v

    Victor Rodriguez Nuñez

    09/28/2021, 11:13 AM
    Hello one question I'm adding infracost to the pipeline using the docker image, but how will it make a difference if I haven't? i dont have usage_file
    a
    • 2
    • 15
  • a

    Ali (Infracost)

    09/28/2021, 12:43 PM
    💬 Hey everyone, I’ve been chatting with users to ask about how we could make Infracost 10x more useful for them? What do you think?
    d
    a
    +2
    • 5
    • 7
  • s

    Sfenman

    09/29/2021, 1:42 PM
    Hello, Using terragrunt in a monorepo with many modules, I am trying to run
    infracost diff --path=/my/path/to/terragrunt/files
    but I get
    Detected Terraform directory at .
      ✖ Running terraform plan 
    
      Terraform command failed with:
        Error: No configuration files
        Plan requires configuration to be present. Planning without a configuration
        would mark everything for destruction, which is normally not what is desired.
        If you would like to destroy everything, run plan with the -destroy option.
        Otherwise, create a Terraform configuration file (.tf file) and try again.
    
    Error: Error running terraform plan: exit status 1
    This is probably because I have a weird structure
    ├── app-1
    │   ├── aws-data
    │   │   ├── <http://data.tf|data.tf>
    │   │   └── terragrunt.hcl
    │   ├── ec2-app
    │   │   └── terragrunt.hcl
    │   ├── iam-app-user
    │   │   └── terragrunt.hcl
    │   ├── iam-instance-profile
    │   │   └── terragrunt.hcl
    │   ├── iam-instance-profile-policy
    │   │   └── terragrunt.hcl
    │   ├── postgres-rds
    │   │   └── terragrunt.hcl
    ├── ec2-prometheus
    │   └── terragrunt.hcl
    ├── app-3
    │   ├── iam-user
    │   │   └── terragrunt.hcl
    │   └── s3
    │       └── terragrunt.hcl
    If I use
    infracost diff --path=./app-1
    for example, then Infracost will use Terragrunt instead of Terraform and it will run successfully, however since it will execute
    run-all
    commands it will take a lot of time to finish which is a problem especially for the CI. Is there a workaround for this? Please let me know if I am missing something or if it is better to open a GH Issue for my case.
    t
    a
    a
    • 4
    • 11
  • s

    Sharmila K

    10/01/2021, 9:03 AM
    👋 Hi everyone! Trying to implement infracost stage in my azure pipeline and this is the error i get. Any pointer on this is appreciated. Thanks!
    👋 1
    a
    a
    • 3
    • 12
  • m

    mikej

    10/06/2021, 5:35 PM
    Re: Terragrunt update, does this line mean that I don’t need to even put project/paths in the config_file if I have --path defined? Or is this referring to Path: in the config_file?
    You no longer need to specify multiple Terragrunt modules in your Infracost config file, unless you want to specify per-project usage. Infracost will now detect all the Terragrunt modules that exist under the specified --path
    t
    a
    • 3
    • 14
  • j

    Jesse Cureton

    10/08/2021, 3:18 AM
    Hi there! First off thanks for all the work you folks have put into Infracost - it’s been great to work with. I’ve searched Github issues and Slack for this issue but come up empty, so please forgive me if I’ve missed something. I have an Azure Pipeline in Azure DevOps that runs Infracost on PRs. It’s been working great for the last month and a half or so, but sometime between Sunday evening and now something has broken and I’m at a bit of a loss. Details in thread ➡️
    a
    • 2
    • 11
  • a

    Ali (Infracost)

    10/12/2021, 12:23 PM
    @SD welcome to the chat! Regarding issue https://github.com/infracost/cloud-pricing-api/issues/103, can you please update your docker-compose to change all
    infracost/cloud-pricing-api:latest
    to
    infracost/cloud-pricing-api:test
    and retry? That docker image was built with https://github.com/infracost/cloud-pricing-api/pull/104 to see if that helps your setup as I can’t reproduce that issue on my local machine.
    s
    • 2
    • 2
  • k

    Kasper Jacobsen

    10/12/2021, 1:19 PM
    Hi all! Just trying out the github action and I’m getting an error I can’t figure out how to resolve. Here’s the error from the github action run:
    Run infracost/infracost-gh-action@master
    /usr/bin/docker run --name infracostinfracostlatest_bf72ae --label fa4e14 --workdir /github/workspace --rm -e AWS_DEFAULT_REGION -e TERRAFORM_CLI_PATH -e INFRACOST_API_KEY -e GITHUB_TOKEN -e INPUT_PATH -e INPUT_TERRAFORM_PLAN_FLAGS -e INPUT_TERRAFORM_WORKSPACE -e INPUT_USAGE_FILE -e INPUT_CONFIG_FILE -e INPUT_PERCENTAGE_THRESHOLD -e INPUT_POST_CONDITION -e INPUT_SHOW_SKIPPED -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --entrypoint "/scripts/ci/diff.sh" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/terraform/terraform":"/github/workspace" infracost/infracost:latest  "plan.json" "" "" "" "" "" "{\"has_diff\": true}" ""
    Running infracost breakdown using:
      $ infracost breakdown --no-color --format json --path plan.json
    Error: Could not detect path type for plan.json
    
    Use the --path flag to specify the path to one of the following:
     - Terraform plan JSON file
     - Terraform/Terragrunt directory
     - Terraform plan file
     - Terraform state JSON file
    Here are the relevant lines from our action file
    - name: Terraform Plan
          if: github.ref != 'refs/heads/master'
          id: tfplan
          run: terraform plan -input=false -out plan.tfplan
          env:
            AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
            AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    
        - name: Terraform show
          if: github.ref != 'refs/heads/master' && steps.tfplan.outcome == 'success'
          id: show
          run: terraform show -json plan.tfplan > plan.json
          env:
            AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
            AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    
        - name: Run infracost diff
          if: github.ref != 'refs/heads/master' && steps.tfplan.outcome == 'success'
          uses: infracost/infracost-gh-action@master
          env:
            INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          with:
            path: plan.json
    Any clues? Let me know if you need more info 🙂
    a
    • 2
    • 26
  • s

    SD

    10/18/2021, 6:51 AM
    Hi Team, I did installation (downloaded cli based) of Infracost on my Linux machine using Curl command provided in Getting started section -- Quick Start -- install Infracost. I am able to get my cost calculation using command (Infracost breakdown --path . --usage-file usage.yml). I am not using plan file. I have created my main.tf file and I am using usage file which is available in Infracost code. Now I want to setup CI part to get latest code and usage file. I am referring CI/CD integrations GitLab CI section. Could you please guide me how I can setup CI part.
    a
    • 2
    • 1
  • s

    Semjon Bibow

    10/22/2021, 11:38 AM
    Hello there! I have a question regarding the API Key that needs to be generated: Is it okay to reuse the same API Key across the whole organization or should each team generate its own API key?
    a
    • 2
    • 2
  • a

    Andrzej Piorkowski

    10/25/2021, 1:08 PM
    Hey All, So I’ve been testing the new addition of --sync-usage-file and run into a small issue when testing it with atlantis_diff. Namely if I add the option for it to the diff script (will send a PR after I get the test working) then it creates the usage file from scratch fine but it seems that it breaks the summary json file by not grepping out the below line before outputting to json.
    └─ Synced 0 of 6 resources
    I guess it could be worked around with grep -v in the script but that seems like a hack so wanted to check did somebody else run into this or is this something you’re aware off.
    a
    a
    d
    • 4
    • 16
  • m

    Mateusz Gałęzewski

    10/29/2021, 9:19 AM
    I create an PR -> https://github.com/infracost/infracost-atlantis/pull/17 it’s change what is related to https://github.com/runatlantis/atlantis/pull/1874 There is one, very important change - WEB basic auth for atlantis 🙂
    a
    • 2
    • 13
  • s

    Stevie

    11/03/2021, 2:31 PM
    Hiho, is it possible to tell infracost GithubAction to only check paths which have changed in the pull_request event? We are using terragrunt folder structure, and my goal is to only run infracost for the terragrunt.hcl’s which have changed.
    t
    • 2
    • 4
  • a

    Ali (Infracost)

    11/04/2021, 9:04 AM
    <!everyone> checkout our Oct Update blog and upgrade to v0.9.12 to use the latest features: • Improved CLI output • Faster CLI runs • Improvements to usage-based resources (fetch more from CloudWatch) • Improvements to multi-project runs • 6 new resources I’m also excited to welcome @Vadim (Infracost) to our team 🚀
    👏 7
    👏🏼 1
    👍 5
    😛artyparrot: 10
    g
    • 2
    • 1
  • n

    Nijaguna Darshan

    11/08/2021, 3:43 PM
    Hello guys! I have set up a github CI/CD using infracost for AWS cost estimation and I want to save the o/p as a json file. I understand that I have to define a job that does it.... but I'm not able to do it. Below is the infracost.yml file... can someone please help me out here?
    a
    t
    • 3
    • 7
  • s

    Sam Judd

    11/10/2021, 5:39 PM
    Hey everyone! I am trying to deploy the cloud pricing API to AWS. If anyone has done that, could you give some guidance on roughly how that was accomplished? I have tried using the ECS-CLI but it hasn't seemed to work as intuitively as I'd hoped.
    a
    • 2
    • 1
  • m

    Matthew Tovbin

    11/12/2021, 12:08 AM
    Hi Folks. I am suddenly seeing this error. Which latest version of Terraform is available?
    a
    a
    • 3
    • 7
  • m

    McKayl Turner

    11/19/2021, 5:53 PM
    I am also running docker-compose up as sudo. I also created those folders manually and that did not help.
    a
    a
    • 3
    • 29
  • s

    Sanjar Sapar

    11/22/2021, 8:28 PM
    thanks in advance! Great product btw! 🙂
    a
    • 2
    • 2
  • a

    Ashraf Jab

    11/23/2021, 1:07 PM
    Hello, That is my first handshake with infracost 😀 My project is made this way : • folder for networking with a specific tfvars file • folder for database with a specific tfvars file • folder for compute with a specific tfvars file ... Is there a way to get only one single report that contains all the infrastructure cost estimation ?
    🤝 1
    👋 1
    a
    • 2
    • 2
  • c

    Callum Scott

    11/24/2021, 10:52 AM
    heh, why did I not know you can have many -run(s) in your step 🙂. Ok I’ll get a build sorted and report back. Many thanks
    a
    • 2
    • 11
  • a

    Alistair (Infracost)

    11/24/2021, 7:09 PM
    Anyone who is seeing an
    Error: Invalid API key
    error when running Infracost, it's related to the current AWS issue.
    • 1
    • 1
  • s

    SD

    11/26/2021, 10:02 AM
    Hi team I want to calculate cost for "aws_db_instance" resource using Infracost but in usage file it's not available. Please let me know if any example is available for the same.
    v
    a
    • 3
    • 9
Powered by Linen
Title
s

SD

11/26/2021, 10:02 AM
Hi team I want to calculate cost for "aws_db_instance" resource using Infracost but in usage file it's not available. Please let me know if any example is available for the same.
v

Vadim (Infracost)

11/26/2021, 10:10 AM
Hello Sagar! 👋 You are right, the example usage file doesn't mention
aws_db_instance
. However it supports one attribute:
monthly_standard_io_requests
. Here's how to use it:
aws_db_instance.my_db:
  monthly_standard_io_requests: 10000
But it's used only when volume type is "Magnetic" and storage type is "Standard". Here's an example of the output: https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/testdata/db_instance_test/db_instance_test.golden#L50
Here the corresponding TF resource: https://github.com/infracost/infracost/blob/master/internal/providers/terraform/aws/testdata/db_instance_test/db_instance_test.tf#L33
s

SD

11/26/2021, 10:28 AM
@Vadim (Infracost) thanks for your reply. I did this changes in usage file and now it's working fine.
v

Vadim (Infracost)

11/26/2021, 10:28 AM
Awesome! Please let me know if you need more help 🙂
a

Ali (Infracost)

11/26/2021, 10:52 AM
@SD did you try
infracost breakdown --path=... --sync-usage-file --usage-file=infracost-usage.yml
? that should have generated the params - but maybe it didn’t if we forgot to add it to https://github.com/infracost/infracost/blob/master/infracost-usage-example.yml ?
s

SD

11/26/2021, 11:01 AM
@Ali (Infracost) I have not tried this command. I took infracost-usage-example.yml file from latest release.
a

Ali (Infracost)

11/26/2021, 11:16 AM
cool - one last question, did you see https://www.infracost.io/docs/usage_based_resources at all? I’m curious how you discovered the usage-file feature
s

SD

11/29/2021, 3:33 AM
Yes I saw this ..
👍 1
View count: 5