Skip to main content

Configurations Glossary

Api/cli Packages

AWS

Variables for both estimation approaches with AWS

VariableExample ValueTypeNotes
AWS_TARGET_ACCOUNT_ROLE_NAMEyour-target-account-role-namestringThis variable is needed if you are authenticating with ChainableTemporaryCredentials. E.g. from one role to the authorized role.

Variables needed for the Billing Data (Holistic) approach with AWS

VariableExample ValueTypeNotes
AWS_INCLUDE_ESTIMATEStruebooleanUse this to include AWS estimations. Unset to make this false. Defaults to true.
AWS_USE_BILLING_DATAtruebooleanUse this to configure the application to query Cost and Usage Reports via AWS Athena.
AWS_ATHENA_DB_NAMEyour-athena-db-namestringThe name of your AWS Athena Database with Cost and Usage Reports data
AWS_ATHENA_DB_TABLEyour-athena-db-tablestringThe name of your AWS Athena Table with Cost and Usage Reports data
AWS_ATHENA_REGIONyour-athena-regionstringThe region your AWS Athena Database/Table were created in.
AWS_ATHENA_QUERY_RESULT_LOCATIONs3://your-athena-query-results-locationstringThe AWS S3 Bucket that you want your Athena query results to reside in. Must be prefixed with "s3://".
AWS_BILLING_ACCOUNT_IDyour-billing-account-idstringYour AWS Billing Account ID, where Cost and Usage Reports are configured.
AWS_BILLING_ACCOUNT_NAMEyour-billing-account-namestringThe name of your AWS Billing Account. This can be any value.

Variables needed for the Cloud Usage API (Higher Accuracy) approach with AWS

VariableExample ValueTypeNotes
AWS_ACCOUNTS[{"id":"your-account-id","name":"Your AWS Account"}]arrayThis is array of objects with keys "id" and "name" that match the AWS accounts you want to pull usage data from to run energy/carbon estimation for.

Optionally set these AWS variables

VariableExample ValueTypeNotes
AWS_AUTH_MODEdefaultstringThe mode to authenticate with for AWS. Options include: 'AWS': uses ChainableTemporaryCredentials, for deploying to AWS. 'GCP': Uses temporary STS Tokens, for deploying to GCP. 'default': Uses default local AWS profile, for local development.
AWS_PROXY_ACCOUNT_IDyour-proxy-account-idstringThe AWS account of the account to proxy/chain from, when app is deployed to GCP.
AWS_PROXY_ROLE_NAMEyour-proxy-role-namestringThe AWS role name in the proxy account, to proxy/chain from, when app is deployed to GCP.
AWS_RECOMMENDATIONS_SERVICEComputeOptimizerstringThe AWS service used to get recommendations from. Options include: "RightSizing", "ComputeOptimizer" or "All". Default is "Rightsizing".
AWS_COMPUTE_OPTIMIZER_BUCKETyour-central-bucket-namestringThe name of the AWS bucket in which Compute Optimizer recommendations exist. This is only needed id "ComputeOptimizer" or "All" is configured for the AWS_RECOMMENDATIONS_SERVICE variable.
AWS_ACCOUNTS["account-1", "account-2"] or [{"id":"your-account-id","name":"Your AWS Account"}]arrayThe list of account IDs that you wish to request usage data from. If objects with name properties are provided, then the name value for each account will be used as labels for the corresponding account ID. If empty, usage data for all accounts under the configured billing table will be fetched.

GCP

Variables needed for the Billing Data (Holistic) approach with GCP

VariableExample ValueTypeNotes
GCP_INCLUDE_ESTIMATEStruebooleanUse this to include GCP estimations. Unset to make this false. Defaults to true.
GCP_USE_BILLING_DATAtruebooleanUse this to configure the application to query Billing Export Data via Google BigQuery.
GOOGLE_APPLICATION_CREDENTIALS/path/to/your/credentials.jsonstringThe absolute path to your service account private key file. This service account needs to have permission to query Billing Data using BigQuery.
GCP_BIG_QUERY_TABLEproject.dataset.BQ_table_namestringThe name of your BigQuery table configured to consume Billing Export data in the format: PROJECT_ID.DATASET_NAME.TABLE_NAME. Don't forget to replace the colon in the table id if you copy it from BigQuery. See here for more details.
GCP_BILLING_PROJECT_IDyour-project-idstringThe GCP Project ID that your service account exists in that has permission to query Billing Data using BigQuery.
GCP_BILLING_PROJECT_NAMEyour-project-namestringThe name for the GCP Project specified in the previous variable.

