Boavizta / cloud-scanner

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

use dotenv files to configure Boavizta API URL and AWS credentials #173

Open demeringo opened 1 year ago

demeringo commented 1 year ago

Problem

Boavizta API URL, aws credentials or other parameter can be passed from command line, but this is not very practical to adpata to various environments.

Solution

Use dotenv (.env) to pas configuration that can be overiden by actual environment variables value of the shell.

A good crate for this is dotenvy https://github.com/allan2/dotenvy

Alternatives

Although https://github.com/dotenv-rs/dotenv is unmaintained (and should not be used anymore) it provides an alternate README (with example of syntax for variable substitution).

Additional context or elements