twilio / terraform-provider-twilio

Terraform Twilio provider
MIT License
62 stars 13 forks source link

Suggestion to handle 'required' resources or default resources created in new Twilio accounts with less friction #123

Open stephenhand opened 1 year ago

stephenhand commented 1 year ago

Issue Summary

Twilio accounts have some resources that are required, and are created as part of a new account, but are not recognised automatically as part of terraform. Some of these appear to be just defaults to get you started, but others appear to be required and have a special status.

For example, one of the serverless services is required and should not be removed, and Flex only uses the 'default' versions of some components, like Chat or Conversations services

In order to handle this, we have had to employ workarounds to import these resources when we create new accounts:

https://github.com/techmatters/flex-plugins/blob/master/scripts/src/terraformSupplemental/importDefaultTwilioResourcesToTerraform.ts

However this isn't a foolproof solution, and it has been a source of significant headaches when the default resources created by new accounts change.

Ideally we should be able to work with newly created Twilio accounts via the terraform provider without having to import resources first, and should thereafter know which versions of resources are required or special versions from their Terraform configuration, rather than it having to be tracked separately

Suggested Change

childish-sambino commented 1 year ago

Agreed. We've had the second option in our backlog for a while (reference DI-1050), but it's not been prioritized.

Pull requests and +1s on the issue summary will help it move up the backlog.

twilio-jyoung commented 1 year ago

agreed that this is difficult to work with in flex environments which spin up lots of default resources.

a phone number, taskrouter config, studio flows, conversations services, chat services, proxy services, flex conversation addresses (undocumented as far as i can tell), etc...