Open
Description
Checklist
- I have looked into the README and have not found a suitable solution or answer.
- I have looked into the documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have upgraded to the latest version of this provider and the issue still persists.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
Description
When applying the twilio phone provider config with the auth0_phone_provider
configuration, we're not able to leave out the optional default_from
field.
Currently with it in place, the auth0 API rejects the code claiming we should specify it:
│ Error: Missing required argument
│
│ with auth0_phone_provider.twilio_phone_provider,
│ on global.tf line 24, in resource "auth0_phone_provider" "twilio_phone_provider":
│ 24: sid = var.twilio_account_sid
│
│ "configuration.0.sid": all of `configuration.0.default_from,configuration.0.sid` must be specified
When we do specify any value for the default_from
we see another validation error from Auth0 resulting in a 400 response:
│ Error: 400 Bad Request: Bad Operation on Notification Resource
│
│ with auth0_phone_provider.twilio_phone_provider,
│ on global.tf line 16, in resource "auth0_phone_provider" "twilio_phone_provider":
│ 16: resource "auth0_phone_provider" "twilio_phone_provider" {
│
We've also supplied an empty string, null and white space and nothing can pass this.
A similar issue in the past here for the older provider (pre-major release) but the code has changed a lot since then
Expectation
Fixed validation on the Terraform schema to allow us not passing through default_from
for the auth0_phone_provider
resource.
Reproduction
Apply this terraform code:
resource "auth0_phone_provider" "twilio_phone_provider" {
name = "twilio"
disabled = false
configuration {
mssid = var.twilio_message_id
sid = var.twilio_account_sid
delivery_methods = ["text"]
credentials {
auth_token = var.twilio_auth_token
}
}
Auth0 Terraform Provider version
1.21.1
Terraform version
v1.12.2