diff --git a/CHANGELOG.md b/CHANGELOG.md index 8239118..5efcbcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added support for Cognito custom user pool domains. +- Added support for additional cognito@edge settings via `cognito_additional_settings`. ### Changed - Update Lambda@Edge NodeJS version to `nodejs20.x` (was `nodejs14.x`). diff --git a/README.md b/README.md index 1a63a17..f0fa60a 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [cognito\_additional\_settings](#input\_cognito\_additional\_settings) | Map of any to configure any additional cognito@edge parameters not handled by this module. | `map(any)` | `{}` | no | | [cognito\_cookie\_expiration\_days](#input\_cognito\_cookie\_expiration\_days) | Number of days to keep the cognito cookie valid. | `number` | `7` | no | | [cognito\_disable\_cookie\_domain](#input\_cognito\_disable\_cookie\_domain) | Sets domain attribute in cookies, defaults to false. | `bool` | `false` | no | | [cognito\_log\_level](#input\_cognito\_log\_level) | Logging level. Default: 'silent' | `string` | `"silent"` | no | diff --git a/ssm.tf b/ssm.tf index 94312e1..2e3e8b2 100644 --- a/ssm.tf +++ b/ssm.tf @@ -1,5 +1,5 @@ locals { - lambda_configuration = { + lambda_configuration = merge({ region = var.cognito_user_pool_region userPoolId = var.cognito_user_pool_id userPoolAppId = var.cognito_user_pool_app_client_id @@ -8,7 +8,7 @@ locals { cookieExpirationDays = var.cognito_cookie_expiration_days disableCookieDomain = var.cognito_disable_cookie_domain logLevel = var.cognito_log_level - } + }, var.cognito_additional_settings) } resource "aws_kms_key" "ssm_kms_key" { diff --git a/variables.tf b/variables.tf index bd24aa0..fc22fa2 100644 --- a/variables.tf +++ b/variables.tf @@ -60,6 +60,12 @@ variable "cognito_log_level" { } } +variable "cognito_additional_settings" { + description = "Map of any to configure any additional cognito@edge parameters not handled by this module." + type = map(any) + default = {} +} + variable "tags" { description = "Map of tags to attach to all AWS resources created by this module." type = map(string)