Skip to content

Commit 7ac49c9

Browse files
committed
Added extra variables
1 parent 0ba192c commit 7ac49c9

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ locals {
202202
supported_identity_providers = lookup(client, "supported_identity_providers", var.default_client_supported_identity_providers)
203203
prevent_user_existence_errors = lookup(client, "prevent_user_existence_errors", var.default_client_prevent_user_existence_errors)
204204
write_attributes = lookup(client, "write_attributes", var.default_client_write_attributes)
205+
access_token_validity = lookup(client, "access_token_validity", var.default_client_access_token_validity)
206+
id_token_validity = lookup(client, "id_token_validity", var.default_client_id_token_validity)
207+
token_validity_units = lookup(client, "token_validity_units", var.default_client_token_validity_units)
208+
enable_token_revocation = lookup(client, "enable_token_revocation", var.default_client_enable_token_revocation)
205209
}
206210
}
207211
}
@@ -225,6 +229,10 @@ resource "aws_cognito_user_pool_client" "client" {
225229
prevent_user_existence_errors = each.value.prevent_user_existence_errors
226230
user_pool_id = aws_cognito_user_pool.user_pool[0].id
227231
write_attributes = each.value.write_attributes
232+
access_token_validity = each.value.access_token_validity
233+
id_token_validity = each.value.id_token_validity
234+
token_validity_units = each.value.token_validity_units
235+
enable_token_revocation = each.value.enable_token_revocation
228236
}
229237

230238
resource "aws_cognito_user_pool_domain" "domain" {

variables.tf

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,38 @@ variable "default_client_write_attributes" {
160160
default = null
161161
}
162162

163+
variable "default_client_access_token_validity" {
164+
description = "(Optional) Time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in 'default_client_token_validity_units'."
165+
type = number
166+
default = null
167+
}
168+
169+
variable "default_client_id_token_validity" {
170+
description = "(Optional) Time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in 'default_client_token_validity_units'."
171+
type = number
172+
default = null
173+
}
174+
175+
variable "default_client_token_validity_units" {
176+
description = "(Optional) Configuration block for units in which the validity times are represented in."
177+
type = any
178+
default = null
179+
}
180+
181+
# Example:
182+
#
183+
# default_client_token_validity_units = {
184+
# refresh_token = "days"
185+
# access_token = "minutes"
186+
# id_token = "minutes"
187+
# }
188+
189+
variable "default_client_enable_token_revocation" {
190+
description = " (Optional) Enables or disables token revocation."
191+
type = bool
192+
default = null
193+
}
194+
163195
variable "invite_email_subject" {
164196
type = string
165197
description = "(Optional) The subject for email messages."

0 commit comments

Comments
 (0)