The provider configuration block accepts the following arguments:
-
account_sid
- (Required) Your SID (application ID) for the the Twilio API. May alternatively be set via theTWILIO_SID
environment variable. -
auth_token
- (Required) The API auth token to use when making requests. May alternatively be set via theTWILIO_AUTH_TOKEN
environment variable.
Does a search for available phone number via the Local API described here: https://www.twilio.com/docs/api/rest/available-phone-numbers and then purchases it
optional "Advanced Filters" are nested under location
block. (and In
s are dropped)
Purchase, update, and delete API here: https://www.twilio.com/docs/api/rest/incoming-phone-numbers
Arguments mostly follow those documented there with snake case instead of CamelCase (though with name
instead of FriendlyName
).
TL;DR read the schema
provider "twilio" {
account_sid = "ASdiid03kjj40304mmd03043893434id"
auth_token = "abcd1234"
}
resource "twilio_phonenumber" "mexico" {
iso_country_code = "MX"
}
resource "twilio_phonenumber" "boston" {
name = "boston reserved"
location {
near_lat_long {
longitude = 42.3755210
latitude = -71.0932520
}
}
}
resource "twilio_phonenumber" "virginia" {
name = "Virginia"
location {
region = "VA"
}
sms_method = "POST"
sms_url = "https://example.com/smsEndpoint"
}
How to submit changes:
- Fork this repository.
- Make your changes.
- Email us at [email protected] to sign a CLA.
- Submit a pull request.
terraform-provider-twilio is maintained by Tulip. We're an MIT startup located in Boston, helping enterprises manage, understand, and improve their manufacturing operations. We bring our customers modern web-native user experiences to the challenging world of manufacturing, currently dominated by ancient enterprise IT technology. We work on Meteor web apps, embedded software, computer vision, and anything else we can use to introduce digital transformation to the world of manufacturing. If these sound like interesting problems to you, we should talk.
terraform-provider-twilio is licensed under the Apache Public License.