Resource: auth0_action

Actions are secure, tenant-specific, versioned functions written in Node.js that execute at certain points during the Auth0 runtime. Actions are used to customize and extend Auth0's capabilities with custom logic.

Example Usage

resource "auth0_action" "my_action" {
  name    = format("Test Action %s", timestamp())
  runtime = "node18"
  deploy  = true
  code    = <<-EOT
  /**
   * Handler that will be called during the execution of a PostLogin flow.
   *
   * @param {Event} event - Details about the user and the context in which they are logging in.
   * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
   */
   exports.onExecutePostLogin = async (event, api) => {
     console.log(event);
   };
  EOT

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

  dependencies {
    name    = "lodash"
    version = "latest"
  }

  dependencies {
    name    = "request"
    version = "latest"
  }

  secrets {
    name  = "FOO"
    value = "Foo"
  }

  secrets {
    name  = "BAR"
    value = "Bar"
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for supported_triggers

Required:

Nested Schema for dependencies

Required:

Nested Schema for secrets

Required:

Import

Import is supported using the following syntax:

# This resource can be imported by specifying the action ID.
#
# Example:
terraform import auth0_action.my_action "12f4f21b-017a-319d-92e7-2291c1ca36c4"