Comments (7)
I've created a new related issue here:
https://gitlab.com/infracost/infracost-gitlab-ci/-/issues/1
from infracost.
Bump for that issue - I'm using TerraGrunt and split my infra in a lot of modules and the work around needed are quite painful. Using the tfstate would really help.
from infracost.
Since separating the infrastructure in several tfstates is a best practice in Terraform, it could be nice to process a set of tfstates instead of just one. Also reading them from cloud object storages like a S3 bucket.
from infracost.
#203 adds a --use-tfstate
flag, which might solve this use case.
So in master you can run it with
# if running dev:
make run ARGS="--tfdir=/path/to/code --use-tfstate"
# if running binary:
infracost --tfdir=/path/to/code --use-tfstate
This still needs the terraform
binary to run terraform show
internally instead of directly reading the state file, which is the recommended way of interacting with the state (https://www.terraform.io/docs/state/index.html#format) and has the added benefit of working with both local and remote states.
From my testing, this is a lot faster than running terraform plan
each time 😄
Let me know if this helps.
from infracost.
@ctrlaltdev / @enribd can you possibly try v0.7.2 (available on brew too), and see if the infracost --tfdir=/path/to/code --use-tfstate
option is good enough to close this issue? It works with remote state. I haven't used TerraGrunt much so it would be great if you can create issues with any difficulties you hit with that.
Regarding several tfstates, maybe we can discuss it in #188 as it seems somewhat related.
from infracost.
@alikhajeh1 It works fine!
Just used on a couple of modules and I get a nice output back!
Regarding terragrunt, I'll open an issue for that.
from infracost.
@ctrlaltdev thanks for creating #224, given the interest in that, I've put it at the top of the todo pile in https://github.com/infracost/infracost/projects/2
Closing this issue, new issues can be created for leftovers.
from infracost.
Related Issues (20)
- Infracost commands do not exit with correct error codes
- Add support for AWS Route 53 Resolver DNS Firewall resources
- Cannot refine an unknown value of an unknown type HOT 1
- Kinesis Stream costs are only estimated for us-east-1 HOT 4
- Support for Azure Spot Instances HOT 1
- Add support for AWS Sagemaker Endpoint Resources HOT 1
- Using config file produces misleading comment with module paths from clone of main branch and the real module paths HOT 6
- Error when posting comments on v0.10.30
- Infracost v0.10.30 output command not working properly with some formats HOT 1
- Infracost usage file error HOT 2
- Certain GCP resources do not work due to naming difference between regions HOT 5
- Where did the helm chart for self hosted infracost go? HOT 10
- Querying exchange rate (api.exchangerate.host) always fails (self hosted infracost) HOT 2
- Setting 'Network egress' on 'google_storage_bucket' to zero HOT 1
- Add support for GCP Cloud Function Gen2 `google_cloudfunctions2_function`
- Add support for Azure DNS Private Resolver HOT 3
- Sign up with Google is failing - "Access blocked: infracost.io has not completed the Google verification process" HOT 2
- guest_accelerator.type 'nvidia-l4' is not supported HOT 4
- Broken PR comment report for Bitbucket Cloud HOT 8
- [error] report wrong infracost result to gitlab ? HOT 4
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.