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.
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
}
}
actions
(Block List, Min: 1) The list of actions bound to this trigger. (see below for nested schema)trigger
(String) The ID of the trigger to bind with. Options include: post-login
, credentials-exchange
, pre-user-registration
, post-user-registration
, post-change-password
, send-phone-message
, password-reset-post-challenge
, iga-approval
, iga-certification
, iga-fulfillment-assignment
, iga-fulfillment-execution
.id
(String) The ID of this resource.actions
Required:
display_name
(String) The display name of the action within the flow.id
(String) Action ID.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"