github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/cognito_identity_pool.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_cognito_identity_pool"
     4  sidebar_current: "docs-aws-resource-cognito-identity-pool"
     5  description: |-
     6    Provides an AWS Cognito Identity Pool.
     7  ---
     8  
     9  # aws\_cognito\_identity\_pool
    10  
    11  Provides an AWS Cognito Identity Pool.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_iam_saml_provider" "default" {
    17    name                   = "my-saml-provider"
    18    saml_metadata_document = "${file("saml-metadata.xml")}"
    19  }
    20  
    21  resource "aws_cognito_identity_pool" "main" {
    22    identity_pool_name               = "identity pool"
    23    allow_unauthenticated_identities = false
    24  
    25    cognito_identity_providers {
    26      client_id               = "6lhlkkfbfb4q5kpp90urffae"
    27      provider_name           = "cognito-idp.us-east-1.amazonaws.com/us-east-1_Tv0493apJ"
    28      server_side_token_check = false
    29    }
    30  
    31    cognito_identity_providers {
    32      client_id               = "7kodkvfqfb4qfkp39eurffae"
    33      provider_name           = "cognito-idp.us-east-1.amazonaws.com/eu-west-1_Zr231apJu"
    34      server_side_token_check = false
    35    }
    36  
    37    supported_login_providers {
    38      "graph.facebook.com"  = "7346241598935552"
    39      "accounts.google.com" = "123456789012.apps.googleusercontent.com"
    40    }
    41  
    42    saml_provider_arns           = ["${aws_iam_saml_provider.default.arn}"]
    43    openid_connect_provider_arns = ["arn:aws:iam::123456789012:oidc-provider/foo.example.com"]
    44  }
    45  ```
    46  
    47  ## Argument Reference
    48  
    49  The Cognito Identity Pool argument layout is a structure composed of several sub-resources - these resources are laid out below.
    50  
    51  * `identity_pool_name` (Required) - The Cognito Identity Pool name.
    52  * `allow_unauthenticated_identities` (Required) - Whether the identity pool supports unauthenticated logins or not.
    53  * `developer_provider_name` (Optional) - The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your
    54  backend and the Cognito service to communicate about the developer provider.
    55  * `cognito_identity_providers` (Optional) - An array of [Amazon Cognito Identity user pools](#cognito-identity-providers) and their client IDs.
    56  * `openid_connect_provider_arns` (Optional) - A list of OpendID Connect provider ARNs.
    57  * `saml_provider_arns` (Optional) - An array of Amazon Resource Names (ARNs) of the SAML provider for your identity.
    58  * `supported_login_providers` (Optional) - Key-Value pairs mapping provider names to provider app IDs.
    59  
    60  #### Cognito Identity Providers
    61  
    62    * `client_id` (Optional) - The client ID for the Amazon Cognito Identity User Pool.
    63    * `provider_name` (Optional) - The provider name for an Amazon Cognito Identity User Pool.
    64    * `server_side_token_check` (Optional) - Whether server-side token validation is enabled for the identity provider’s token or not.
    65  
    66  ## Attributes Reference
    67  
    68  In addition to the arguments, which are exported, the following attributes are exported:
    69  
    70  * `id` - An identity pool ID in the format REGION:GUID.
    71  
    72  ## Import
    73  
    74  Cognito Identity Pool can be imported using the name, e.g.
    75  
    76  ```
    77  $ terraform import aws_cognito_identity_pool.mypool <identity-pool-id>
    78  ```