Gurpal Singh
09/15/2022, 1:09 PMGurpal Singh
09/15/2022, 1:10 PMversion: 0.1
projects:
- path: dev
usage_file: dev/infracost-usage.yml
env:
AWS_PROFILE: $ENV_VAR
Hassan (Infracost)
09/15/2022, 3:54 PMhttps://youtu.be/PB35QbHZeZw▾
Vitale Mazo
09/15/2022, 6:51 PMHugo (Infracost)
09/15/2022, 6:52 PMAlexandre Vinet
09/15/2022, 7:48 PMGurpal Singh
09/15/2022, 10:10 PMinfracost
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!Ali (Infracost)
09/15/2022, 10:41 PM--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)Ali (Infracost)
09/16/2022, 5:05 PMGurpal Singh
09/16/2022, 8:02 PMinstance_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.Hassan (Infracost)
09/19/2022, 3:59 PMBorsi Csokas
09/21/2022, 9:22 AMError: 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?Slackbot
09/21/2022, 5:42 PMMohammed Yahya - محمد المصدّر
09/22/2022, 9:26 AMPeter Phan
09/23/2022, 11:18 PMHassan (Infracost)
09/26/2022, 2:40 PMHassan (Infracost)
09/26/2022, 2:41 PMzahit usta
09/26/2022, 10:38 PMgithub 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..
zahit usta
09/26/2022, 10:38 PMterragrunt
files in different directories within the same repo?Paulo Correia
09/27/2022, 10:32 AMazurerm_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.9Ali (Infracost)
09/27/2022, 5:59 PMNathaniel Amadi
09/28/2022, 7:21 AMHugo (Infracost)
09/29/2022, 8:43 AM64145.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 hereFelipe Saravia
09/29/2022, 6:40 PMFelipe Saravia
09/29/2022, 9:21 PMAli (Infracost)
09/29/2022, 9:22 PMinfracost comment
command that is used in our CI/CD integrations? That’s the last step.
Which CI/CD system are you using?Felipe Saravia
09/29/2022, 9:24 PMinfracost 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
Paulo Correia
10/03/2022, 2:57 PMAlistair (Infracost)
10/03/2022, 3:14 PMINFRACOST_API_KEY
isn’t set.Raushan
10/04/2022, 10:02 AMRaushan
10/04/2022, 10:02 AMGurpal Singh
10/04/2022, 10:04 AMAndrii Benedyk
10/04/2022, 10:04 AMRaushan
10/04/2022, 10:05 AMHugo (Infracost)
10/04/2022, 10:08 AMRaushan
10/04/2022, 10:09 AMIliyan Vutov
10/04/2022, 10:09 AMMohammed Yahya - محمد المصدّر
10/04/2022, 10:16 AMinfracost breakdown --path .
this will not need state
file or S3 backend access.cd path/to/code
terraform init
terraform plan -out tfplan.binary
terraform show -json tfplan.binary > plan.json
infracost breakdown --path plan.json
Raushan
10/04/2022, 10:28 AMHugo (Infracost)
10/04/2022, 10:28 AMMohammed Yahya - محمد المصدّر
10/04/2022, 10:31 AMbitbucket
pipeline with the upper link to https://www.infracost.io/docs/integrations?Hugo (Infracost)
10/04/2022, 10:31 AM