Resource: auth0_rule

With Auth0, you can create custom Javascript snippets that run in a secure, isolated sandbox as part of your authentication pipeline, which are otherwise known as rules. This resource allows you to create and manage rules. You can create global variable for use with rules by using the auth0_rule_config resource.

Example Usage

resource "auth0_rule" "my_rule" {
  name    = "empty-rule"
  script  = <<EOF
    function (user, context, callback) {
      callback(null, user, context);
    }
  EOF
  enabled = true
}
    function (user, context, callback) {
      callback(null, user, context);
    }
  EOF
  enabled = true
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# Existing rules can be imported using their ID.
#
# Example:
terraform import auth0_rule.my_rule "rul_XXXXXXXXXXXXX"