Use this data source to get a list of cognito user pools.
data "aws_api_gateway_rest_api" "selected" { name = "${var.api_gateway_name}" } data "aws_cognito_user_pools" "selected" { name = "${var.cognito_user_pool_name}" } resource "aws_api_gateway_authorizer" "cognito" { name = "cognito" type = "COGNITO_USER_POOLS" rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}" provider_arns = ["${data.aws_cognito_user_pools.selected.arns}"] }
name
- (required) Name of the cognito user pools. Name is not a unique attribute for cognito user pool, so multiple pools might be returned with given name. ids
- The list of cognito user pool ids.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/d/cognito_user_pools.html