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

    Ali (Infracost)

    07/07/2022, 5:49 PM
    @Mark Santolucito this is the chat I was referring too in the community call 🙂
    h
    r
    m
    • 4
    • 3
  • j

    Johannes Grumböck

    07/08/2022, 5:23 AM
    Hi @Hugo (Infracost), I’m not quite sure if it’s a good idea that the infracost VSCode plugin creates a
    .infracost
    folder everywhere it finds terraform code. It’s a little bit tedious to extend all the
    .gitignore
    files - also from other open-source projects, where I not even want to commit/push that change. Would it be better if infracost would store the “temporary” files in some other shadow tree under
    $HOME
    ? Don’t know … How do others think about it? Cheers, Jo
    h
    • 2
    • 12
  • h

    Hilton Lem

    07/11/2022, 3:21 PM
    Hi All, has anyone made use of the metadata section in the json output of the CLI? We’re looking at adding some data into it for IBM terraform resources.
    a
    r
    • 3
    • 7
  • s

    Sawyer Ward

    07/12/2022, 5:40 AM
    Here’s my first PR. It should implement #1616.
    🙌 1
    👍 1
    h
    • 2
    • 1
  • v

    Vivian Hunt

    07/12/2022, 11:06 AM
    Hello, I have a PR https://github.com/infracost/helm-charts/pull/22 This is to allow Helm self hosted deployments to use PostGRES secret when the client provides their own DB. Currently the secret is only used for Infracost PostGRES sub chart deploys.
    🚀 1
    v
    • 2
    • 1
  • s

    Sawyer Ward

    07/12/2022, 10:17 PM
    Hi everyone, another PR to add azure vnet peering support.
    🎉 2
  • s

    Sina Bakhtiari

    07/30/2022, 6:25 AM
    Hi team, I’ve got a problem that I can’t figure out why it’s happening. This pipeline is failing because of aws_instance however the master branch does not have this problem and my PR did not touch anything related to AWS.
    a
    • 2
    • 3
  • b

    Balázs Marján

    08/12/2022, 2:06 PM
    Hi everyone, I’m working with @Hilton Lem on adding IBM Cloud support to Infracost. We are looking at generating usage files for terraform configurations and we have 2 use cases that I want to get your opinion about: 1, The user wants to generate their initial usage file:
    sync-usage-file
    option helps them out here by providing a usage file with default values(mostly 0s). Do you see a way this could be improved by somehow providing reasonable defaults, something like the contents of the
    infracost-usage-example.yml
    . Perhaps somehow leveraging that file. Do you see any value here? 2, The user already has their estimate and usage file but they add a new resource that’s type matches an already existing one in the configuration. When using the
    sync-usage-file
    option, could option leverage the already existing usage estimates for the existing resource type for the same type of resource that was just added? Again, do you think there is any value here? Thanks!
    a
    h
    +2
    • 5
    • 18
  • h

    Hilton Lem

    08/19/2022, 3:05 PM
    Hi All, Was wondering about the cli supporting other forms of authentication? We’d like to have the CLI support IAM authentication. Is this something you’ve thought of?
    a
    • 2
    • 1
  • b

    Burak

    08/23/2022, 2:17 PM
    Hello, I am trying to contribute infracost app. I was following contribute doc to add Google Cloud Build Worker Pool support. But I don't get same outputs about price database when following contribute documentation. And also there is mistake in the documentation. I am a beginner developer. Who can assist me?
    h
    • 2
    • 2
  • t

    Tim (Infracost)

    08/30/2022, 1:20 PM
    @tom mg thanks for taking on the GCP custom instances issue. I’m going to post in github for better visibility, but feel free to ping me here if that works better.
    t
    a
    • 3
    • 29
  • t

    Timothy

    09/21/2022, 6:51 AM
    Before I go and make a fool of myself, how silly would it be to use Infracost with 3rd party providers, specifically:
    terraform {
      required_providers {
        confluent = {
          source  = "confluentinc/confluent"
          version = "1.3.0"
        }
      }
    }
    I’m a bit rusty with Golang, but if its not too silly, I’m prepared to create a card and have a go with it.
    v
    • 2
    • 2
  • a

    Alistair (Infracost)

    10/10/2022, 10:48 AM
    I’ve merged https://github.com/infracost/infracost/pull/1944 now, so Infracost is now using golang 1.19.
  • f

    Fatih Tokus

    10/13/2022, 1:28 PM
    Hi all,
  • f

    Fatih Tokus

    10/13/2022, 1:31 PM
    I am having issues with running any test on my windows machine. For example the following test is failing on my machine but it is green on Github action which makes me think that the is related somehow character set of windows. I wonder if any of you has the same issue:
    s
    v
    • 3
    • 7
  • f

    Fatih Tokus

    10/13/2022, 1:31 PM
    C:\Users\fatih\IdeaProjects\infracost_fork\infracost\cmd\infracost> go test -v -run TestOutputFormatGitHubCommentNoChange === RUN TestOutputFormatGitHubCommentNoChange === RUN TestOutputFormatGitHubCommentNoChange/HCL Update: A new version of Infracost is available: → v0.10.12 Go to https://www.infracost.io/docs/update for instructions testutil.go:192: Output does not match golden file: --- Expected +++ Actual @@ -1,34 +1,34 @@ - -💰 Infracost estimate: monthly cost will not change -<table> - <thead> - <td>Project</td> - <td>Previous</td> - <td>New</td> - <td>Diff</td> - </thead> - <tbody> - <tr> - <td>infracost/infracost/cmd/infraco...aform_v0.14_nochange_plan.json</td> - <td align="right">$40.56</td> - <td align="right">$40.56</td> - <td>$0</td> - </tr> - </tbody> -</table> - -<details> -<summary><strong>Infracost output</strong></summary> - -
    -──────────────────────────────────
            -
            -The following projects have no cost estimate changes: infracost/infracost/cmd/infracost/testdata/terraform_v0.14_nochange_plan.json
            -Run the following command to see their breakdown: infracost breakdown --path=/path/to/code
            -
            -──────────────────────────────────
            -
            -
    -</details> - +💰 Infracost estimate: monthly cost will not change +<table> + <thead> + <td>Project</td> + <td>Previous</td> + <td>New</td> + <td>Diff</td> + </thead> + <tbody> + <tr> + <td>infracost/infracost/cmd/infraco...aform_v0.14_nochange_plan.json</td> + <td align="right">$40.56</td> + <td align="right">$40.56</td> + <td>$0</td> + </tr> + </tbody> +</table> + +<details> +<summary><strong>Infracost output</strong></summary> + +``` +────────────────────────────────── + +The following projects have no cost estimate changes: infracost/infracost/cmd/infracost/testdata/terraform_v0.14_nochange_plan.json +Run the following command to see their breakdown: infracost breakdown --path=/path/to/code + +────────────────────────────────── + +``` +</details> + + --- FAIL: TestOutputFormatGitHubCommentNoChange (0.06s) --- FAIL: TestOutputFormatGitHubCommentNoChange/HCL (0.06s)
  • j

    Johannes Grumböck

    10/14/2022, 8:02 AM
    Hi all, How do I fix “multiple prices”-problem in golden tests? I wanted to contribute for Hacktoberfest and did https://github.com/infracost/infracost/pull/2090 So, I thought it would be an easy fix (what it was actually), but now I’m stuck with the following error running the tests locally:
    ❯ INFRACOST_LOG_LEVEL=debug go test -v -cover ./internal/providers/terraform/aws/fsx_windows_file_system_test.go
    === RUN TestFSXWindowsFS
    === PAUSE TestFSXWindowsFS
    === CONT TestFSXWindowsFS
    === RUN TestFSXWindowsFS/HCL
    level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_file_system_ssd SSD storage, using the first product”
    testutil.go:202: Unexpected log write. To capture logs remove t.Parallel and use GoldenFileOptions { CaptureLogs = true }: level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_file_system_ssd SSD storage, using the first product”
    level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_system_ssd SSD storage, using the first product”
    testutil.go:202: Unexpected log write. To capture logs remove t.Parallel and use GoldenFileOptions { CaptureLogs = true }: level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_system_ssd SSD storage, using the first product”
    === RUN TestFSXWindowsFS/Terraform_CLI
    level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_file_system_ssd SSD storage, using the first product”
    testutil.go:202: Unexpected log write. To capture logs remove t.Parallel and use GoldenFileOptions { CaptureLogs = true }: level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_file_system_ssd SSD storage, using the first product”
    level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_system_ssd SSD storage, using the first product”
    testutil.go:202: Unexpected log write. To capture logs remove t.Parallel and use GoldenFileOptions { CaptureLogs = true }: level=warning msg=“Multiple products with prices found for aws_fsx_windows_file_system.my_system_ssd SSD storage, using the first product”
    --- FAIL: TestFSXWindowsFS (6.62s)
    --- FAIL: TestFSXWindowsFS/HCL (0.65s)
    --- FAIL: TestFSXWindowsFS/Terraform_CLI (5.97s)
    FAIL
    coverage: [no statements]
    FAIL command-line-arguments 7.180s
    FAIL
    Where would I need to start debugging that? Thanks, Johannes
    h
    • 2
    • 13
  • r

    Rob Houghton

    11/13/2022, 11:07 AM
    Does anyone have an example of price filtering query within the pricing api? Or is it not possible?
    v
    • 2
    • 3
  • r

    Rob Houghton

    11/16/2022, 1:42 PM
    @Alistair (Infracost) I've added tiered lambda pricing in PR fix: (AWS) Adds support for lambda tiered pricing. Tests run ok locally but I seem to have an issue with pipeline checks & golden files. Is there anything additional I need to do?
    a
    • 2
    • 3
  • j

    Johannes Grumböck

    11/25/2022, 10:46 AM
    Is anyone attending AWS re:invent next week? I’ll be there.
  • h

    Hugo (Infracost)

    11/25/2022, 10:47 AM
    lucky chap
  • h

    Hugo (Infracost)

    11/25/2022, 10:48 AM
    Sadly I don’t think any of the Infracost team will be there (but I might be wrong)
  • h

    Hassan (Infracost)

    11/25/2022, 10:54 AM
    I'll be there next year. This yea, I have a flight to the US a week after re:invent, I don't think I can go, come back, and go again that quickly haha
  • j

    Johannes Grumböck

    11/25/2022, 7:02 PM
    I do understand. Will be my first time this year, so, whenever any other contributor is there, just ping me. Best way via @jgrumboe on Twitter. 👋
  • d

    Duncan

    01/06/2023, 8:52 AM
    A friend at Zapier sent this to me. I'm not sure if it's of any interest to Infracost but it seems they are doing something ~novel with TF Cloud and VCS integrations. So I thought I'd pass it on in case there was anything interesting in terms of apply-before-merge workflows. https://github.com/zapier/tfbuddy
  • p

    Pat Myron

    01/24/2023, 12:10 AM
    new AWS region just opened btw https://aws.amazon.com/blogs/aws/now-open-aws-asia-pacific-melbourne-region-in-australia/
    t
    • 2
    • 1
  • r

    Rob Houghton

    02/06/2023, 1:38 PM
    Hi, can I just clarify something with ReferenceAttributes? I've added the following reference attribute for the lambda function resource
    func getLambdaFunctionRegistryItem() *schema.RegistryItem {
    	return &schema.RegistryItem{
    		Name:                "aws_lambda_function",
    		Notes:               []string{"Provisioned concurrency is not yet supported."},
    		ReferenceAttributes: []string{"function_name"},
    		CoreRFunc:           NewLambdaFunction,
    	}
    }
    I then added this to a new resource for provisioned concurrency
    func getLambdaProvisionedConcurrencyConfigRegistryItem() *schema.RegistryItem {
    	return &schema.RegistryItem{
    		Name:                "aws_lambda_provisioned_concurrency_config",
    		RFunc:               NewLambdaProvisionedConcurrencyConfig,
    		ReferenceAttributes: []string{"aws_lambda_function.function_name"},
    	}
    }
    Am I missing something ? Because I'm unable to access this from within the new provisioned concurrency resource. It's empty!! Any help would be appreciated, I looked at the example here Example terraform below.
    # Add example resources for LambdaProvisionedConcurrencyConfig below
    resource "aws_lambda_provisioned_concurrency_config" "lambda_provisioned_concurrency_config" {
      function_name                     = aws_lambda_function.lambda.function_name
      provisioned_concurrent_executions = 50
      qualifier                         = aws_lambda_function.lambda.version
    }
    
    resource "aws_lambda_function" "lambda" {
      function_name = "lambda_function_name"
      role          = "arn:aws:lambda:us-east-1:account-id:resource-id"
      handler       = "exports.test"
      filename      = "function.zip"
      runtime       = "nodejs12.x"
      architectures = ["arm64"]
      memory_size   = 512
    }
    a
    • 2
    • 7
  • a

    Ali (Infracost)

    02/09/2023, 4:34 PM
    @Jesse Wellenberg just following up from this thread: Have you seen the repos and projects description in this docs page? I’m thinking deployment scope, resource group name, location etc. can initially be treated as project-level inputs in the infracost config-file, similar to how users can provide TF vars or var-files or env vars for a TF project. Would something like this work?
    version: 0.1
      projects:
        - path: my-whatif.json
          name: development
          arm_location: us-east-1
          arm_resource_group_name: myRG
          # or something like this so the same param names to the ARM CLI can be defined?
          arm:
            location: us-east-1
            resource_group_name: myRG
    j
    h
    • 3
    • 8
  • j

    Johannes Grumböck

    03/14/2023, 8:11 AM
    Hi, I think I’ve found a little bug in the infracost vscode extension (version v0.2.6 installed) when summing up the total costs per project: The project total costs sum up all tree childs, which is not correct, because the tree contains the .tf file and the resources/modules within. See screenshot attached. The google/apps/europe-west1/dev project should only say “$73.00” instead of “$146.00" (which is just the double as the main.tf and the module are child elements of the project). Greetings, Jo
    a
    • 2
    • 4
  • j

    Jesse Cureton

    03/28/2023, 12:07 AM
    Hi! I’ve found a minor annoyance related to the
    azurerm_lb_rule
    resource. If the rule is attached to an
    azurerm_lb
    load balancer with the
    Basic
    SKU this is a free resource, but if it’s attached to a
    Standard
    SKU it has an associated cost. The original issue requesting support for these load balancers called this out, but it looks like it was missed in the the initial implementation. 🧵
    t
    • 2
    • 10
