11![ Eco-Infra Logo] ( ./logo.svg )
22
3- ** ecoinfra** is a powerful tool that helps you predict, asses , and reduce the environmental impact of your cloud
3+ ** ecoinfra** is a powerful tool that helps you predict, assess , and reduce the environmental impact of your cloud
44infrastructure.
5- By integrating your existing or new IaC project you can harness predictive sustainability into your cloud operations.
5+ By analyzing Terraform plan outputs, you can harness predictive sustainability into your cloud operations.
66
77Visit our website at [ ** Eco-Infra.com** ] ( https://eco-infra.com ) to learn more about how we're revolutionizing
88eco-friendly cloud computing.
@@ -29,38 +29,52 @@ To start using the **ecoinfra** tool, follow these simple steps:
2929### Step 3: Run the Tool
3030Run the tool in a supported CI environment
3131
32- [ GitHub Actions] ( https://github.com/marketplace/actions/eco-infra-action )
32+ [ GitHub Actions] ( https://github.com/marketplace/actions/eco-infra-action )
3333``` yaml
3434 - name : Eco-Infra
3535 uses : ecoinfra/ecoinfra-action@v1.1.2
3636 with :
3737 token : ' TOKEN'
3838 project-name : ' my-project'
39- path : ' ./terraform'
40- apply : ' true'
39+ plan-file : ' ./terraform'
4140` ` `
4241
43- Or Run the tool from your command line interface (CLI) or terminal.
42+ Run the tool from your command line interface (CLI) or terminal.
4443
4544` ` ` bash
46- $ ecoinfra-PLATFORM --token {{Token}} --project-name {{Unique Project Name}} {{Project Directory }}
45+ $ ecoinfra-PLATFORM --token {{Token}} --project-name {{Unique Project Name}} --plan-file {{Plan JSON File }}
4746```
4847
49- An example :
48+ Example :
5049
5150``` bash
52- $ ecoinfra-PLATFORM --token c3da55b6-b8a0-43ad-b513-a751e76553de --project-name " Production Account" ./prod
51+ # Generate the Terraform plan JSON file
52+ $ terraform plan -out=plan.out
53+ $ terraform show -json plan.out > plan.json
54+
55+ # Analyze with ecoinfra
56+ $ ecoinfra-PLATFORM --token c3dc55b6-78a0-43ad-2513-a751e76553de --project-name " Production Account" --plan-file plan.json
5357```
5458---
5559## 📖 Documentation
5660
57- The tool requires two arguments and a path to your IaC project (Where you run terraform form):
61+ ### Required Parameters
5862
5963- ` --token ` - Your unique API key.
6064- ` --project-name ` - A unique name for your project.
61- - ` {{Project Directory}} ` - The directory of your IaC project.
65+ - ` --plan-file ` - Path to the Terraform plan JSON file.
66+
67+ ### Optional Parameters
68+
69+ - ` --breakdown ` - Show detailed resource breakdown.
70+
71+ ### Generating the Plan File
6272
63- You will be required you to run terraform init before running the tool.
73+ Generate the plan file using Terraform:
74+ ``` bash
75+ terraform plan -out=plan.out
76+ terraform show -json plan.out > plan.json
77+ ```
6478
6579## Supported Providers
6680
@@ -82,11 +96,17 @@ You will be required you to run terraform init before running the tool.
82964 . Run the tool!
8397
8498``` bash
85- git clone git@github.com:eco-infra/ecoinfra.git
99+ git clone git@github.com:eco-infra/ecoinfra.git
86100npm i
87101npm run package
88- ./build/ecoinfra-PLATFORM --token {{Token}} --project-name {{Unique Project Name}} {{Project Directory}}
102+
103+ # Generate the Terraform plan file
104+ terraform plan -out=plan.out
105+ terraform show -json plan.out > plan.json
106+
107+ # Run the tool
108+ ./build/ecoinfra-PLATFORM --token {{Token}} --project-name {{Unique Project Name}} --plan-file plan.json
89109```
90110
91111# Contributing
92- Please read the contribution guidelines before contributing to the project. [ CONTRIBUTING.md] ( ./CONTRIBUTING.md )
112+ Please read the contribution guidelines before contributing to the project. [ CONTRIBUTING.md] ( ./CONTRIBUTING.md )
0 commit comments