Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

@fabienzucchet fabienzucchet marked this pull request as ready for review March 23, 2023 12:04
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.

1 participant