Env0 is an IaC Control Plane.
You can add these to your .bashrc to improve your API workflow. Note that most of these require the following environment variables.
- ENV0_ORGANIZATION_ID
- ENV0_AUTH_TOKEN
function env0_get_cred_id {
CRED_NAME=$1
curl -sS -X GET \
"https://api.env0.com/credentials?organizationId=$ENV0_ORGANIZATION_ID" \
-H 'accept: application/json' \
-H "authorization: Basic $ENV0_AUTH_TOKEN" \
-H 'content-type: application/json' | \
jq -r --arg cred "$CRED_NAME" '.[] | select( .name == $cred ) | .id'
}