Variables needed for the Cloud Usage API (Higher Accuracy) approach with GCP

VariableExample ValueTypeNotes
GCP_PROJECTS[{"id":"your-gcp-project-id","name":"Your GCP Project"}]arrayThis is array of objects with keys "id" and "name" that match the GCP Projects you want to pull usage data from to run energy/carbon estimation for.

Optionally set these GCP variables

VariableExample ValueTypeNotes
GCP_USE_CARBON_FREE_ENERGY_PERCENTAGEtruebooleanSetting this to true will change the emissions factors used by the application to take into account Google's Carbon Free Energy percentage in each region. For example in us-central1, the grid emissions factor is 494 gCO2eq/kWh with CFE% of 93%. With this option set to true, the application would instead use 31.78 gCO2eq/kWh.
GCP_VCPUS_PER_GKE_CLUSTER3numberUse this to configure the average number of vCPUs the application should use to estimate energy consumption of Kubernetes Engine clusters. If unset, defaults to 3, which is the default number of vCPUs provisioned.
GCP_VCPUS_PER_CLOUD_COMPOSER_ENVIRONMENT14numberUse this to configure the average number of vCPUs the application should use to estimate energy consumption of Cloud Composer Environments. If unset, defaults to 14, which is the number of vCPUs provisioned for a medium sized environment.
GCP_PROJECTS["project-id-1", "project-id-2"]arrayThe list of IDs for the projects that you wish to request usage data from. It is also compatible with the value used for the Cloud Usage API approach. If empty, usage data for all accounts under the configured billing table will be fetched.

Azure

Variables needed for the Billing Data (Holistic) approach with Azure

VariableExample ValueTypeNotes
AZURE_INCLUDE_ESTIMATEStruebooleanUse this to include GCP estimations. Unset to make this false. Defaults to true.
AZURE_USE_BILLING_DATAtruebooleanUse this to configure the application to query Azure Consumption API.
AZURE_CLIENT_IDyour-azure-client-idstringThe Azure Service Principal ID with permission to read the Consumption API from your Subscriptions.
AZURE_CLIENT_SECRETyour-azure-client-secretstringThe Azure Service Principal Secret with permission to read the Consumption API from your Subscriptions.
AZURE_TENANT_IDyour-azure-tenant-idstringYour Azure tenant ID.

Optionally set this to "GCP" if your Azure credentials are stored in Google Secrets Manager

VariableExample ValueTypeNotes
AZURE_AUTH_MODEdefaultstringThe authentication mode for Azure. Options are: 'GCP' that gets the secrets from Google Secrets Manager, 'default' which using the client id/secret and tent id from your .env file. Requires GCP_BILLING_PROJECT_NAME to be set if using 'GCP' Mode.

Optionally set this to customize usage data fetch behavior

See Azure Performance Considerations for more information.

VariableExample ValueTypeNotes
AZURE_CONSUMPTION_CHUNK_DAYS5numberTo avoid rate limiting, requests can be grouped in chunks of days. Use this to specify the chunk size
AZURE_SUBSCRIPTION_CHUNKS10numberTo avoid rate limiting, a group size of subscipritions for asynchronous requests can be set. Defaults to 10.
AZURE_SUBSCRIPTIONS["subscription-1", "subscription-2"]array:stringList of subscriptions by IDs to include in estimations. Fetches all subscriptions by default

Additional Options

Optionally include this for tagging support

