worried-soccer-6764009/15/2022, 1:10 PM
version: 0.1 projects: - path: dev usage_file: dev/infracost-usage.yml env: AWS_PROFILE: $ENV_VAR
mammoth-accountant-596309/15/2022, 6:51 PM
mysterious-teacher-6827609/15/2022, 6:52 PM
brash-musician-7282609/15/2022, 7:48 PM
worried-soccer-6764009/15/2022, 10:10 PM
with a config file but i'm having issues.
i get this error
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 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!
Error: --config-file flag cannot be used with the following flags: --path, --project-name, --terraform-*, --usage-file sh: --log-level=info: not found
too, so it should work fine if you remove that, like this:
If you’re running
infracost breakdown \ --format=json \ --config-file /atlantis-data/repos/b2c2/infrastructure/$PULL_NUM/default/infracost-generated.yml --log-level=info \ --out-file=$INFRACOST_OUTPUT
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)
infracost diff --config-file
worried-soccer-6764009/16/2022, 8:02 PM
in a node group.
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
infracost breakdown \ --format=json \ --config-file infracost-generated.yml --log-level=info \ --out-file=$INFRACOST_OUTPUT \ --sync-usage-file
. all node groups are in the same eks cluster.
boundless-london-9201409/21/2022, 9:22 AM
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?
Error: config file does not exist at terraform/infracost_config.yml
broad-zoo-3407709/21/2022, 5:42 PM
white-grass-5196909/23/2022, 11:18 PM
many-easter-9495209/26/2022, 10:38 PM
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..
many-easter-9495209/26/2022, 10:38 PM
files in different directories within the same repo?
ambitious-book-8933709/27/2022, 10:32 AM
What I'm seeing when running breakdown is something like this:
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
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"
aloof-hair-2477609/28/2022, 7:21 AM
mysterious-teacher-6827609/29/2022, 8:43 AM
with different formatting options:
• The Infracost usage file now allows users to provide defaults for resource types. ⚙️ 🚀 You can now do things similar to:
| 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` |
• 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
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
hallowed-soccer-3466309/29/2022, 6:40 PM
hallowed-soccer-3466309/29/2022, 9:21 PM
command that is used in our CI/CD integrations? That’s the last step. Which CI/CD system are you using?
hallowed-soccer-3466309/29/2022, 9:24 PM
infracost comment gitlab --path=infracost.json \
ambitious-book-8933710/03/2022, 2:57 PM
famous-engineer-2790910/04/2022, 10:02 AM