Checklist
Describe the problem you'd like to have solved
When migrating an existing tenant from a legacy SMS gateway to the Unified Phone Experience (UPE) for Passwordless via the custom-phone-provider Action, the dashboard exposes a toggle:
Authentication > Passwordless > SMS > Use Tenant-Level Messaging Provider
Enabling this toggle writes a hidden field options.use_phone_provider: true (the string "unified" is also accepted) on the SMS connection. Without it, Passwordless requests on legacy tenants continue to be routed through the connection's provider: "sms_gateway" settings, bypassing the configured tenant phone provider / Action — even when:
auth0_phone_provider is set to name = "custom" and disabled = false
- A
custom-phone-provider (v1) Action is deployed and bound via auth0_trigger_actions
auth0_tenant.flags.phone_consolidated_experience = true
This field is currently not exposed by the provider (any version up to and including v1.44.0) nor by the underlying auth0/go-auth0 SDK, so it's impossible to flip this toggle from Terraform. Tenants created after UPE became default appear to route Passwordless via the tenant phone provider without this flag, which is why the gap is invisible until you migrate an older tenant.
Repro on a tenant created before UPE became default:
resource "auth0_connection" "sms" {
strategy = "sms"
options {
provider = "sms_gateway"
gateway_url = "https://example.com/otp"
gateway_authentication { ... }
# no way to set use_phone_provider = true here
}
}
`terraform apply` succeeds, the Action is bound, the tenant phone provider is `custom`, but Passwordless SMS keeps hitting the legacy gateway
### Describe the ideal solution
Add support for `options.use_phone_provider` (boolean) on `auth0_connection` when `strategy = "sms"`:
```hcl
resource "auth0_connection" "sms" {
strategy = "sms"
options {
use_phone_provider = true
# ...
}
}
It should map to the options.use_phone_provider field returned by GET /api/v2/connections/{id} and survive PATCH round-trips.
Alternatives and current workarounds
-
Direct PATCH /connections/{id} via Management API. Works (HTTP 200), but PATCH on options is a full replace, not a merge — sending {"options":{"use_phone_provider":true}} wipes all other connection options (template, gateway settings, totp, brute_force_protection, etc.). The full options payload (including the write-only gateway_authentication.secret) must be re-sent each time. The dashboard itself fails on this with Payload validation error: 'Missing required property: secret' on property options.gateway_authentication because it doesn't know the masked secret.
-
null_resource + local-exec curl triggered on sha256(jsonencode(auth0_connection.sms.options)) to re-PATCH the flag after every Terraform-driven update of the connection. Works but fragile and bypasses the provider's drift detection.
-
Mastercard/restapi provider to manage just this field — adds a whole provider for a single attribute.
Additional context
Adding this single attribute would close the last gap preventing a fully Terraform-managed migration to the Unified Phone Experience for Passwordless on legacy tenants.
Checklist
Describe the problem you'd like to have solved
When migrating an existing tenant from a legacy SMS gateway to the Unified Phone Experience (UPE) for Passwordless via the
custom-phone-providerAction, the dashboard exposes a toggle:Enabling this toggle writes a hidden field
options.use_phone_provider: true(the string"unified"is also accepted) on the SMS connection. Without it, Passwordless requests on legacy tenants continue to be routed through the connection'sprovider: "sms_gateway"settings, bypassing the configured tenant phone provider / Action — even when:auth0_phone_provideris set toname = "custom"anddisabled = falsecustom-phone-provider(v1) Action is deployed and bound viaauth0_trigger_actionsauth0_tenant.flags.phone_consolidated_experience = trueThis field is currently not exposed by the provider (any version up to and including
v1.44.0) nor by the underlyingauth0/go-auth0SDK, so it's impossible to flip this toggle from Terraform. Tenants created after UPE became default appear to route Passwordless via the tenant phone provider without this flag, which is why the gap is invisible until you migrate an older tenant.Repro on a tenant created before UPE became default:
It should map to the
options.use_phone_providerfield returned byGET /api/v2/connections/{id}and survivePATCHround-trips.Alternatives and current workarounds
Direct
PATCH /connections/{id}via Management API. Works (HTTP 200), butPATCHonoptionsis a full replace, not a merge — sending{"options":{"use_phone_provider":true}}wipes all other connection options (template, gateway settings, totp, brute_force_protection, etc.). The full options payload (including the write-onlygateway_authentication.secret) must be re-sent each time. The dashboard itself fails on this withPayload validation error: 'Missing required property: secret' on property options.gateway_authenticationbecause it doesn't know the masked secret.null_resource+local-exec curltriggered onsha256(jsonencode(auth0_connection.sms.options))to re-PATCH the flag after every Terraform-driven update of the connection. Works but fragile and bypasses the provider's drift detection.Mastercard/restapiprovider to manage just this field — adds a whole provider for a single attribute.Additional context
v1.43.0andv1.44.0go-auth0ConnectionOptionsSMS(currentmain): noUsePhoneProviderfield*.eu.auth0.com)auth0_tenant.flags.phone_consolidated_experience(added inv1.41.0, Added support for managing UnifiedPhoneExperience #1495)Adding this single attribute would close the last gap preventing a fully Terraform-managed migration to the Unified Phone Experience for Passwordless on legacy tenants.