VariableExample ValueTypeNotes
AWS_RESOURCE_TAG_NAMES["user:Environment","aws:CreatedBy"]array:stringCost allocation tags used to group resources, see https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html
GCP_RESOURCE_TAG_NAMES["tag:my-tag", "label:my-label", "project:my-project"]array:stringGoogle cloud resource tags to include if present, including labels or project labels. Format of "{tag-type}:{name}" is required
AZURE_RESOURCE_TAG_NAMES["resourceGroup","project","customer"]array:stringAzure resource tag names to include if present, include resourceGroup as a tag name if needed.

Optionally set this to store cache file in Google Cloud Storage

VariableExample ValueTypeNotes
CACHE_MODEGCSstringSet with 'GCS' to use this option or leave it empty to use the default.
GCS_CACHE_BUCKET_NAMEmy-bucket-namestringIs the name of you Google Cloud Storage bucket where the cache file will be stored.

Optionally set these custom configurations for On-Premise calculations

VariableExample ValueTypeNotes
ON_PREMISE_CPU_UTILIZATION_SERVER40numberFor on-premise servers, provides an average value for cpu utilization.
ON_PREMISE_CPU_UTILIZATION_LAPTOP40numberFor on-premise laptops, provides an average value for cpu utilization.
ON_PREMISE_CPU_UTILIZATION_DESKTOP40numberFor on-premise desktops, provides an average value for cpu utilization.
ON_PREMISE_AVG_WATTS_SERVER300numberFor on-premise servers, provides an average value for average watts.
ON_PREMISE_AVG_WATTS_LAPTOP300numberFor on-premise laptops, provides an average value for average watts.
ON_PREMISE_AVG_WATTS_DESKTOP300numberFor on-premise desktops, provides an average value for average watts.

Optionally set these variables to configure CORS

VariableExample ValueTypeNotes
ENABLE_CORStruebooleanEnables default CORS headers on all API requests. By default all origins, methods and headers are allowed.
CORS_ALLOW_ORIGINhttps://example.com,https://example2.comstringA list of one or more origins to allow for CORS requests, comma separated.

Optionally set Electricity Map API token

VariableExample ValueTypeNotes
ELECTRICITY_MAPS_TOKENyour-tokenstringEnable the use of Electricity Maps API for realtime carbon intensity emissions factors instead of the default values.

Client Package - all variables are optional

VariableExample ValueTypeNotes
REACT_APP_PREVIOUS_YEAR_OF_USAGEtruebooleanUse this to ensure the application requests usage data from the entire previous calendar year to today. Unset to make this false. Defaults to true.
REACT_APP_GROUP_BYmonthstringValue to set how the cloud provider queries should return data (e.g. day/week/month/quarter/year). Defaults to day.
REACT_APP_START_DATE01-01-2022stringThe date range to query data based on custom start/end timestamps (takes precedence over legacy config). Defaults to current data
REACT_APP_END_DATE06-01-2022stringSet the date range to query data based on custom start/end timestamps. Defaults to 30 days prior
REACT_APP_DATE_RANGE_VALUE1numberThe quantity of REACT_APP_DATE_RANGE_TYPE to be used. (Legacy date range config)
REACT_APP_DATE_RANGE_TYPEyearstringThe type of time period to be used. Values can be day(s), week(s), month(s), quarter(s), year(s) (Legacy date range config)
REACT_APP_MINIMAL_DATE_AGE1numberThe amount of days to subtract from current date as end date. (Legacy date range config)
REACT_APP_BASE_URLhttps://example.com/apistringThe base URL used to make API requests.
REACT_APP_DISABLE_CACHEtruebooleanSet to true to disable caching. Defaults to false.
REACT_APP_DISABLE_FORECAST_VALIDATIONtruebooleanSet to true to disable recommendations forecast validation. Defaults to false. (For accurate forecasts, it is recommended to keep this enabled)
REACT_APP_PAGE_LIMIT50000numberThe pagination limit for fetched estimates per request. Defaults to 50000. (MongoDB Only, recommended to not exceed 50000)
Made for the 🌎 by Thoughtworks

Cloud Carbon Footprint is an open-source project, sponsored by Thoughtworks Inc. under the Apache License, Version 2.0

PRIVACY POLICY