Resource: auth0_trigger_actions

With this resource, you can bind actions to a trigger. Once actions are created and deployed, they can be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions reflects the order in which they will be executed during the appropriate flow.

Example Usage

resource "auth0_action" "action_foo" {
  name   = "Test Trigger Binding Foo"
  code   = <<-EOT
    exports.onContinuePostLogin = async (event, api) => {
      console.log("foo");
    };"
    EOT
  deploy = true

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

resource "auth0_action" "action_bar" {
  name   = "Test Trigger Binding Bar"
  code   = <<-EOT
    exports.onContinuePostLogin = async (event, api) => {
      console.log("bar");
    };"
    EOT
  deploy = true

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

resource "auth0_trigger_actions" "login_flow" {
  trigger = "post-login"

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

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

Schema

Required

Read-Only

Nested Schema for actions

Required:

Import

Import is supported using the following syntax:

# This resource can be imported using the bindings trigger ID.
#
# Example:
terraform import auth0_trigger_actions.example "post-login"