-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
executable file
·141 lines (120 loc) · 4.64 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# ================================================================== general ===
variable "userpool_id" {
type = string
description = "Cognito user pool ID."
default = null
}
variable "client_defaults" {
type = object({
identity_providers = optional(list(string), ["COGNITO"])
generate_secret = optional(bool, true)
token_revocation_enabled = optional(bool, true)
prevent_user_existence_errors = optional(string, "ENABLED")
cognito_auths = optional(object({
admin_user_password_auth = optional(bool, false)
custom_auth = optional(bool, false)
refresh_token_auth = optional(bool, true)
user_password_auth = optional(bool, false)
user_srp_auth = optional(bool, true)
}), {
admin_user_password_auth = false
custom_auth = false
refresh_token_auth = true
user_password_auth = false
user_srp_auth = true
})
read_attributes = optional(list(string), [])
read_attributes_builtin_included = optional(bool, true)
write_attributes = optional(list(string), [])
write_attributes_builtin_included = optional(bool, true)
allowed_oauth_flows = optional(list(string), ["code"])
allowed_oauth_flows_user_pool_client = optional(bool, true)
allowed_oauth_scopes = optional(list(string), ["email", "openid", "phone", "profile"])
callback_urls = optional(list(string), [])
logout_urls = optional(list(string), [])
token_validity = optional(object({
access_token = optional(number, 10)
id_token = optional(number, 60)
refresh_token = optional(number, 4320)
}), {
access_token = 10
id_token = 60
refresh_token = 4320
})
token_validity_units = optional(object({
access_token = optional(string, "minutes")
id_token = optional(string, "minutes")
refresh_token = optional(string, "minutes")
}), {
access_token = "minutes"
id_token = "minutes"
refresh_token = "minutes"
})
ui_customization = optional(object({
enabled = optional(bool, false)
css_path = optional(string, "")
image_path = optional(string, "")
}), {
enabled = false
css_path = ""
image_path = ""
})
})
description = "Default configurations for each client."
default = {}
}
variable "clients" {
type = map(object({
enabled = optional(bool, true)
name = optional(string)
pool_id = optional(string)
identity_providers = optional(list(string))
generate_secret = optional(bool)
token_revocation_enabled = optional(bool)
prevent_user_existence_errors = optional(string)
cognito_auths = optional(object({
admin_user_password_auth = optional(bool)
custom_auth = optional(bool)
refresh_token_auth = optional(bool)
user_password_auth = optional(bool)
user_srp_auth = optional(bool)
}), {})
read_attributes = optional(list(string))
read_attributes_builtin_included = optional(bool)
write_attributes = optional(list(string))
write_attributes_builtin_included = optional(bool)
allowed_oauth_flows = optional(list(string))
allowed_oauth_flows_user_pool_client = optional(bool)
allowed_oauth_scopes = optional(list(string))
callback_urls = optional(list(string), [])
logout_urls = optional(list(string), [])
token_validity = optional(object({
access_token = optional(number)
id_token = optional(number)
refresh_token = optional(number)
}), {})
token_validity_units = optional(object({
access_token = optional(string)
id_token = optional(string)
refresh_token = optional(string)
}), {})
ui_customization = optional(object({
enabled = optional(bool)
css_path = optional(string)
image_path = optional(string)
}), {})
}))
description = "Map of client-specific configurations. The key is the client name."
default = {}
}
variable "secrets_enabled" {
type = bool
description = "Toggle to create SecretsManger secrets for each client."
default = true
}
# ------------------------------------------------------------------ context ---
variable "aws_kv_namespace" {
type = string
description = "The namespace or prefix for AWS SSM parameters and similar resources."
default = ""
}