Resource: auth0_resource_server_scopes

With this resource, you can manage scopes (permissions) associated with a resource server (API).

Example Usage

resource "auth0_resource_server" "my_api" {
  name       = "Example Resource Server (Managed by Terraform)"
  identifier = "https://api.example.com"

  # Until we remove the ability to operate changes on
  # the scopes field it is important to have this
  # block in the config, to avoid diffing issues.
  lifecycle {
    ignore_changes = [scopes]
  }
}

resource "auth0_resource_server_scopes" "my_api_scopes" {
  resource_server_identifier = auth0_resource_server.my_api.identifier

  scopes {
    name        = "create:appointments"
    description = "Ability to create appointments"
  }

  scopes {
    name        = "read:appointments"
    description = "Ability to read appointments"
  }
}

Schema

Required

Read-Only

Nested Schema for scopes

Required:

Optional:

Import

Import is supported using the following syntax:

# This resource can be imported by specifying the resource server identifier.
#
# Example:
terraform import auth0_resource_server_scopes.my_api_scopes "https://api.travel0.com/v1"