dazzling-airplane-3803
03/19/2024, 9:34 AMwhite-airport-8778
infracost configure get api_key
if you already have the CLI running on your dev machine.dazzling-airplane-3803
03/19/2024, 9:59 AMdazzling-airplane-3803
03/19/2024, 10:00 AMlittle-author-61621
curl -i -H "User-Agent: infracost-debug-0fe936ed" -H "Content-Type: application/json" -H "X-Api-Key: $INFRACOST_API_KEY" <https://pricing.api.infracost.io/graphql>
little-author-61621
dazzling-airplane-3803
03/21/2024, 7:49 AMlittle-author-61621
dazzling-airplane-3803
03/22/2024, 6:51 AM...
install_infracost:
status:
- test -x /usr/local/bin/infracost
generates:
- /usr/local/bin/infracost
cmds:
- curl -fsSL <https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh%7C> sh
infracost_diff:
dir: environments/{{.ENV}}/
deps: [install_infracost]
cmds:
- infracost diff --path plan.json
And I added the infracost as an env variable in the bitbucket backend, still no luck, error:
task: [infracost_diff] infracost diff --path plan.json
[91mError:[0m [96mINFRACOST_API_KEY[0m is not set but is required, check your environment variable is named correctly or add your API key to your [96m/root/.config/infracost/credentials.yml[0m credentials file.
If you recently regenerated your API key, you can retrieve it from [4;1mhttps://dashboard.infracost.io[0m.
See [4;1mhttps://infracost.io/support[0m if you continue having issues.
task: Failed to run task "plan": task: Failed to run task "infracost_diff": exit status 1dazzling-airplane-3803
03/22/2024, 6:56 AM- curl -fsSL <https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh> | sh
little-author-61621
curl -i -H "User-Agent: infracost-debug-0fe936ed" -H "Content-Type: application/json" -H "X-Api-Key: $INFRACOST_API_KEY" <https://pricing.api.infracost.io/graphql>