Preskton / terraform-provider-twilio

Terraform provider for Twilio. 🌎☎️ Preserved for archaeological fun. Please see the official Twilio TF provider @ https://github.com/twilio/terraform-provider-twilio.
https://github.com/twilio/terraform-provider-twilio
Apache License 2.0
31 stars 9 forks source link

Add support for regulatory bundles to create phone numbers #53

Open iuriaranda opened 3 years ago

iuriaranda commented 3 years ago

Is your feature request related to a problem? Please describe.

We need to create phone numbers in Belgium, for which we need to provide a compliant bundle. This is the error I get when I try to create the number now:

Error: To purchase or transfer this number you must provide a bundle compliant with the rules for the country and number type. More information here: https://www.twilio.com/docs/phone-numbers/regulatory/phone-numbers-regulatory-requirements-customers

Sadly the twilio_phone_number resource doesn't expose the bundle_sid parameter.

Describe the solution you'd like

I see that the API does expose the bundleSid parameter, so it should be a matter of adding that parameter to the Terraform resource as well, similar to address_sid, identity_sid, etc.

Additional context Add any other context or screenshots about the feature request here.

If the above is a valid suggestion, I can give it a try at implementing it in the provider.

Preskton commented 3 years ago

Hi, @iuriaranda - go for it! I haven't had time recently to work on the provider, but if you're up for trying to PR it, I'd be happy to review.

Note that the underlying twilio-go library would need to expose this parameter for the tf provider to make use of it. From there, you'd add a property to the terraform model, and wire up the create/read/update.

timdodsgon commented 3 years ago

hey, i saw you was having an issue with the regulatory bundle, address and identity sids not being supported. I have had similar issues and found this Twilio provider, https://registry.terraform.io/providers/RJPearson94/twilio/latest/docs/resources/phone_number Hope this help and also hope Preskton doesnt mind me linking a different provider.