Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

v0.1.2 - `twilio_phone_number` love

Compare
Choose a tag to compare
@preskton-terraform-provider-twilio-bot preskton-terraform-provider-twilio-bot released this 12 Oct 18:29
4742748

twilio_phone_number now usable for most purposes!

  • Create, Update, and Delete fully functional (#3)
  • All attributes have helpful descriptions
  • Finding phone numbers
    • Search by area code
    • Free form sequence search
  • Configuration settings
    • Voice Settings
      • Application SID (#4)
      • Primary and fallback URLs and methods (#20)
      • Caller ID enabled/disabled
      • Line receive mode - voice/fax
    • SMS Settings
      • Application SID
      • Primary and fallback URLs and methods
    • Status callback
      • URL and method
    • Emergency calling (not fully tested, as I don't have a validated Address at the moment)
      • Address SID
      • Status

Detailed example of validated fields

resource "twilio_phone_number" "area_code_test" {
    country_code = "US"
    area_code = "972"
    friendly_name = "terraform-provider-twilio area code test number"

    voice {                
        primary_url = "https://genoq.com/handlers/voice-primary"
        primary_http_method = "POST"
        fallback_url = "https://genoq.com/handlers/voice-fallback"
        fallback_http_method = "GET"
        caller_id_enabled = "true"
        receive_mode = "voice"
    }

    sms {
        primary_url = "https://genoq.com/handlers/sms-primary"
        primary_http_method = "POST"
        fallback_url = "https://genoq.com/handlers/sms-fallback"
        fallback_http_method = "GeT"
    }

    status_callback {
        url = "https://genoq.com/handlers/status-callback"
        http_method = "GET"
    }

    emergency {
        address_sid = "ADXXXXX"
        status = "active"
    }
}

resource "twilio_phone_number" "search_test" {
    country_code = "US"
    search = "972*"
    friendly_name = "terraform-provider-twilio by-search test number"

    sms {
        primary_url = "https://genoq.com/handlers/sms-primary"
        primary_http_method = "POST"
        fallback_url = "https://genoq.com/handlers/sms-fallback"
        fallback_http_method = "GET"        
    }

    voice {
        receive_mode = "fax"
        application_sid = "APXXXXX"
    }    
}