Provides a Cognito Resource Server.
resource "aws_cognito_user_pool" "pool" {
name = "pool"
}
resource "aws_cognito_resource_server" "resource" {
identifier = "https://example.com"
name = "example"
user_pool_id = aws_cognito_user_pool.pool.id
}
resource "aws_cognito_user_pool" "pool" {
name = "pool"
}
resource "aws_cognito_resource_server" "resource" {
identifier = "https://example.com"
name = "example"
scope {
scope_name = "sample-scope"
scope_description = "a Sample Scope Description"
}
user_pool_id = aws_cognito_user_pool.pool.id
}
This resource supports the following arguments:
identifier
- (Required) An identifier for the resource server.name
- (Required) A name for the resource server.user_pool_id
- (Required) User pool the client belongs to.scope
- (Optional) A list of Authorization Scope.scope_name
- (Required) The scope name.scope_description
- (Required) The scope description.This resource exports the following attributes in addition to the arguments above:
scope_identifiers
- A list of all scopes configured for this resource server in the format identifier/scope_name.In Terraform v1.5.0 and later, use an import
block to import aws_cognito_resource_server
using their User Pool ID and Identifier. For example:
import {
to = aws_cognito_resource_server.example
id = "us-west-2_abc123|https://example.com"
}
Using terraform import
, import aws_cognito_resource_server
using their User Pool ID and Identifier. For example:
% terraform import aws_cognito_resource_server.example "us-west-2_abc123|https://example.com"