Resource: aws_cognito_identity_provider

Provides a Cognito User Identity Provider resource.

Example Usage

resource "aws_cognito_user_pool" "example" {
  name                     = "example-pool"
  auto_verified_attributes = ["email"]
}

resource "aws_cognito_identity_provider" "example_provider" {
  user_pool_id  = aws_cognito_user_pool.example.id
  provider_name = "Google"
  provider_type = "Google"

  provider_details = {
    authorize_scopes = "email"
    client_id        = "your client_id"
    client_secret    = "your client_secret"
  }

  attribute_mapping = {
    email    = "email"
    username = "sub"
  }
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports no additional attributes.

Import

In Terraform v1.5.0 and later, use an import block to import aws_cognito_identity_provider resources using their User Pool ID and Provider Name. For example:

import {
  to = aws_cognito_identity_provider.example
  id = "us-west-2_abc123:CorpAD"
}

Using terraform import, import aws_cognito_identity_provider resources using their User Pool ID and Provider Name. For example:

% terraform import aws_cognito_identity_provider.example us-west-2_abc123:CorpAD