rjpearson94 / terraform-provider-twilio Goto Github PK
View Code? Open in Web Editor NEWTerraform Twilio provider
Home Page: https://registry.terraform.io/providers/RJPearson94/twilio/latest/docs
License: Mozilla Public License 2.0
Terraform Twilio provider
Home Page: https://registry.terraform.io/providers/RJPearson94/twilio/latest/docs
License: Mozilla Public License 2.0
I would like to change the defaultActivitySid and timeoutActivitySid.
For some reason creating a workspace doesn't allow setting a defaultActivitySid or timeoutActivitySid but updating does: https://www.twilio.com/docs/taskrouter/api/workspace#update-a-workspace-resource
Hey, is there anyway to rotate the auth_token for a sub account using this provider.
I do see Twilio has an API for it here: https://www.twilio.com/docs/iam/api/authtoken
This could be useful in combination with Terraform time rotating feature or if a secret is exposed without having to update the token manually and re-import the resource.
Hey,
Instead of using an aliased provider for a subuser, would it be possible to add optional account_sid
and auth_token
properties on resources which could fall back to the provider ones?
Current Way:
provider "twilio" {
auth_token = var.auth_token
account_sid = var.account_sid
}
resource "twilio_account_sub_account" "sub_account" {
friendly_name = var.name
}
provider "twilio" {
alias = "sub"
auth_token = local.first_apply ? var.auth_token : twilio_account_sub_account.sub_account.auth_token
account_sid = local.first_apply ? var.account_sid : twilio_account_sub_account.sub_account.sid
}
resource "twilio_verify_service" "verify" {
provider = twilio.sub
friendly_name = "Test Name"
lookup_enabled = true
skip_sms_to_landlines = true
totp {
issuer = "Test Name"
time_step = 30
code_length = 6
skew = 1
}
}
Proposed Way:
Current Way:
provider "twilio" {
auth_token = var.auth_token
account_sid = var.account_sid
}
resource "twilio_account_sub_account" "sub_account" {
friendly_name = var.name
}
resource "twilio_verify_service" "verify" {
auth_token = twilio_account_sub_account.sub_account.auth_token
account_sid = twilio_account_sub_account.sub_account.sid
friendly_name = "Test Name"
lookup_enabled = true
skip_sms_to_landlines = true
totp {
issuer = "Test Name"
time_step = 30
code_length = 6
skew = 1
}
}
When an Asset or Function version is updated after a build has been created, a new build is not created
twilio_serverless_build
0.12.26
& 0.13.2
0.1.0
& 0.1.1
resource "twilio_serverless_service" "service" {
unique_name = "twilio-test"
friendly_name = "test"
}
resource "twilio_serverless_function" "function" {
service_sid = twilio_serverless_service.service.sid
friendly_name = "test"
content = <<EOF
exports.handler = function (context, event, callback) {
callback(null, "Hello World");
};
EOF
content_type = "application/javascript"
content_file_name = "helloWorld.js"
path = "/test-function"
visibility = "public"
}
resource "twilio_serverless_asset" "asset" {
service_sid = twilio_serverless_service.service.sid
friendly_name = "test"
source = "module.png"
source_hash = filemd5("${path.module}/module.png")
content_type = "image/png"
path = "/test-asset"
visibility = "public"
}
resource "twilio_serverless_build" "build" {
service_sid = twilio_serverless_service.service.sid
function_version {
sid = twilio_serverless_function.function.latest_version_sid
}
asset_version {
sid = twilio_serverless_asset.asset.latest_version_sid
}
dependencies = {
"twilio" : "3.6.3"
}
polling {
enabled = true
}
}
When the asset and/ or function version SID's are updated a new build (with new ID & SID) should be created
A new build is not created
Elastic SIP trunk and Origination URL support has been added to the master branch of the Twilio Go SDK, once a new version is released then support can be added to the Terraform provider
Add at least 2 additional resources
Add at least 3 additional data sources
Awaiting 0.7.0 of the Twilio Go SDK to be released
When creating a new studio flow the flow is created in Twilio but an error is thrown and the resource is not added into the terraform state. So when re-running the apply command, it attempts to recreate the flow with the same error again.
We are working around this issue to import the created resource into the state, the resource is then updated in place on the next apply.
This is the error that is thrown:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ module.twilio.twilio_studio_flow.${STUDIO_FLOW_NAME}, provider
│ "module.twillio.provider"[registry.terraform.io/rjpearson94/twilio"]"
│ produced an unexpected new value: Root resource was present, but now
│ absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
Steps to reproduce the behaviour:
Studio flow to be created, apply command to run successfully and resource added to terraform state
No a nice to have
Ideally we would be able to set up the pay connections in twilio via terraform, so they could be versioned
https://www.twilio.com/docs/voice/twiml/pay/pay-connectors#install-pay-connectors
twilio_api_accounts_incoming_phone_numbers
If you import a Twilio phone number, the terraform state will always set that number's area_code
to null
.
Steps to reproduce the behaviour:
area_code
is set to null
The provider should populate the area_code
based on what is returned by the Twilio API
N/A
I believe this block should simply include a line for the area_code
field.
twilio auth credential environment variables do not work
Using environment variables to pass in twilio credentials does not work
Steps to reproduce the behaviour:
# dont use credentials in provider
provider "twilio" {}
# run terraform plan passing in env vars
TWILIO_ACCOUNT_SID=sid TWILIO_API_KEY=key terraform plan
The plan should run like using credentials in provider
Error: Account Details Specified are invalid
2021-01-22T16:32:29.494Z [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
0.14.5
0.15.0
all if there are too many resources
Error: Failed to create workflow: Rate limit exceeded for target Workflow-Create
This is caused by the 1 request per second rate limit: https://stackoverflow.com/questions/68637366/rate-limit-exceeded-for-target-task-list-evaluatetaskattributes#comment121322707_68644314
Steps to reproduce the behaviour:
Should retry if rate limit error is caught.
I'm trying to create a twilio verify from a subAccount. the accountId and Authtoken I initially have are from the main account. So I need to create 2 twilio providers, one for the main account, and one for the sub account.
but the twilio provider would not let me create the sub account with a dependancy on the main account. The error that is returned is: Error: Account details specified are invalid. Validation errors: [SID is required, Auth token is required]
here is the code that would reproduce the issue:
terraform {
required_providers {
twilio = {
source = "RJPearson94/twilio"
version = ">= 0.2.1"
}
}
}
locals {
twilio_account_sid = "AC_Main_Account"
twilio_auth_token = "token"
name_prefix = "terraform-test"
}
provider "twilio" {
alias = "main"
account_sid = local.twilio_account_sid
auth_token = local.twilio_auth_token
}
resource "twilio_account_sub_account" "galoy_sub_account" {
provider = twilio.main
friendly_name = "${local.name_prefix}-sub-account"
}
provider "twilio" {
alias = "sub"
account_sid = twilio_account_sub_account.galoy_sub_account.sid
auth_token = twilio_account_sub_account.galoy_sub_account.auth_token
}
resource "twilio_verify_service" "service" {
provider = twilio.sub
friendly_name = local.name_prefix
lookup_enabled = false
}
output "result" {
value = twilio_verify_service.service.id
}
Hello there! We are facing a failing to install the provider running terraform-apply, looks like the openpgp is expired, how can we fix it?
Steps to reproduce the behavior:
Run terraform-apply
Success on provider install
Initializing provider plugins...
- Reusing previous version of twilio/twilio from the dependency lock file
- Reusing previous version of rjpearson94/twilio from the dependency lock file
- Installing twilio/twilio v0.18.25...
- Installed twilio/twilio v0.18.25 (self-signed, key ID 2D8261056119B780)
- Installing rjpearson94/twilio v0.23.0...
╷
│ Error: Failed to install provider
│
│ Error while installing rjpearson94/twilio v0.23.0: error checking
│ signature: openpgp: key expired
╵
make: *** [Makefile:[114](https://github.com/twilio/tdp-foundational-demo/actions/runs/6431506450/job/17464549441#step:7:115): terraform-init] Error 1
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
Error: Process completed with exit code 2.
We are running it into a GitHub Actions pipeline
When an Autopilot Task is updated a new model build is not created.
twilio_autopilot_model_build
0.12.26
& 0.13.2
0.1.0
& 0.1.1
resource "twilio_autopilot_assistant" "assistant" {
friendly_name = "test"
}
resource "twilio_autopilot_task" "task" {
assistant_sid = twilio_autopilot_assistant.assistant.sid
unique_name = "test"
}
resource "twilio_autopilot_task_sample" "task_sample" {
assistant_sid = twilio_autopilot_task.task.assistant_sid
task_sid = twilio_autopilot_task.task.sid
language = "en-US"
tagged_text = "test"
}
resource "twilio_autopilot_model_build" "model_build" {
assistant_sid = twilio_autopilot_assistant.assistant.sid
unique_name = "test"
polling {
enabled = true
}
depends_on = [
twilio_autopilot_task_sample.task_sample
]
}
When an Autopilot task/ associated resources are updated then a new model build should be created
A new model build is not created
The auth_token
output is always empty
Steps to reproduce the behaviour:
A quick way to test and see this is
resource "twilio_account_sub_account" "sub_account" {
friendly_name = "test"
}
resource "local_file" "twilio" {
filename = "twilio.json"
content = jsonencode(twilio_account_sub_account.sub_account)
}
It would be useful to be able to import and create conversation Addresses.
https://conversations.twilio.com/v1/Configuration/Addresses/
Currently, this looks like it is not possible to update these.
Hi. Is it possible to deploy multiple functions under the same service? When we try it just deploys one.
Hi Rob, thanks for the provider!
I'm working on setting up Twilio infrastructure for our project using your provider. I need to create TwiML App with Voice URL pointing to Twilio Serverless Function. For this I need to know domainBase
property for the service, which is used to construct URL for the function. I couldn't find this property in exported attributes for twilio_serverless_service
.
Would it be possible to update that resource so the domainBase
is exported?
domain_base
so it can be used as an outputoutput "service_domain_base" {
description = "The domain base of the Twilio service."
value = twilio_serverless_service.service.domain_base
}
n/a
Hey this provider is awesome, much better than the one that comes directly from Twilio. The one thing missing it seems is the Verify API which is in the 'official' one. Is it possible to add to this one as well, for reference: https://github.com/twilio/terraform-provider-twilio/tree/main/examples/verify/v2
No, not related to a problem.
Currently, you can manage a studio flow using the twilio_studio_flow
resource, you can define the flow definition JSON inline or load it from an external file, the state transitions are predefined and interpolation can be used to substitute in certain values.
This approach is fine but if you need to conditionally include transitions e.g. in certain environments, you may not want to include a specific widget/ resources i.e. send to Autopilot. This would mean you would need to manage separate configuration for each permutation of the flow which would bring additional maintenance overhead.
The provider should support managing Studio flow definition and widgets as data sources as this would allow meta-arguments i.e. count, expressions, functions, etc. to be used to dynamically generate the definition JSON. This JSON can then be supplied as an input to the twilio_studio_flow
resource.
There would be a new data source for the Studio Flow definition and each Studio Flow widget.
The example below shows creating a studio flow with the trigger
and send to flex
widgets
## Studio Flow Definition
data "twilio_studio_flow_widget_send_to_flex" "send_to_flex" {
name = "SendMessageToAgent"
workflow = var.workflow_sid
channel = var.channel_sid
attributes = jsonencode({
"name" : "{{trigger.message.ChannelAttributes.from}}",
"channelType" : "{{trigger.message.ChannelAttributes.channel_type}}",
"channelSid" : "{{trigger.message.ChannelSid}}"
})
offset {
x = 200
y = 240
}
}
data "twilio_studio_flow_widget_trigger" "trigger" {
name = "Trigger"
transitions {
incoming_message = data.twilio_studio_flow_widget_send_to_flex.send_to_flex.name
}
offset {
x = 200
y = 0
}
}
data "twilio_studio_flow_definition" "definition" {
description = "Bot flow for creating a Flex webchat task"
initial_state = data.twilio_studio_flow_widget_trigger.trigger.name
flags {
allow_concurrent_calls = true
}
state {
json = data.twilio_studio_flow_widget_send_to_flex.send_to_flex.json
}
state {
json = data.twilio_studio_flow_widget_trigger.trigger.json
}
}
## Studio Flow
resource "twilio_studio_flow" "flow" {
friendly_name = "With widgets"
status = "draft"
definition = data.twilio_studio_flow_definition.definition.json
validate = true
}
## Variables
variable "workflow_sid" {
description = "Task Router Workflow sid"
type = string
}
variable "channel_sid" {
description = "Task Router Channel sid"
type = string
}
The example below shows the same studio flow above with the send to autopilot
widget being conditionally included as the first transition in the definition JSON
## Studio Flow Definition
locals {
include_autopilot = var.autopilot_assistant_sid != null
states = compact([
data.twilio_studio_flow_widget_trigger.trigger.json,
data.twilio_studio_flow_widget_send_to_flex.send_to_flex.json,
join("", data.twilio_studio_flow_widget_send_to_autopilot.send_to_autopilot.*.json),
])
message_transition = coalesce(
join("", data.twilio_studio_flow_widget_send_to_autopilot.send_to_autopilot.*.name),
data.twilio_studio_flow_widget_send_to_flex.send_to_flex.name
)
}
data "twilio_studio_flow_widget_send_to_autopilot" "send_to_autopilot" {
count = local.include_autopilot ? 1 : 0
name = "SendToAutopilot"
offset {
x = 200
y = 240
}
transitions {
failure = data.twilio_studio_flow_widget_send_to_flex.send_to_flex.name
timeout = data.twilio_studio_flow_widget_send_to_flex.send_to_flex.name
}
autopilot_assistant_sid = var.autopilot_assistant_sid
from = "{{flow.channel.address}}"
body = "{{trigger.message.Body}}"
timeout = 14400
}
data "twilio_studio_flow_widget_send_to_flex" "send_to_flex" {
name = "SendMessageToAgent"
workflow = var.workflow_sid
channel = var.channel_sid
attributes = jsonencode({
"name" : "{{trigger.message.ChannelAttributes.from}}",
"channelType" : "{{trigger.message.ChannelAttributes.channel_type}}",
"channelSid" : "{{trigger.message.ChannelSid}}"
})
offset {
x = 270
y = 540
}
}
data "twilio_studio_flow_widget_trigger" "trigger" {
name = "Trigger"
transitions {
incoming_message = local.message_transition
}
offset {
x = 200
y = 0
}
}
data "twilio_studio_flow_definition" "definition" {
description = "Bot flow for creating a Flex webchat task"
initial_state = data.twilio_studio_flow_widget_trigger.trigger.name
flags {
allow_concurrent_calls = true
}
dynamic "state" {
for_each = local.states
content {
json = state.value
}
}
}
## Studio Flow
resource "twilio_studio_flow" "flow" {
friendly_name = "Conditional Widgets"
status = "draft"
definition = data.twilio_studio_flow_definition.definition.json
validate = true
}
## Variables
variable "workflow_sid" {
description = "Task Router Workflow sid"
type = string
}
variable "channel_sid" {
description = "Task Router Channel sid"
type = string
}
variable "autopilot_assistant_sid" {
description = "autopilot assistant sid"
type = string
default = null
}
The solution should not enforce the use of the widget data sources i.e. if a user wants to specify the widget definition inline or in external files then this should be supported too.
twilio_messaging_services_phone_numbers_v1
If you import a Twilio messaging service phone number, the terraform state will always set that number's phone_number_sid
to null
.
Steps to reproduce the behaviour:
twilio_messaging_services_phone_numbers_v1
resource in the terraform statephone_number_sid
is set to null
The provider should populate the phone_number_sid
based on what is returned by the Twilio API
N/A
I believe this block should simply include a line for the phone_number_sid
field.
Looks like the twilio API responds with a string "True" or "False" for the Sandbox value, which is mismatched with the expected bool in the sdk you've written for this provider. This results in the following error.
Failed to create conversations credential: json: cannot unmarshal string into Go struct field CreateCredentialResponse.sandbox of type bool
Steps to reproduce the behaviour:
Resource created and able to proceed with other resource creation
Failed to create conversations credential: json: cannot unmarshal string into Go struct field CreateCredentialResponse.sandbox of type bool
It's not clear whether it's possible to create a Twiml App
A way to make a Twiml App
resource "twilio_twiml_app" "resource_name" {
friendly_name = ""
voice {
request_url = ""
fallback_url = ""
status_callback_url = ""
caller_name_lookup = "disabled|enabled"
}
messaging {
request_url = ""
fallback_url = ""
status_callback_url = ""
}
}
The Twiml Apps appear under the Phone Number and Voice sections. It's unclear where the ownership lies.
I created a service, a set of functions & assets and a build successfully using this module.
When I try to create an environment and deployment for the build, it fails with the following error.
Error: Failed to create serverless environment: Environment with this UniqueName or DomainSuffix already exists.
I've tried a bunch of different names and it's still the same error.
I've also commented out the deployment resource and narrowed it down to the twilio_serverless_environment resource
the environment would get created
I would like to use encrypted recordings: https://www.twilio.com/docs/video/api/encrypted-recordings#http-post for this I need to create public keys: https://www.twilio.com/docs/iam/credentials/api I would like to manage that in code.
Use the APIs to first make it possible to create public keys and second make it possible to set the encrypted recordings
There doesn't seem to be a way to create a TwiML Bin
resource "twilio_twiml_app" "app" {
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
friendly_name = "myName"
twiml = "
Your code is {{otp}}"
}
This is for the test integration with OKTA:
https://developer.okta.com/docs/guides/telephony-inline-hook/nodejs/main/
Running terraform apply
using the twilio_phone_number
resource is giving me an error:
panic: interface conversion: interface {} is []interface {}, not string
I'm fairly new to Terraform, but this seems like a Go type error from this func: https://github.com/RJPearson94/terraform-provider-twilio/blob/main/twilio/internal/services/phone_number/resource_phone_number.go#L306
Maybe this is user-error? Thanks for looking at this issue.
A clear and concise description of what the bug is. Feel free to include Terraform configuration, logs, etc.
Here's what my main.tf looks like:
terraform {
required_providers {
twilio = {
source = "RJPearson94/twilio"
version = ">= 0.2.1"
}
}
}
provider "twilio" {
account_sid = "ACXXX"
auth_token = "12345"
}
resource "twilio_phone_number" "phone_number" {
account_sid = "ACXXX"
phone_number = "+14153631234"
voice {
url = "https://twilio.com"
}
}
Steps to reproduce the behaviour:
terraform apply
Purchase a Twilio number?
panic: interface conversion: interface {} is []interface {}, not string
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1:
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: goroutine 53 [running]:
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/RJPearson94/terraform-provider-twilio/twilio/internal/services/phone_number.resourcePhoneNumberCreate(0x231bfc0, 0xc00060e540, 0xc00065a280, 0x1d8e6a0, 0xc0000de460, 0xc00060dde0, 0x12d3e8a, 0xc00011d420)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/RJPearson94/terraform-provider-twilio/twilio/internal/services/phone_number/resource_phone_number.go:337 +0x1bd0
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc000475ef0, 0x231bf40, 0xc00060a140, 0xc00065a280, 0x1d8e6a0, 0xc0000de460, 0x0, 0x0, 0x0)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:275 +0x1ec
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000475ef0, 0x231bf40, 0xc00060a140, 0xc00062a150, 0xc00011d420, 0x1d8e6a0, 0xc0000de460, 0x0, 0x0, 0x0, ...)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:386 +0x681
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000302560, 0x231bf40, 0xc00060a140, 0xc00061c0a0, 0xc00060a140, 0xc00060e100, 0x232d6c0)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:951 +0x8b2
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ApplyResourceChange(0xc000244b20, 0x231bf40, 0xc00060a140, 0xc00062a000, 0xc000244b20, 0xc000618180, 0xc000616ba0)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/[email protected]/tfprotov5/server/server.go:331 +0xac
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x1fe9a00, 0xc000244b20, 0x231c000, 0xc000618180, 0xc00060e120, 0x0, 0x231c000, 0xc000618180, 0xc000628500, 0x487)
2021-01-21T15:40:17.141-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x217
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005d6380, 0x2329a00, 0xc00018d980, 0xc000624000, 0xc0005b2d80, 0x2c5dce0, 0x0, 0x0, 0x0)
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/[email protected]/server.go:1194 +0x50a
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/grpc.(*Server).handleStream(0xc0005d6380, 0x2329a00, 0xc00018d980, 0xc000624000, 0x0)
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/[email protected]/server.go:1517 +0xcfd
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00030b0b0, 0xc0005d6380, 0x2329a00, 0xc00018d980, 0xc000624000)
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/[email protected]/server.go:859 +0xa1
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-01-21T15:40:17.142-0800 [DEBUG] plugin.terraform-provider-twilio_v0.6.1: google.golang.org/[email protected]/server.go:857 +0x204
2021-01-21T15:40:17.144-0800 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-01-21T15:40:17.144-0800 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/rjpearson94/twilio/0.6.1/darwin_amd64/terraform-provider-twilio_v0.6.1 pid=17726 error="exit status 2"
2021/01/21 15:40:17 [DEBUG] twilio_studio_flow.flow: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2021/01/21 15:40:17 [TRACE] EvalWriteState: writing current state object for twilio_studio_flow.flow
2021/01/21 15:40:17 [DEBUG] twilio_phone_number.phone_number: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2021/01/21 15:40:17 [TRACE] EvalMaybeTainted: twilio_phone_number.phone_number encountered an error during creation, so it is now marked as tainted
2021/01/21 15:40:17 [TRACE] EvalWriteState: removing state object for twilio_phone_number.phone_number
2021/01/21 15:40:17 [TRACE] EvalApplyProvisioners: twilio_phone_number.phone_number has no state, so skipping provisioners
2021/01/21 15:40:17 [TRACE] EvalMaybeTainted: twilio_phone_number.phone_number encountered an error during creation, so it is now marked as tainted
2021/01/21 15:40:17 [TRACE] EvalWriteState: removing state object for twilio_phone_number.phone_number
2021/01/21 15:40:17 [TRACE] vertex "twilio_phone_number.phone_number": visit complete
2021/01/21 15:40:17 [TRACE] vertex "twilio_studio_flow.flow (destroy)": visit complete
2021/01/21 15:40:17 [TRACE] dag/walk: upstream of "twilio_taskrouter_workflow.did_workflow (destroy)" errored, so skipping
2021/01/21 15:40:17 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2021/01/21 15:40:17 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/rjpearson94/twilio\"] (close)" errored, so skipping
2021/01/21 15:40:17 [TRACE] dag/walk: upstream of "root" errored, so skipping
2021/01/21 15:40:17 [TRACE] statemgr.Filesystem: creating backup snapshot at terraform.tfstate.backup
2021/01/21 15:40:17 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 7
2021/01/21 15:40:17 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2021/01/21 15:40:17 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2021/01/21 15:40:17 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2021-01-21T15:40:17.177-0800 [DEBUG] plugin: plugin exited
Defining account_sid and auth_token in the twilio provider block does not work:
provider "twilio" {
account_sid = data.vault_generic_secret.twilio_dev.data["account_sid"]
auth_token = data.vault_generic_secret.twilio_dev.data["auth_token"]
}
or
provider "twilio" {
account_sid = "xxx"
auth_token = "yyy"
}
both do not work.
Acquiring state lock. This may take a few moments...
Error: Account Details Specified are invalid
If I use the same credentials but with
TWILIO_ACCOUNT_SID="" TWILIO_AUTH_TOKEN="" terraform plan
I can authenticate and create resources
Steps to reproduce the behaviour:
terraform plan
terraform should be able to use these credentials and successfully continue without error
trawled the logs, nothing of use.
Add any other context about the problem here.
When creating a serverless build with multiple function or asset versions that were created simultaneously, the Twilio API can return these in any order. As the order may not match the order the asset or function versions were supplied Terraform will detect this as a drift and the build is re-created on the next deployment.
This causes inconsistent behaviour in the resource as drift may or may not be detected
The resource should not detect a drift when the API returns the details in a random order
When specifying a default_template_sid
for the twilio_verify_service
resource, the Terraform apply is successful but inside Twilio it never actually gets set, and when re-running Terraform apply it lists the default_template_sid
as a configuration change again.
For more context I am trying to apply the HJ1552d2ed1b7588baf459dee4acaa0b2b
template (Static Verify Templates Brandful)
When destroying a deployment resource. The build_sid
is not being superseded correctly, this causes the following error Failed to delete serverless build: Cannot delete Build because it's part of an active Deployment.
to be thrown when attempting to destroy a build.
This error occurs when you destroy a deployment and build but leave other resources i.e. service, environment, etc. behind
Occasionally this error also occurs when running a terraform destroy on all deployed resources, this is intermittent because depending on the order in which Terraform deletes the resources i.e. if the environment is destroyed before the build then no active deployment exists so the build can be deleted. Whereas if the build is destroyed before the environment (which can happen when a number of environment variables are attached to an environment) then the error above will be thrown
Steps to reproduce the behaviour:
The build_sid of the active deployment should be set to null, this can be seen by checking the environment should have the build_sid
set to null. The build should be successfully deleted once the deployment has been deleted/ superseded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.