Skip to content

Latest commit

 

History

History
168 lines (137 loc) · 3.95 KB

aws_cognito_identity_pool.md

File metadata and controls

168 lines (137 loc) · 3.95 KB

aws_cognito_identity_pool

back

Index

Terraform

terraform {
  required_providers {
    aws = ">= 3.35.0"
  }
}

top

Example Usage

module "aws_cognito_identity_pool" {
  source = "./modules/aws/r/aws_cognito_identity_pool"

  # allow_unauthenticated_identities - (optional) is a type of bool
  allow_unauthenticated_identities = null
  # developer_provider_name - (optional) is a type of string
  developer_provider_name = null
  # identity_pool_name - (required) is a type of string
  identity_pool_name = null
  # openid_connect_provider_arns - (optional) is a type of set of string
  openid_connect_provider_arns = []
  # saml_provider_arns - (optional) is a type of list of string
  saml_provider_arns = []
  # supported_login_providers - (optional) is a type of map of string
  supported_login_providers = {}
  # tags - (optional) is a type of map of string
  tags = {}

  cognito_identity_providers = [{
    client_id               = null
    provider_name           = null
    server_side_token_check = null
  }]
}

top

Variables

variable "allow_unauthenticated_identities" {
  description = "(optional)"
  type        = bool
  default     = null
}

variable "developer_provider_name" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "identity_pool_name" {
  description = "(required)"
  type        = string
}

variable "openid_connect_provider_arns" {
  description = "(optional)"
  type        = set(string)
  default     = null
}

variable "saml_provider_arns" {
  description = "(optional)"
  type        = list(string)
  default     = null
}

variable "supported_login_providers" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "tags" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "cognito_identity_providers" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      client_id               = string
      provider_name           = string
      server_side_token_check = bool
    }
  ))
  default = []
}

top

Resource

resource "aws_cognito_identity_pool" "this" {
  # allow_unauthenticated_identities - (optional) is a type of bool
  allow_unauthenticated_identities = var.allow_unauthenticated_identities
  # developer_provider_name - (optional) is a type of string
  developer_provider_name = var.developer_provider_name
  # identity_pool_name - (required) is a type of string
  identity_pool_name = var.identity_pool_name
  # openid_connect_provider_arns - (optional) is a type of set of string
  openid_connect_provider_arns = var.openid_connect_provider_arns
  # saml_provider_arns - (optional) is a type of list of string
  saml_provider_arns = var.saml_provider_arns
  # supported_login_providers - (optional) is a type of map of string
  supported_login_providers = var.supported_login_providers
  # tags - (optional) is a type of map of string
  tags = var.tags

  dynamic "cognito_identity_providers" {
    for_each = var.cognito_identity_providers
    content {
      # client_id - (optional) is a type of string
      client_id = cognito_identity_providers.value["client_id"]
      # provider_name - (optional) is a type of string
      provider_name = cognito_identity_providers.value["provider_name"]
      # server_side_token_check - (optional) is a type of bool
      server_side_token_check = cognito_identity_providers.value["server_side_token_check"]
    }
  }

}

top

Outputs

output "arn" {
  description = "returns a string"
  value       = aws_cognito_identity_pool.this.arn
}

output "id" {
  description = "returns a string"
  value       = aws_cognito_identity_pool.this.id
}

output "this" {
  value = aws_cognito_identity_pool.this
}

top