Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.75 KB

resource_server_scope.md

File metadata and controls

65 lines (47 loc) · 1.75 KB
page_title description
Resource: auth0_resource_server_scope
With this resource, you can manage scopes (permissions) associated with a resource server (API).

Resource: auth0_resource_server_scope

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

Example Usage

resource "auth0_resource_server" "resource_server" {
  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_scope" "read_posts" {
  resource_server_identifier = auth0_resource_server.resource_server.identifier
  scope                      = "read:posts"
}

resource "auth0_resource_server_scope" "write_posts" {
  resource_server_identifier = auth0_resource_server.resource_server.identifier
  scope                      = "write:posts"
}

Schema

Required

  • resource_server_identifier (String) Identifier of the resource server that the scope (permission) is associated with.
  • scope (String) Name of the scope.

Optional

  • description (String) Description of the scope (permission).

Read-Only

  • id (String) The ID of this resource.

Import

Import is supported using the following syntax:

# This resource can be imported by specifying the
# resource identifier and scope name separated by "::" (note the double colon)
# <resourceServerIdentifier>::<scope>

#
# Example:
terraform import auth0_resource_server_scope.scope "https://api.travel0.com/v1::read:posts"