Auth0 Internal Server Error Occurs When Creating a Disabled Phone Notification Template With Terraform
Last Updated:
Overview
Creating a disabled Auth0 phone notification template with Terraform without specifying the content section results in an internal server error. Providing the content section in the resource configuration resolves this error, even when disabling the template. When attempting to create an auth0_branding_phone_notification_template resource with Terraform, omitting the content section for a disabled template causes Auth0 to return the following error during deployment:
Error: 500 Internal Server Error: An internal server error occurred
Applies To
- Auth0
- Terraform
- Phone Notification Templates
Cause
Even when the disabled attribute is set to true, the content section remains a required field on the resource. Omitting this section causes Auth0 to return an internal server error.
Solution
How is the internal server error resolved when creating a disabled phone notification template?
Include the content section in the phone template resource configuration, even when disabling the template, by referencing this example configuration.
resource "auth0_branding_phone_notification_template" "change_password" {
type = "change_password"
disabled = true
content {
from = "+1234567890"
body {
text = "Your code is: @{code}"
voice = "Your code is @{code}"
}
}
}