Releases: infracost/infracost
v0.10.17
0.10.17 (Feb 07 2023)
Infracost version 0.10.17
includes several enhancements and bug fixes aimed at helping users with complex setups. This version has improved support for module evaluation, error reporting, and pricing lookups. Give it a try!
New features
- Augment the infracost comment command to allow passing client certificates for GitHub Enterprise Servers that require them - by @aliscott in #2256
- Add support for absolute file paths for Terraform variable files, offering greater flexibility for projects and helping users with a top-level global variable file directory - by @hugorut in #2279
- Scope CLI run errors by project, so that multi-project runs no longer fail at the first error. Instead, they report aggregated errors at the end of the run, as shown in the example below:
by @hugorut in #2225 and @tim775 in #2268
Project: infracost/infracost/cmd/infracost/testdata/breakdown_multi_project_with_error/dev Module path: dev Errors: Error loading Terraform modules: failed to inspect module path testdata/breakdown_multi_project_with_error/dev diag: Invalid block definition: Either a quoted string block label or an opening brace ("{") is expected here. (and 1 other messages) ────────────────────────────────── Project: infracost/infracost/cmd/infracost/testdata/breakdown_multi_project_with_error/prod Module path: prod Name Monthly Qty Unit Monthly Cost aws_instance.web_app ├─ Instance usage (Linux/UNIX, on-demand, m5.8xlarge) 730 hours $1,121.28 ├─ root_block_device │ └─ Storage (general purpose SSD, gp2) 50 GB $5.00 └─ ebs_block_device[0] ├─ Storage (provisioned IOPS SSD, io1) 1,000 GB $125.00 └─ Provisioned IOPS 800 IOPS $52.00 Project total $1,303.28 OVERALL TOTAL $1,303.28
AWS
- Add support for Lambda ARM architectures - by @robh007 in #2269
- Add support for
ap-southeast-4
region - by @aliscott in #2280
Enhancements
- Improve the macOS/Linux installer script to allow downloading any version. For example:
export INFRACOST_VERSION=v0.10.16; curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
- by @sylwit in #2251 - Remove sensitive variables from evaluation warnings, so that variables such as foo_token no longer trigger CLI warnings - by @hugorut in #2271
- Add retry logic to Terraform Cloud variable loading. This improves fall over logic for cases where Terraform Cloud API returns a malformed response/code - by @tim775 in #2272
- Add backoff logic to pricing API requests, meaning that slow or malformed Pricing API responses won't kill a CLI run - by @aliscott in #2248
Fixes
- Module
for_each
attributes were not expanding correctly if they relied on a referenced expanded module. This improvement will benefit users who heavily rely on composable modules - by @hugorut in #2232 - Change project paths to absolute path if initial
--config-file
path is abs. This fixes a regression that prevented GitHub action workflows building cost estimates - by @hugorut in #2234 infracost comment
hiding module path when projects are skipped - by @aliscott in #2240- Reload ModuleCall when
each.value
changes. This resolves bugs where the incorrect module inputs were passed before the references were expanded - by @hugorut in #2241 - Copy
CoreResource
before costing policy, preventing resource outputs being changed when reporting cost estimates to the CLI - by @hugorut in #2246
Azure
- Mark MSSQL database as free when its SKU is ElasticPool - by @vdmgolub in #2253
- Repair price lookup for API Management - by @aliscott in #2267
- SQL server cost component lookup - by @aliscott in #2275
- Application Gateway v2 costs - by @aliscott in #2278
New Contributors
Full Changelog: v0.10.16...v0.10.17
v0.10.16
What's Changed
v0.10.16 contains various fixes and enhancements, including improvements related to our GitHubApp.
Infracost has now changed behaviour to add .infracost folder at the working directory for the infracost execution and not the sub project folders. Users might run Infracost in these sub project folders in isolation.
Enhancements
- Change module download directory to reside at context root by @hugorut in #2208
- Add support for ZRS managed disks to Azure by @grixxie in #2153
- Run auto-detected projects in parallel by @hugorut in #2209
- Change search depth to 10 when use all paths is set by @hugorut in #2210
- Add configuration settings for actual usage by @tim775 in #2194
- Update --terraform-use-state to auto init if needed by @tim775 in #2221
Fixes
- fix: use concurrent safe map in fetcher by @hugorut in #2213
- fix: default to the correct default provider based on the resource type by @aliscott in #2212
- fix: nested map keys for terragrunt deps output by @hugorut in #2214
- fix: ensure excluded paths are not evaluated by Terragrunt by @aliscott in #2215
- fix: panic arising from cty conversion of cty.NilVal by @hugorut in #2216
- fix: parse Terragrunt var files from extra args block by @aliscott in #2218
- fix: array notation causing issues with mocking terragrunt deps by @hugorut in #2217
- fix: fix object variables passed with a subset of keys by @aliscott in #2220
- fix: add usagetype filter to cw metric alarm by @tim775 in #2226
New Contributors
Full Changelog: v0.10.15...v0.10.16
v0.10.15
What's Changed
Infracost v0.10.15 contains fixes for critical issues facing Terragrunt users. It also resolves minor regressions introduced in 0.10.14 and improves our GitHub app functionality.
Fixes
- Increase max context iterations whilst parsing Terraform modules, resolving issues faced by users of complex third-party modules that were exiting before being properly evaluated - by @hugorut in #2174
- Merge Terraform outputs with output mocks built with regular expression, solving the longstanding
invalid character ',' looking for beginning of value
bug that Terragrunt users faced if output expressions from dependencies could not be resolved - by @hugorut in #2175 - Skip unsupported node pools as Google Container Cluster sub-resources. This resolves a runtime panic caused by nil sub-resources. by @hugorut in #2184
Improvements
- Add cache for Terragrunt source files. Significantly speeding up Terragrunt HCL evaluation by caching already downloaded modules and copying them to a destination if they are included again - by @aliscott in #2183
- Initial support to track git changes in project metadata, improving our GitHub app) functionality to only show projects in the PR comment that have VCS changes - by @hugorut in #2182
Full Changelog: v0.10.14...v0.10.15
v0.10.14
What's Changed
Infracost v0.10.14 contains a number of new resource pricing including support for Google custom machine types! It also includes some CLI features for allowing region overrides and showing the breakdown of all projects in a CI/CD comment.
New features
CLI functionality:
- Add ability to override region via ENV var by @vdmgolub in #2123
- Add
--show-all-projects
flag to show all projects in table ofinfracost comment
by @fatihtokus in #2087 - Add
--include-all-paths
flag for auto detection by @hugorut in #2127 - Allow
--terraform-use-state
flag with--config-file
by @tim775 in #2104
This release also contains functionality to enable features on Infracost Cloud:
- Jira integration (available now) - see pull request cost estimates in Jira issues
- Guardrails (upcoming) - get alerted when pull requests pass a certain cost increase threshold
- Reports (upcoming) - get a daily/weekly summary of pull request costs
- Cost policies (upcoming) - add custom cost policies to your Terraform repositories, i.e. use gp3 volumes instead of gp2.
New resource prices:
- Google Compute custom machine types by @7onn in #2004
- AWS FSx OpenZFS File System (
aws_fsx_openzfs_file_system
) by @jgrumboe in #2092 - Azure Attestation Provider (
azurerm_attestation_provider
) by @yogeshCt3 in #2134 - AWS Lambda tiered pricing by @robh007 in #2137
- AWS EC2 host (
aws_ec2_host
) by @robh007 in #2135
New regions:
- AWS eu-central-2 by @hugorut in #2128
- AWS eu-south-2 by @vdmgolub in #2140
- AWS ap-south-2 by @aliscott in #2148
Fixes
- Fix S3 bucket "No products found for Lifecycle transition" in us-east 2 by @tim775 in #2100
- Fix GitHub comment truncation when it's too long by @vdmgolub in #2119
- Fix AWS RDS instance price lookups by @aliscott in #2132
- Fix AWS EFS file system resource price lookups by @vdmgolub in #2152
- Fix Azure Kubenertes cluster to use min_count for node pool size if node_count not specified by @hugorut in #2136
- Fix
depends_on
block causing module to re-evaluate with HCL parsing in #2122 - Fix pass fresh evaluation lookup map to child module evaluation by @hugorut in #2170
- Fix optional object keys not working with HCL parsing by @aliscott in #2173
Dependencies
- Bump
golang.org/x/text
andgolang.org/x/net
by @peterdeme in #2106 - Bump github.com/zclconf/go-cty-yaml from 1.0.2 to 1.0.3 by @dependabot in #2154
- Bump github.com/hashicorp/hcl/v2 from 2.14.1 to 2.15.0 by @dependabot in #2158
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.72.1 to 1.74.0 by @dependabot in #2161
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.74.0 to 1.74.1 by @dependabot in #2169
- Bump github.com/pterm/pterm from 0.12.49 to 0.12.50 by @dependabot in #2155
- Bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.27.11 to 1.29.5 by @dependabot in #2168
- Bump github.com/aws/aws-sdk-go-v2/service/autoscaling from 1.23.16 to 1.24.1 by @dependabot in #2133
- Bump github.com/aws/aws-sdk-go-v2/service/autoscaling from 1.24.1 to 1.24.3 by @dependabot in #2162
- Bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.21.6 to 1.21.11 by @dependabot in #2145
- Bump github.com/aws/aws-sdk-go-v2/config from 1.17.8 to 1.18.3 by @dependabot in #2146
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.63.1 to 1.72.1 by @dependabot in #2147
- Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 by @dependabot in #2113
- Bump github.com/dave/dst from 0.27.1 to 0.27.2 by @dependabot in #2118
- Bump github.com/aws/aws-sdk-go-v2/service/dynamodb from 1.17.1 to 1.17.3 by @dependabot in #2117
- Bump github.com/zclconf/go-cty from 1.11.0 to 1.12.0 by @dependabot in #2116
- Bump github.com/open-policy-agent/opa from 0.44.0 to 0.46.1github.com//pull/2163
Docs
New Contributors
- @peterdeme made their first contribution in #2106
- @yogeshCt3 made their first contribution in #2134
- @7onn made their first contribution in #2004
Full Changelog: v0.10.13...v0.10.14
v0.10.13
What's Changed
Infracost 0.10.13 contains fixes for several issues and... changes to support automatic usage estimates❗️❗️❗️
New Features
- Infracost can now automatically estimate usage for AWS Lambda, S3, and DynamoDB using data from your cloud bill 📉💰. We'll be adding coverage for more resources in future releases. Read more about the private beta here: https://www.infracost.io/docs/infracost_cloud/actual_costs/ or reach out to us at [email protected].
Fixes
- fix: use correct parse function for JSON files by @aliscott in #2067
- fix: nested
for_each
iterating over resource properties by @hugorut in #2078 - fix(aws/fsx-windows): no prices for SSD by @jgrumboe in #2090
- fix: if "Module path" is column is empty it should be hidden by @fatihtokus in #2060
- go 1.19 by @PatMyron in #1944
- fix(azure): fix cost component regexes by @aliscott in #2038
Full Changelog: v0.10.12...v0.10.13
v0.10.12
What's Changed
Infracost 0.10.12 brings additional features that help simplify and debug users' workflows.
New Features
-
New environment variables giving users the option 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
INFRACOST_CURRENCY_FORMAT="USD: 1.234,567890 $"64.145,452500 $
INFRACOST_CURRENCY=EUR
INFRACOST_CURRENCY_FORMAT="EUR: 1.234,56€"64.145,45€
INFRACOST_CURRENCY=GBP
INFRACOST_CURRENCY_FORMAT="GBP: £ 1,234.567"£ 64,145.453
by @fatihtokus in #2017
-
The Infracost usage file now allows users to provide defaults for resource types. Resource type defaults apply to all resources of that type regardless of the module they reside in.
This is useful when you want to create traffic profiles such as small/medium/large. Resource type defaults can be overridden on a per-resource basis (shown below); usage keys that are re-defined at a resource level override the default, and new usage keys are merged with the defaults.
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
by @balazs-marjan in #1979
You can read more about the use cases and options on our docs.
-
Support for HCL warnings in project metadata. This means that your Infracost Cloud runs will now contain useful information about missing configuration that could be affecting your cost estimates.
-
Experimental support for Infracost Cloud based usage estimates, populated from live CUR data. More on this soon. - by @tim775 in #2050
Fixes
New Contributors
- @balazs-marjan made their first contribution in #1979
- @fatihtokus made their first contribution in #2017
Full Changelog: v0.10.11...v0.10.12
v0.10.11
What's Changed
Infracost 0.10.11 contains significant updates to improve VCS detection. In addition, we've added the ability to override detection, which enables users to specify how they want their VCS data displayed in Infracost Cloud.
Users should be aware that with 0.10.11 release, the vcsRepoUrl
metadata attribute has been changed to vcsRepositoryUrl
:
{
"vcsPullRequestUrl": "https://github.com/infracost/infracost/pull/42",
- "vcsRepoUrl": "https://github.com/infracost/infracost.git",
+ "vcsRepositoryUrl": "https://github.com/infracost/infracost.git",
"vcsProvider": "github",
"vcsBaseBranch": "master",
"vcsPullRequestTitle": "Some PR title",
"vcsPullRequestId": "4321"
...
}
Infracost Cloud enhancements:
- Infracost CLI has improved metadata support, meaning more platforms and deployment systems work out of the box with Infracost Cloud. Additional VCS environment variables have also been added to the CLI. Users can use these to override Infracost VCS detection. A complete list of supported environment variables is below - see our docs for examples:
by @hugorut in #1990
- `INFRACOST_VCS_PROVIDER`: can be "github", "gitlab", "azure_repos" or "bitbucket" - `INFRACOST_VCS_REPOSITORY_URL`: HTTPS URL of the repository, e.g. "https://github.com/infracost/example-terraform" - `INFRACOST_VCS_PULL_REQUEST_URL`: HTTP URL of the pull request, e.g. "https://github.com/alikhajeh1/example-terraform/pull/2" - `INFRACOST_VCS_PULL_REQUEST_AUTHOR`: author username or full name of the pull request, e.g. "john190" or "John Smith" - `INFRACOST_VCS_PULL_REQUEST_TITLE`: title of the pull request, e.g. "Increase IOPS" - `INFRACOST_VCS_BRANCH`: name of the branch that was used to generate the estimate, e.g. "increase_iops" - `INFRACOST_VCS_COMMIT_SHA`: long commit SHA of the branch that was used to generate the estimate, e.g. "1af413ad15ad6cbdfca667361231231231231231" - `INFRACOST_VCS_COMMIT_MESSAGE`: the commit message, e.g. "use m5.large" - `INFRACOST_VCS_COMMIT_TIMESTAMP`: unix epoch timestamp of the commit, e.g. `1661801540`. You can use the following command to get the timestamp on the latest commit from the current branch `export INFRACOST_VCS_COMMIT_TIMESTAMP=$(git show -s --format=%ct)` - `INFRACOST_VCS_COMMIT_AUTHOR_EMAIL`: git email of author of the commit, e.g. "[email protected]" - `INFRACOST_VCS_COMMIT_AUTHOR_NAME`: git author name of the commit, e.g. "John Smith" - `INFRACOST_VCS_PIPELINE_RUN_ID`: a way to differentiate pipelines that are run within one CI/CD run, this is the top-level pipeline ID, not individual jobs/runs within it, e.g. "2846680866"
- A new
infracost upload
command which supports uploading an Infracost JSON file to Infracost Cloud without the need forinfracost comment
. This command uploads the data regardless of your Org Settings or theINFRACOST_ENABLE_CLOUD
environment variable. - by @tim775 in #1997
New Features
Fixes
- Support case-insensitive Azure VM sizes - by @mnaghavi in #1994
- Update
go-git
dependency to fix panics reported by Windows users - by @hugorut in #1989 - Handle nested local object types when parsing HCL - by @aliscott in #1972
- Use correct object values when merging object context values - by @aliscott in #1972
- Fix Terragrunt parsing failure caused by incorrect assume role behaviour - by @aliscott in #1977
- Update
azurerm_function_app
andazurerm_mysql_flexible_server
price filters so they no longer show zero prices - by @aliscott in #1992
New Contributors
Full Changelog: v0.10.10...v0.10.11
v0.10.10
What's Changed
Infracost v0.10.10 contains fixes and enhancements for the CLI, many of them improving support in the Infracost VS Code extension.
Enhancements
Fixes
- Use first tier for Lambda duration prices by @aliscott in #1950
- Use terraform workspace for evaluator if provided by @hugorut in #1954
- Catch evaluator panic if value map is not a
cty.ObjectType
by @hugorut in #1956 - Reference panic caused when block has no valid labels by @hugorut in #1961
- Flush the CLI redirect response by @aliscott in #1948
- Fix panic caused from invalid guest accelerator cost component by @hugorut in #1960
- Skip sending error reports to self hosted cloud pricing API by @hugorut in #1962
- Fix azure flexible server broken cost component filters and region lookup by @hugorut in #1963
- Truncate GitHub comment if it's too large by @vdmgolub in #1964
- Update product name for mysql additional backup storage by @hugorut in #1967
Dependency updates
- Upgrade to use go1.18 and alpine3.16 and github action dependencies by @chenrui333 in #1840
Full Changelog: v0.10.9...v0.10.10
v0.10.9
What's Changed
🐛 📉 Infracost v0.10.9 contains a number of fixes for the CLI that are discovered when used with the Infracost VS Code extension support. It also contains several enhancements to how our CLI integrates with Infracost Cloud, to enable it to work with additional CI/CD platforms such as Atlantis, Azure Repos and Bitbucket.
Infracost Cloud enhancements:
- Add support for Atlantis, Azure Repos, Bitbucket and CircleCI to Infracost Cloud by @hugorut in #1920
- Add support for TFC run tasks to Infracost Cloud by @hugorut in #1934
- Show which organization in Infracost Cloud a run was uploaded to by @vdmgolub in #1886
- Send all runs in CI up to Infracost Cloud when the
enable_cloud
setting is enabled @tim775 in #1880
Fixes
Panic and runtime errors caused by incomplete VS Code Terraform files
- Fix
interface conversion
by @hugorut in #1896 - Fix
value is unknown panic
by @hugorut in #1888 - Fix
ForDisplay called on invalid Hostname
panic by @hugorut in #1895 - Fix
index out of range [1] with length 1
panic foraws_codebuild_project
by @hugorut in #1894
Other fixes:
- Fix Azure Repos URLS returning a 404 if the repo or project name contained a space by @hugorut in #1935
- Fix parsing for modules with
for_each
orcount
by @aliscott in #1885 - Fix
NAME
env variable overriding the project name by @aliscott in #1919 - Fix
aws_ecs_service
to work when referencing aaws_ecs_task_definition
with afamily
attribute by @aliscott in #1917 - Fix divide by zero by @aliscott in #1923
Dependency updates
- Update dependabot.yml to manage GitHub Actions by @jauderho in #1897
- Bump docker/metadata-action from 3 to 4 in #1901
- Bump actions/checkout from 2 to 3 in #1902
- Bump actions/setup-node from 2 to 3 in #1903
- Bump github/codeql-action from 1 to 2 in #1904
- Bump docker/setup-buildx-action from 1 to 2 in #1924
- Bump actions/github-script from 5 to 6 in #1928
- Bump actions/setup-go from 2 to 3 in #1925
- Bump docker/build-push-action from 2 to 3 in #1927
- Bump docker/login-action from 1 to 2 in #1926
- Bump github.com/Rhymond/go-money from 1.0.7 to 1.0.8 in #1907
- Bump github.com/aws/aws-sdk-go-v2/config from 1.15.13 to 1.15.14 in #1914
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.47.2 to 1.50.0 in #1909
- Bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.18.6 to 1.19.0 in #1910
- Bump github.com/hashicorp/go-getter from 1.6.1 to 1.6.2 in #1911
- Bump github.com/hashicorp/go-version from 1.5.0 to 1.6.0 in #1913
- Bump github.com/open-policy-agent/opa from 0.42.0 to 0.42.2 in #1906
- Bump github.com/aws/aws-sdk-go-v2/service/autoscaling from 1.23.5 to 1.23.6 in #1942
- Bump github.com/aws/aws-sdk-go-v2/service/ec2 from 1.50.0 to 1.51.0 in #1941
- Bump github.com/open-policy-agent/opa from 0.42.2 to 0.43.0 in #1943
- Bump github.com/slack-go/slack from 0.10.3 to 0.11.2 in #1908
- Bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 in #1905
New Contributors
Full Changelog: v0.10.8...v0.10.9
v0.10.8
0.10.8 (July 20 2022)
Infracost v0.10.8 adds support for Infracost Cloud, our new hosted service. 🎉 🎉 🚢
It enables team leads, managers and FinOps practitioners to have visibility across all cost estimates in CI/CD and answer questions like:
- What are the top pull requests that will increase/decrease costs the most? Who is working on them?
- What were all the pull requests to the main branch on the date we had a spike in cloud costs?
As part of this, we've removed the infracost register
command in favour of infracost auth login
, which uses our new login flow. This will not impact existing users or existing API keys.
This release also contains several critical bug fixes for the CLI that have arisen from Infracost's VSCode extension support.
New features
- AWS, Azure & GCP VMs now support a
monthly_hrs
usage field - by @jessecureton in #1812 - Bitbucket output/commend commands now include a
--exclude-cli-output
option. Allowing users to truncate long Bitbucket comments - by @vdmgolub in #1881 - Structured logging support. All Infracost commands now have a
--debug-report
flag, which generates a rich JSON debugging report. This helps Infracost maintainers debug problems quickly - @hugorut in #1808
Azure
- IoT Hub support - by @sawyerw-mastery in #1850
- Virtual Network peering support - by @sawyerw-mastery in #1852
Fixes
-
Updated path variables for Terraform file functions. This fixes problems with users trying to load files in child modules - by @tim775 in #1849
-
Tweaked product filters for Google Storage Bucket - by @vdmgolub in #1868
-
Better automatic project name detection - by @hugorut in #1878
-
Several panic and runtime errors caused by incomplete VSCode Terraform files
- Parser index panic - by @aliscott in #1861
- Azure VM scale set panic when resource has no
storage_profile_os_disk
block - by @aliscott in #1864 - Entry in nil map panic - by @aliscott in #1865
- Use a safer methods for type conversion - by @hugorut in #1866
- Remove providing
cty.NilVal
to HCL expressions when in a partial evaluation state - by @hugorut in #1867
New Contributors
- @jessecureton made their first contribution in #1812
- @sawyerw-mastery made their first contribution in #1850
Full Changelog: v0.10.7...v0.10.8