With this resource, you can set up APIs that can be consumed from your authorized applications.
resource "auth0_resource_server" "my_resource_server" {
name = "Example Resource Server (Managed by Terraform)"
identifier = "https://api.example.com"
signing_alg = "RS256"
allow_offline_access = true
token_lifetime = 8600
skip_consent_for_verifiable_first_party_clients = true
}
identifier
(String) Unique identifier for the resource server. Used as the audience parameter for authorization calls. Cannot be changed once set.allow_offline_access
(Boolean) Indicates whether refresh tokens can be issued for this resource server.enforce_policies
(Boolean) If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction.name
(String) Friendly name for the resource server. Cannot include <
or >
characters.signing_alg
(String) Algorithm used to sign JWTs. Options include HS256
and RS256
.signing_secret
(String) Secret used to sign tokens when using symmetric algorithms (HS256).skip_consent_for_verifiable_first_party_clients
(Boolean) Indicates whether to skip user consent for applications flagged as first party.token_dialect
(String) Dialect of access tokens that should be issued for this resource server. Options include access_token
or access_token_authz
. If this setting is set to access_token_authz
, the Permissions claim will be added to the access token. Only available if RBAC (enforce_policies
) is enabled for this API.token_lifetime
(Number) Number of seconds during which access tokens issued for this resource server from the token endpoint remain valid.token_lifetime_for_web
(Number) Number of seconds during which access tokens issued for this resource server via implicit or hybrid flows remain valid. Cannot be greater than the token_lifetime
value.verification_location
(String) URL from which to retrieve JWKs for this resource server. Used for verifying the JWT sent to Auth0 for token introspection.id
(String) The ID of this resource.Import is supported using the following syntax:
# Existing resource servers can be imported using their ID.
#
# Example:
terraform import auth0_resource_server.my_resource_server "XXXXXXXXXXXXXXXXXXXXXXX"