Comments (6)
Additionally I just tested this setup for a multi terraform project repo, and the result is similar to when using only one project - the reports are shown for base modules for main branch and for real modules.
💰 Monthly cost will not change
Project | Module path | Cost change | New monthly cost |
---|---|---|---|
management | ../../../tmp/base/management/terraform | -£224 | £0 |
management | management/terraform | +£224 | £224 |
playground | ../../../tmp/base/playground/terraform | -£30 | £0 |
playground | playground/terraform | +£30 | £30 |
from infracost.
So in conclusion, am I doing something wrong?
from infracost.
@Tomasz-Kluczkowski what is your CONFIG_FILE
variable set to? Also does it work if you copy the config file into /tmp/base before running infracost breakdown
, e.g.:
- |
cp infracost.yml /tmp/base
cd /tmp/base
infracost breakdown --config-file=${CONFIG_FILE} \
--format=json \
--out-file=infracost-base.json
from infracost.
Hi,
I am running in gitlab. In my repo the .infracost.yml
is in the root of the project.
CONFIG_FILE: ${CI_PROJECT_DIR}/.infracost.yml
from infracost.
I will try running with your instructions and report back.
from infracost.
ok I changed the code to be:
cp .infracost.yml /tmp/base
cd /tmp/base
infracost breakdown --config-file=.infracost.yml \
--format=json \
--out-file=infracost-base.json
- |
cd -
infracost diff --config-file=.infracost.yml \
--compare-to=/tmp/base/infracost-base.json \
--format=json \
--out-file=infracost.json
Which produced expected results for no changes to resources:
Infracost report
💰 Monthly cost will not change
This comment will be updated when code changes.
And also when resources were changed:
💰 Monthly cost will increase by £9 📈
Project | Cost change | New monthly cost |
---|---|---|
playground | +£9 (+31%) | £40 |
So I think your solution is correct @aliscott . Should then infracost's documentation here: https://gitlab.com/infracost/infracost-gitlab-ci/-/tree/master/examples/multi-project-config-file be updated?
from infracost.
Related Issues (20)
- Custom GitHub comment or add image
- Support Azure Repos active comment thread
- Infracost integration with GitHub Actions doesn't display cost estimation in PR comments HOT 1
- Cost Estimation Regression in Azure Terraform IAC: Prices Default to $0 from v0.10.32 Onwards HOT 4
- Add support for some SES and SESv2 resources HOT 1
- infracost is not fetching variables defined in Terraform Enterprise HOT 1
- Missing cost for ECS Service when task definition is used from a module and "family:revision" is used instead of "arn" or "family"
- Breakdown timing after 0.10.32+ HOT 1
- Error Generating Breakdown with v0.10.35 HOT 9
- `--debug-report` flag throws an error
- Missing cost estimate for `azurerm_postgresql_flexible_server` compute GP_Standard_D2ds_v5 HOT 3
- Will Infracost work or support OpenTofu? HOT 1
- Add support for `aws_servicecatalog_product`
- New `terraform test` support for variables in run block causes module evaluation to fail HOT 2
- Comment only when costs change
- Infracost fails to display ecs service costs when using `terraform-aws-ecs` module
- Add support for Opensearch Serverless collections: aws_opensearchserverless_collection
- Failed calculating breakdown cost of google_compute_region_instance_group_manager HOT 4
- Changes in tfvars aren't properly detected in github app HOT 2
- aws ebs unit price is not correct HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infracost.