Skip to content

Commit

Permalink
add cognito_additional_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
KenFigueiredo committed Nov 21, 2023
1 parent adf47c7 commit 560ff1a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cognito_additional_settings"></a> [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 |
| <a name="input_cognito_cookie_expiration_days"></a> [cognito\_cookie\_expiration\_days](#input\_cognito\_cookie\_expiration\_days) | Number of days to keep the cognito cookie valid. | `number` | `7` | no |
| <a name="input_cognito_disable_cookie_domain"></a> [cognito\_disable\_cookie\_domain](#input\_cognito\_disable\_cookie\_domain) | Sets domain attribute in cookies, defaults to false. | `bool` | `false` | no |
| <a name="input_cognito_log_level"></a> [cognito\_log\_level](#input\_cognito\_log\_level) | Logging level. Default: 'silent' | `string` | `"silent"` | no |
Expand Down
4 changes: 2 additions & 2 deletions ssm.tf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 560ff1a

Please sign in to comment.