Boavizta / cloud-scanner

📡 Get Boavizta impact data for your aws cloud account usage.
GNU Affero General Public License v3.0
32 stars 7 forks source link

Add a parameter to pass carbon intensity #432

Open demeringo opened 8 months ago

demeringo commented 8 months ago

Problem

By default cloud scanner uses the carbon intensity coefficients of Boavizta API (API performs the calculation using its default values).

Because this data is not publicly available, Boavizta API uses some default values that may not be the most up-to-date. https://doc.api.boavizta.org/Explanations/usage/elec_factors/#boaviztas-impact-factors.

But API allows to fine tune the results by passing (override) a custom carbon intensity coefficient.

Today there is no way to explicitly pass/override the defaults coefficients in cloud-scanner.

Solution

Add a CLI option and query parameter to cloud scanner to allow to pass explicit carbon intensity coefficient.

Alternatives

Additional context or elements

Todo: decide if we allow to override severla coefficient of if we focus only on carbon intensity (gwp factor).

Also an opportunity to improve the doc on this topic (and link to Boavizta API doc).