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

    Gurpal Singh

    09/15/2022, 1:09 PM
    is it possible to set the environment variable here, to the value of another variable? https://www.infracost.io/docs/features/config_file/#examples
    h
    • 2
    • 5
  • g

    Gurpal Singh

    09/15/2022, 1:10 PM
    for example:
    version: 0.1
    
    projects:
      - path: dev
        usage_file: dev/infracost-usage.yml
        env:
          AWS_PROFILE: $ENV_VAR
  • h

    Hassan (Infracost)

    09/15/2022, 3:54 PM
    I'm going to try to up the fun in here 🙂 so for the last 3 months I've made a quick video of what we released in that month (I'll see how many months I can keep it going for!). Here is the September one:

    https://youtu.be/PB35QbHZeZw▾

    - and the blog here: https://www.infracost.io/blog/sep-2022-update/
    j
    • 2
    • 6
  • v

    Vitale Mazo

    09/15/2022, 6:51 PM
    anyone able to help me set the tf_root: in the gitactions yaml
    h
    • 2
    • 6
  • h

    Hugo (Infracost)

    09/15/2022, 6:52 PM
    hey vitale 👋
    v
    • 2
    • 22
  • a

    Alexandre Vinet

    09/15/2022, 7:48 PM
    Hi, I would like to know a bit more on the init container of your helm chart for self-hosting the pricing api. My understanding is that this init job is downloading the price and inject it in postgresql. Am I right?
    t
    • 2
    • 4
  • g

    Gurpal Singh

    09/15/2022, 10:10 PM
    guys, im trying to use
    infracost
    with a config file but i'm having issues.
    infracost breakdown --path=$SHOWFILE \
                                      --format=json \
                                      --config-file /atlantis-data/repos/b2c2/infrastructure/$PULL_NUM/default/infracost-generated.yml
                                      --log-level=info \
                                      --out-file=$INFRACOST_OUTPUT
    i get this error
    Error: --config-file flag cannot be used with the following flags: --path, --project-name, --terraform-*, --usage-file
    sh: --log-level=info: not found
    i can't use this against a plan file? i assumed it would... seems strange that this isn't supported. it would be great to see a diff that takes into account current usage. currently all my diffs show the cost of the min_size of the autoscaling group, so being able to get the cost based on the current instance count would be great!
  • a

    Ali (Infracost)

    09/15/2022, 10:41 PM
    Hey Guy, the config-file can be used against either Terraform dirs or plan JSON files. The error you see is because you’re passing in
    --path
    too, so it should work fine if you remove that, like this:
    infracost breakdown \
                                      --format=json \
                                      --config-file /atlantis-data/repos/b2c2/infrastructure/$PULL_NUM/default/infracost-generated.yml
                                      --log-level=info \
                                      --out-file=$INFRACOST_OUTPUT
    If you’re running
    infracost diff --config-file
    AND the config-file has paths to plan JSON files (which it should given that you’re using Atlantis with $SHOWFILE), then it should work as normal. (if you’re passing in Terraform directories, you can use option 2 mentioned in the docs, but that doesn’t apply to you)
    g
    • 2
    • 37
  • a

    Ali (Infracost)

    09/16/2022, 5:05 PM
    The Details link should open the cost estimate in Infracost Cloud, is that not working?
    v
    • 2
    • 22
  • g

    Gurpal Singh

    09/16/2022, 8:02 PM
    i'm running this command from atlantis on a PR that modifies the
    instance_type
    in a node group.
    infracost breakdown \
      --format=json \
      --config-file infracost-generated.yml
      --log-level=info \
      --out-file=$INFRACOST_OUTPUT \
      --sync-usage-file
    when i check the usage file, i can see that the file contains the live number of nodes for many of the node groups, (if i compare with what i see in the aws console), however, for some node groups it doesn't seem to get the number of nodes at all. you can see in the attached screenshot that a few node groups do not have a value for
    instances
    . all node groups are in the same eks cluster.
    a
    • 2
    • 6
  • h

    Hassan (Infracost)

    09/19/2022, 3:59 PM
    FYI everyone - Ali has promised at the first Infracost User meetup, he will recreate this iconic moment: https://twitter.com/infracost/status/1570442587533869056
    s
    t
    • 3
    • 2
  • b

    Borsi Csokas

    09/21/2022, 9:22 AM
    Hi everyone, new to the community, and would like to ask if anyone has been able to implement both the multi-project and the cache actions, as I'm currently trying to do that, but running into the following problem:
    Error: config file does not exist at terraform/infracost_config.yml
    this error does not appear with only the multi-project config file configured, but does once i try to add the caching steps to it. any clue what i'm doing wrong?
    v
    • 2
    • 8
  • s

    Slackbot

    09/21/2022, 5:42 PM
    This message was deleted.
  • m

    Mohammed Yahya - محمد المصدّر

    09/22/2022, 9:26 AM
    https://www.meetup.com/hamburg-hashicorp-user-group/events/288456943/ join us guys
  • p

    Peter Phan

    09/23/2022, 11:18 PM
    I am testing Infracost Run Task integration with TFE. I think I will need to open up firewall ports to allow Infracost to reply back to TFE. Do you know how we can get the IP addresses or IP ranges that infracost uses for this integration?
    a
    • 2
    • 1
  • h

    Hassan (Infracost)

    09/26/2022, 2:40 PM
    monday
  • h

    Hassan (Infracost)

    09/26/2022, 2:41 PM
    Happy Monday all! I got frustrated at cloud costs again and wrote a blog ❤️ The broken relationship between engineering and cloud bill owners: It turns out the closer you are to the code, the further you are from costs. https://www.infracost.io/blog/broken-relationship-between-eng-and-cloud-bill-owners/
  • z

    zahit usta

    09/26/2022, 10:38 PM
    Hey team, Can you check the error below I received from
    github actions
    ?
    Error: Error processing module at '/home/runner/work/infra-terraform-configurations/infra-terraform-configurations/aws/deployments/terragrunt.hcl'. How this module was found: Terragrunt config file found in a subdirectory of ./aws. Underlying error: /home/runner/work/infra-terraform-configurations/infra-terraform-configurations/aws/deployments/terragrunt.hcl:55,41-64: Error in function call; Call to function "find_in_parent_folders" failed: ParentFileNotFound: Could not find a account.hcl in any of the parent folders of /home/runner/work/infra-terraform-configurations/infra-terraform-configurations/aws/deployments/terragrunt.hcl. Cause: Traversed all the way to the root..
    a
    • 2
    • 3
  • z

    zahit usta

    09/26/2022, 10:38 PM
    Is there any way to check mltiple
    terragrunt
    files in different directories within the same repo?
  • p

    Paulo Correia

    09/27/2022, 10:32 AM
    Hi everyone, Before I jump into opening an issue, I will run a case trough you guys. I'm running infracost against some resources that use for_each, meaning, they're indexed by a string. like
    azurerm_storage_account.hat_test_reports[\"uksouth\"]
    What I'm seeing when running breakdown is something like this:
    time="2022-09-27T11:24:39+01:00" level=warning msg="Using eastus for resource azurerm_storage_account.hat_function_app[\"ukwest\"] as its 'location' property could not be found."
    time="2022-09-27T11:24:39+01:00" level=warning msg="Skipping resource azurerm_storage_account.hat_function_app[\"ukwest\"]. Infracost only supports StorageV2, BlockBlobStorage and FileStorage account kinds"
    For the first message, location is there as it's mandatory by terraform for the second message, it's a StorageV2 😮 code in screenshot Worth opening an issue? Running on last infracost version Terraform Core 1.2.9
    a
    a
    • 3
    • 22
  • a

    Ali (Infracost)

    09/27/2022, 5:59 PM
    Hi everyone, I’m looking for a few people to help us do 30min usability tests on two new features: • Weekly reports: this is a weekly email of the most impactful changes across all repos in an org. • GitHub App integration: setup Infracost for many repos with a few clicks. The usability test involves you sharing your screen on Zoom, trying the features, and us making notes of how we can improve any rough edges. Please DM if you have time on Thu/Fri this week, or early next week to help us 🙏
  • n

    Nathaniel Amadi

    09/28/2022, 7:21 AM
    Hello everyone, I'm new here and also just recently trying out infracost with github Actions. I noticed that infracost shows cost and cost diff for all the resources in the TF_ROOT. Is there a way to get the breakdown for each resource like I would using the CLI?
    a
    a
    • 3
    • 4
  • h

    Hugo (Infracost)

    09/29/2022, 8:43 AM
    Hey everyone, Infracost 0.10.12 has been released! 🥳 This release brings additional features that help simplify and debug users’ workflows. Some highlights include: • New environment variables to configure Infracost output currency and format. 💵 💷❗The below example show the output of the number
    64145.4525
    with different formatting options:
    | Environment variables                                                        | Output for 64145.4525 |
      |------------------------------------------------------------------------------|-----------------------|
      | INFRACOST_CURRENCY=USD<BR/>INFRACOST_CURRENCY_FORMAT="USD: 1.234,567890 $"   | `64.145,452500 $`     |
      | INFRACOST_CURRENCY=EUR<BR/>INFRACOST_CURRENCY_FORMAT="EUR: 1.234,56€"        | `64.145,45€`          |
      | INFRACOST_CURRENCY=GBP<BR/>INFRACOST_CURRENCY_FORMAT="GBP: £ 1,234.567"      | `£ 64,145.453`        |
    • The Infracost usage file now allows users to provide defaults for resource types. ⚙️ 🚀 You can now do things similar to:
    aws_dynamodb_table:
        storage_gb: 1000 # Set in all DynamoDB table resources
      aws_dynamodb_table.my_table:
        monthly_write_request_units: 200 # Merged with default that defines storage_gb
      aws_dynamodb_table.my_other_table:
        storage_gb: 50 # Overrides the default
    • Support for HCL configuration warnings in output metadata. ⚠️ This means that your Infracost Cloud runs will now contain useful information about missing configuration that could be affecting your cost estimates. 🐛 Check out the full release here
  • f

    Felipe Saravia

    09/29/2022, 6:40 PM
    👋 ¡Hola a todo el mundo!
  • f

    Felipe Saravia

    09/29/2022, 9:21 PM
    Hi guys!
  • a

    Ali (Infracost)

    09/29/2022, 9:22 PM
    Hi @Felipe Saravia, are you using the
    infracost comment
    command that is used in our CI/CD integrations? That’s the last step. Which CI/CD system are you using?
    f
    • 2
    • 7
  • f

    Felipe Saravia

    09/29/2022, 9:24 PM
    I use Gitlab to generate MR in my repo and with this command for send message
    infracost comment gitlab --path=infracost.json \
    --repo=*****/tg_gcp_cloudstorage \
    --merge-request=2 \
    --gitlab-server-url=<https://gitlab.com> \
    --gitlab-token=g*** \
    --behavior=delete-and-new
  • p

    Paulo Correia

    10/03/2022, 2:57 PM
    hey people, some advice, I use a config file to setup 3 different projects, I run a diff,then post the results do azure devops, but instead of an overview by project it gives a sum of all projects, any way to have it generating 3 boards? or have a breakdown by project when using a config file?
    t
    • 2
    • 8
  • a

    Alistair (Infracost)

    10/03/2022, 3:14 PM
    @Gianluca Di Vincenzo did the init job complete okay? I’m guessing there’s no prices in the DB because that couldn’t complete because the
    INFRACOST_API_KEY
    isn’t set.
    g
    • 2
    • 21
  • r

    Raushan

    10/04/2022, 10:02 AM
    Hi <!channel> I need help to setup bitbucket pipeline any reference will help and one more thing my tf state file is stored in S3 bucket so need reference on that regard. Thanks
    g
    a
    +3
    • 6
    • 16
Powered by Linen
Title
r

Raushan

10/04/2022, 10:02 AM
Hi <!channel> I need help to setup bitbucket pipeline any reference will help and one more thing my tf state file is stored in S3 bucket so need reference on that regard. Thanks
g

Gurpal Singh

10/04/2022, 10:04 AM
read the docs
a

Andrii Benedyk

10/04/2022, 10:04 AM
Hi Please give more detail What kind of issues you faced during pipeline setup?
r

Raushan

10/04/2022, 10:05 AM
I have gone through doc
I am not able to find references how we can use when you tfstate file in s3
h

Hugo (Infracost)

10/04/2022, 10:08 AM
hi @Raushan, please don’t use “channel” as it notifies all the 664 people in this community, and it might be a bit alarming for other members. In regards to your question - what method of integration are you using Infracost with? Plan JSON or HCL parsing?
r

Raushan

10/04/2022, 10:09 AM
My bad, Noted @Hugo (Infracost)
i

Iliyan Vutov

10/04/2022, 10:09 AM
Also, learn how to use punctuation - it helps.
m

Mohammed Yahya - محمد المصدّر

10/04/2022, 10:16 AM
Hey @Raushan Start with something so simple like:
infracost breakdown --path .
this will not need
state
file or S3 backend access.
If everything is working, then, you can read the state file with Terraform plan:
cd path/to/code

terraform init
terraform plan -out tfplan.binary
terraform show -json tfplan.binary > plan.json

infracost breakdown --path plan.json
Compare the two options, and see if you really need to use the state file for cost breakdown. 🤷
https://www.infracost.io/docs/integrations is missing Bitbucket, CircleCI, and Jenkins, I’m sure the team will work on this soon. • bitbucket pipeline = infracost pipe • CircleCI = infracost orb • Jenkins = infracost Jenkinsfile
but not that hard to write your own
r

Raushan

10/04/2022, 10:28 AM
Thanks @Mohammed Yahya - محمد المصدّر will check, and if i have doubt will let you know
h

Hugo (Infracost)

10/04/2022, 10:28 AM
Thanks, @Mohammed Yahya - محمد المصدّر. Yes, we actively encourage folks to use HCL parsing by default because this doesn’t require Terraform state or cloud credentials. If, as Mohammed rightly says, you have price inconsistencies or use rely on multiple data blocks and remote state to build resources, then we recommend the Plan JSON approach. This can be built with Terraform, as Mohammed has shown. We also have an example of a bitbucket pipeline using HCL parsing here: https://bitbucket.org/infracost/infracost-bitbucket-pipeline/src/master/
m

Mohammed Yahya - محمد المصدّر

10/04/2022, 10:31 AM
@Hugo (Infracost) Thanks for the tips, can we add
bitbucket
pipeline with the upper link to https://www.infracost.io/docs/integrations?
h

Hugo (Infracost)

10/04/2022, 10:31 AM
yeah we should probably update that
View count: 5