terraform-provider-twilio

command module
v0.0.0-...-bd93019 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

Build Status

Twilio Terraform Provider

The goal of this Terraform provider plugin is to make manging your Twilio account easier.

Current features:

  • twilio_workspace
    • Create
    • Update
    • Delete
  • twilio_subaccount
    • Create
    • Update
    • Delete
  • twilio_application
    • Create
    • Update
    • Delete
  • twilio_worker
    • Create
    • Update
    • Delete
  • twilio_taskQueue
    • Create
    • Update
    • Delete
  • twilio_workflow
    • Create
    • Update
    • Delete
  • twilio_phoneNumber
    • Create
    • Update
    • Delete

More coming soon.

Build

Run:

make plugin

to build and move the plugin to ~/.terraform.d/plugins which is where terraform will look for all 3rd party plugins

Getting Started

  1. Start a trial account at twilio.com (if you don't have one already). Use the Console Dashboard to take note of your Account SID (a long string starts with AC and looks like a GUID) and Auth Token (also a long GUID-like string, hidden under the View link).
  2. Download the latest release of the provider and place in your ~/.terraform.d/plugins directory.
  3. Use the example below, replacing account_sid and auth_token with the appropriate values.
  4. terraform apply Note: this will cost you REAL MONEY (or at the very least trial credits).

Debugging

Adding the following lines to your bash profile will enable additional logging.

export TF_LOG=TRACE
export TF_LOG_PATH=./terraform.log
export DEBUG_HTTP_TRAFFIC=true

Example

Note: running and applying the below could cost you REAL MONEY! Please use this tool wisely!

provider "twilio" {
    account_sid = "<your account sid here>"
    auth_token = "<your auth token here>"
}

resource "twilio_subaccount" "woomy" {
    friendly_name = "Woomy Subaccount #1"
}

resource "twilio_application" "new_twiml_app" {
    friendly_name = "My new TwiML application"
}

resource "twilio_worker" "test_worker" {
    friendly_name = "Your Name"
    workspace_sid = "WSXXXXXXXXXXXXXX"
}

resource "twilio_taskQueue" "normal_support" {
    friendly_name = "Normal Support"
    workspace_sid = "WSXXXXXXXXXXXXXX"
}

resource "twilio_workflow" "test_workflow" {
    friendly_name = "Test Workflow"
    workspace_sid = "WSXXXXXXXXXXXXXX"
    configuration = "{\"task_routing\":{\"default_filter\":{\"queue\":\"${twilio_taskQueue.normal_support.id}\"}}}"
}

resource "twilio_phoneNumber" "test_phone_number" {
    friendly_name = "Test Phone Number"
    search = "310*"
    country_code = "US"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
helpers
plugin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL