Open josh08h opened 4 years ago
Hey @josh08h the best way to achieve what you want to do is to use the -c
/ --config
argument for twilio-run
. This allows you to specify which configuration file to be used during deploy.
So for example you can have two different scrips that execute deployment to staging:
twilio-run deploy --config ./.preprod --account-sid ACXXXXX --auth-token XXXXX
and production:
twilio-run deploy --config ./.prod --account-sid ACXXXXX --auth-token XXXXX
This will create different files for your environments as well as keeping track of the latest build.
REMEMBER to properly protect account SID and auth-token (which I'm not doing in the above examples)
Thanks for this @vernig
Thank you so much for opening your first issue in this project! We'll try to get back to it as quickly as possible. While you are waiting...here's a random picture of a corgi (powered by dog.ceo)
Background: I have 3 Twilio accounts setup (Staging/Pre-Prod/Prod) and I am attempting to deploy a function into all three environments.
Issue: I am seeing the following error when attempting to deploy a function to a Twilio account that is different to the details specified in the
.twilio_functions
file:If the
.twilio_functions
file is empty and I deploy my function to Staging then it deploys successfully, creates the environment and amends the.twilio_functions
file. If I then attempt to deploy the function to Pre-Prod it attempts to use the environment now stored in.twilio_functions
which does not exist.Is there any guidance on this? Thanks