Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom-phone-provider action trigger does not perform real update #1188

Closed
6 tasks done
Will956 opened this issue Mar 13, 2025 · 4 comments
Closed
6 tasks done

custom-phone-provider action trigger does not perform real update #1188

Will956 opened this issue Mar 13, 2025 · 4 comments
Assignees
Labels
🪲 bug Something isn't working

Comments

@Will956
Copy link

Will956 commented Mar 13, 2025

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

Hello,

I've recently used the new custom-phone-provider trigger action to update my action, but despite the apply working well, my changes were not reflected on my Auth0 dashboard.

Sounds like nothing was taken into account.

Expectation

The new custom-phone-provider action should be reflect on my tenant.

Reproduction

resource "auth0_phone_provider" "custom_phone_provider" {
  depends_on = [auth0_action.send_sms]
  name     = "custom"
  disabled = false

  credentials {}

  configuration {
    delivery_methods = ["text"]
  }
}

resource "auth0_action" "send_sms" {
  name    = "Custom phone provider"
  runtime = "node22"
  deploy  = true
  code    = "console.log('here')"

  supported_triggers {
    id      = "custom-phone-provider"
    version = "v1"
  }
}

resource "auth0_trigger_actions" "send_sms" {
  trigger = "custom-phone-provider"

  actions {
    id           = auth0_action.send_sms.id
    display_name = auth0_action.send_sms.name
  }
}

Auth0 Terraform Provider version

1.14.0

Terraform version

1.9.8

@Will956 Will956 added the 🪲 bug Something isn't working label Mar 13, 2025
@duedares-rvj duedares-rvj self-assigned this Mar 24, 2025
@duedares-rvj
Copy link
Member

@Will956 Hello!

The custom-phone-provider trigger is automatically bound to the first action that is created on the tenant with

supported_triggers {
    id      = "custom-phone-provider"
    version = "v1"
  }

Please look out any additional actions that might exist on your tenant. Consider deleting all those actions and recreate your action and phone provider via terraform.

Note: You'd not need to use auth0_trigger_actions, the binding will be automatically created when using auth0_phone_provider. The reason we support custom-phone-provider in auth0_trigger_actions is to allow tf users to import the binding in their statefile.

Also, just want to let you know that we are adding validations to ensure only one action exists for custom-phone-provider and custom-email-provider. I don't have a timeline at this point, but the change is going to be part of the upcoming releases.

Let me know if this fixes your issue.
Thanks!

@Will956
Copy link
Author

Will956 commented Mar 24, 2025

Hi,

Note: You'd not need to use auth0_trigger_actions

Thanks, I'm removing that.

Unfortunately, I tried to run terraform destroy --target=module.auth0.auth0_action.send_sms and also to delete all custom phone number configurations and related actions to start from scratch with terraform but I got the same behaviour. All is working, except the action that is not updated at all.

I guess I have created that new action directly in my tenant without infra as code and now I can't properly delete it? Do you know how to delete it?

@duedares-rvj
Copy link
Member

duedares-rvj commented Mar 25, 2025

@Will956 I understand your state of your tenant.

Set the bindings to empty slice:

curl -L -X PATCH 'https://login.auth0.com/api/v2/actions/triggers/custom-phone-provider/bindings' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"bindings":[]}'

You'd be now able to delete all the actions which has supported triggers as custom-phone-provider.
Now, create fresh resources through IaC using below:

resource "auth0_phone_provider" "custom_phone_provider" {
  depends_on = [auth0_action.send_sms]
  name     = "custom"
  disabled = false

  credentials {}

  configuration {
    delivery_methods = ["text"]
  }
}

resource "auth0_action" "send_sms" {
  name    = "Custom phone provider"
  runtime = "node22"
  deploy  = true
  code    = "console.log('here')"

  supported_triggers {
    id      = "custom-phone-provider"
    version = "v1"
  }
}

Let me know how it goes. :)

@Will956
Copy link
Author

Will956 commented Mar 25, 2025

Nice, the binding was already empty. But I managed to find my action with the Management API and delete it as well within the API.

The Auth0 Mangement console does not display it in the UI.

It works, thanks for your help!

@Will956 Will956 closed this as completed Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants