Skip to content

feat(CO2): implement carbon footprint data in cloud pricing api#2

Open
fabienzucchet wants to merge 4 commits intomasterfrom
feature/CO2
Open

feat(CO2): implement carbon footprint data in cloud pricing api#2
fabienzucchet wants to merge 4 commits intomasterfrom
feature/CO2

Conversation

@fabienzucchet
Copy link

@fabienzucchet fabienzucchet commented Mar 23, 2023

This PR updates the cloud-princing-api service to return carbon footprint data at the same time as the price if available so that the data can be displayed in infracost CLI (see this related PR. In order to do so, the following changes have been made:

  • Add a column in database to store the unit carbon footprint for each product
  • Add a new resolver to return the carbon footprint when the price for a product is returned
  • Add a way to insert the carbon footprint data in the database:
    • a script dataPatchEmissions that inserts the know values in the database
    • a JSON file containing the first values computed (see this article explaining the methodology

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants