diff --git a/_example/example.tf b/_example/example.tf index 94a9387..e902bfb 100644 --- a/_example/example.tf +++ b/_example/example.tf @@ -5,59 +5,41 @@ provider "aws" { module "cognito" { source = "./../" - name = "xcheck-user" - environment = "sandbox" + name = "test-user" + environment = "test" label_order = ["environment", "name"] enabled = true allow_admin_create_user_only = false advanced_security_mode = "OFF" - domain = "xcheck01" + domain = "test-domain" software_token_enabled = false mfa_configuration = "OFF" deletion_protection = "INACTIVE" users = { - rbuijs = { - email = "r.buijs@i-sec.com" - } - rzeldent = { - email = "r.zeldenthuis@i-sec.com" - } + test1 = { + email = "test1@stackx.cloud" + } + test2 = { + email = "test2@stackx.cloud" + } } user_groups = [ - { name = "AMS" + { name = "test_group_1" description = "" }, - { name = "BOG" + { name = "test_group_2" description = "" }, - { name = "CUN" - description = "" - }, - { name = "HND" - description = "" - }, - { name = "ICN" - description = "" - }, - { name = "MBJ" - description = "" - }, - { name = "PUJ" - description = "" - }, - { name = "PVR" - description = "" - }, - { name = "SXM" + { name = "test_group_3" description = "" } ] clients = [ { - name = "xhrf-reporting" - callback_urls = ["https://reporting.sandbox.x-check.net"] + name = "client_name_1" + callback_urls = [""] generate_secret = true logout_urls = [] refresh_token_validity = 30 @@ -67,8 +49,8 @@ module "cognito" { allowed_oauth_flows = ["code"] }, { - name = "xhrf-maintenance" - callback_urls = ["https://maintenance.sandbox.x-check.net"] + name = "client-name_2" + callback_urls = [""] logout_urls = [] generate_secret = true logout_urls = [] diff --git a/main.tf b/main.tf index 2396b1b..3010cec 100644 --- a/main.tf +++ b/main.tf @@ -135,7 +135,7 @@ resource "aws_cognito_user_pool" "user_pool" { mfa_configuration = var.mfa_configuration - deletion_protection = var.deletion_protection + deletion_protection = var.deletion_protection password_policy { minimum_length = var.password_minimum_length @@ -418,7 +418,7 @@ resource "aws_cognito_user_group" "main" { description = lookup(element(local.groups, count.index), "description") precedence = lookup(element(local.groups, count.index), "precedence") role_arn = lookup(element(local.groups, count.index), "role_arn") - user_pool_id = aws_cognito_user_pool.user_pool.*.id[0] + user_pool_id = aws_cognito_user_pool.user_pool.*.id[0] } locals { diff --git a/variables.tf b/variables.tf index 49de31f..50ac5e0 100644 --- a/variables.tf +++ b/variables.tf @@ -298,13 +298,13 @@ variable "clients" { } variable "users" { - type = any - default = [] + type = any + default = [] description = "(optional) describe your variable" } variable "use_defaults" { - type = bool + type = bool default = true } @@ -585,7 +585,7 @@ variable "domain_certificate_arn" { } variable "domain_name" { - type = string - default = null + type = string + default = null description = "(optional) describe your variable" } \ No newline at end of file