Powered by Linen
Title
j

Jesse Cureton

03/28/2023, 12:07 AM
Hi! I’ve found a minor annoyance related to the
azurerm_lb_rule
resource. If the rule is attached to an
azurerm_lb
load balancer with the
Basic
SKU this is a free resource, but if it’s attached to a
Standard
SKU it has an associated cost. The original issue requesting support for these load balancers called this out, but it looks like it was missed in the the initial implementation. 🧵
I took a quick look at the `lb_rule`’s cost component and it seems like this would be pretty easy to implement. Basically: 1. Implement a
lookupParentSku()
helper similar to the lookupRegion helper 2. Set the
skuName
field in the ProductFilter for the
lb_rule
to match the parent load balancer’s SKU The piece I’m not familiar with is how to add a new resource price like this to the cloud pricing backend. The dumb answer is to just set the UnitMultiplier for the lb_rule to zero, but I suspect that’s not the correct answer 😁. I’m also not clear how a sometimes-free resource would relate to the “free resources” lists.
Is there anything I’m missing here that makes this harder than I’m imagining? I can file a Github issue with these details if you’d like. I’m happy to work on an implementation myself, unless this is either super easy for you all to do or super hard for me to do.
t

Tim (Infracost)

03/28/2023, 11:42 AM
Hey Jesse thanks for pointing this out. Yes it looks like an easy fix. I’ll jump on it now because we’re going to release a new version today or tomorrow and I’d like to get it in that.
If you’re up for it, it would be great if you could review (or suggest) appropriate test cases.
j

Jesse Cureton

03/28/2023, 12:25 PM
Great, thanks! I will give these test cases a review once I get to a computer
https://pastebin.com/AMpqgb59
Here’s a diff that will get you close in test cases. I generated these goldens by hand so I don’t think they’re perfect, but this will get you super close on the test cases
t

Tim (Infracost)

03/28/2023, 3:57 PM
FYI: https://github.com/infracost/infracost/pull/2377/files
j

Jesse Cureton

03/28/2023, 6:14 PM
Nice!! This looks good to me
Thanks for the fast turnaround!
View count: 6