page_title | description |
---|---|
Resource: auth0_resource_server_scope |
With this resource, you can manage scopes (permissions) associated with a resource server (API). |
With this resource, you can manage scopes (permissions) associated with a resource server (API).
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"
}
resource_server_identifier
(String) Identifier of the resource server that the scope (permission) is associated with.scope
(String) Name of the scope.
description
(String) Description of the scope (permission).
id
(String) The ID of this resource.
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"