clever-tools
clever-tools copied to clipboard
Make clever-tools configurable for multizone purpose
We are implementing more and more private/satellite zones. We need to easily configure clever-tools to use another api url.
How could we do that?
what's possible currently is to configure it with environment variables. back in the day, I used direnv
to handle that. Having it configured per linked application in .clever.json
could be useful
@judu As @divarvel explained it here and in #410, this is possible via env vars. For example, for preprod, you need:
export API_HOST='https://ccapi-preprod.cleverapps.io/v2';
export CONSOLE_TOKEN_URL='https://next-console.cleverapps.io/cli-oauth';
I tried for par0 and in this case, you also need the OAUTH_CONSUMER_*
vars.
export API_HOST='https://.../v2';
export CONSOLE_TOKEN_URL='https://.../cli-oauth';
export OAUTH_CONSUMER_KEY='...';
export OAUTH_CONSUMER_SECRET='...';
@judu Let me know if this is enough for you ;-)
In the long term, we're considering having a config file in ~/config/clevercloud
or something like that with on prem zones and their config details so you would be able to use any command with a --zone
or an env var.