twilio / twilio-cli

Unleash the power of Twilio from your command prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Pass on accountSid, apiKey and apiSecret as command line parameters

yalla opened this issue · comments

We're struggling to find a proper way in how to deploy using Azure pipelines and the recommendations from Support we got were mostly non-feasible to use (such as Teraform, Jenkins, Pulumi etc), hence a simple feature request which would solve our problems and can probably be implemented easy.

Feature: Pass on accountSid, apiKey and apiSecret as command line parameters

  Background: I want to deploy Twlilio artificats and configure Twilio using
    an Azure DevOps Pipeline. All my secrets are stored in Azure Keyvault. However,
    twilio-cli expects all secrets to be present in config.json. I do not want
    to commit them to git just for the sake of deployment. I'd rather start
    twilio-cli with the secrets as a command line parameter, and I'd extract the
    secrets from Azure KeyVault.

  User Story:
    As a deploymenet engineer using twilio-cli
    I want to be able to pass on accountSid, apiKey and apiSecret as command line parameters
    So that I do not need to commit secrets to git
    And to meet internal security requirements
commented

Hey @yalla , Thanks for reaching out. seeing the concern is I do not want to commit them to git just for the sake of deployment. Have you tried creating the profile in the DevOps environment. You could create a new profile using the command twilio login [account-sid] -p [profile_id] --auth-token [auth-token] this should help you to create the profile with profile-id . You can follow this doc. Below are all the flag/arg available.

twilio login --help

USAGE
  $ twilio login [ACCOUNT-SID] [-l debug|info|warn|error|none] [-o columns|json|tsv|none] [--silent]
    [--auth-token <value>] [-f] [--region <value>] [-p <value>]

ARGUMENTS
  ACCOUNT-SID  The Account SID for your Twilio Account or Subaccount.

OPTIONAL FLAGS
  -f, --force                      Force overwriting existing profile credentials.
  -l=(debug|info|warn|error|none)  [default: info] Level of logging messages.
  -o=(columns|json|tsv|none)       [default: columns] Format of command output.
  -p, --profile=<value>            Shorthand identifier for your profile.
  --auth-token=<value>             Your Twilio Auth Token for your Twilio Account or Subaccount.
  --region=<value>                 Twilio region to use.
  --silent                         Suppress  output and logs. This is a shorthand for "-l none -o none".

DESCRIPTION
  create a new profile to store Twilio Account credentials and configuration

ALIASES
  $ twilio profiles:create
  $ twilio profiles:add