Resource: auth0_trigger_action

With this resource, you can bind an action to a trigger. Once an action is created and deployed, it can be attached (i.e. bound) to a trigger so that it will be executed as part of a flow.

Ordering of an action within a specific flow is not currently supported when using this resource; the action will get appended to the end of the flow. To precisely manage ordering, it is advised to either do so with the dashboard UI or with the auth0_trigger_bindings resource.

Example Usage

resource "auth0_action" "login_alert" {
  name   = "Alert after login"
  code   = <<-EOT
    exports.onContinuePostLogin = async (event, api) => {
      console.log("foo");
    };"
    EOT
  deploy = true

  supported_triggers {
    id      = "post-login"
    version = "v3"
  }
}

resource "auth0_trigger_action" "post_login_alert_action" {
  trigger   = "post-login"
  action_id = auth0_action.login_alert.id
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# This resource can be imported by specifying the
# trigger and action ID separated by "::" (note the double colon)
# <trigger>::<actionID>
#
# Example:
terraform import auth0_trigger_action.post_login_action "post-login::28b5c8fa-d371-5734-acf6-d0cf80ead918"