-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
203 lines (166 loc) · 4.47 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
//
// Global
//
variable "secret_engine" {
type = string
description = "The Vault secret engine to configure"
}
variable "mount_path" {
type = string
description = "The mount path of the secret engine"
}
variable "description" {
type = string
description = "Description of the secret engine"
default = "Managed by Terraform"
}
variable "default_ttl_seconds" {
type = number
description = "Global default TTL for the secret engine"
default = null
}
variable "max_ttl_seconds" {
type = number
description = "Global max TTL for the secret engine"
default = null
}
//
// AWS
//
variable "aws_config" {
type = object({
access_key_id = string
secret_access_key = string
region = string
default_ttl_seconds = optional(number)
max_ttl_seconds = optional(number)
})
description = "AWS secret engine configuration"
default = null
}
variable "aws_secret_backend_roles" {
type = map(object({
role_arns = optional(list(string))
iam_group_names = optional(list(string))
aws_managed_policy_arns = optional(list(string))
inline_policy_document = optional(string)
}))
description = "A map of AWS secret engine roles, in the {role_name = {config}} format"
default = {}
}
//
// Azure
//
variable "azure_config" {
type = object({
subscription_id = string
tenant_id = string
client_id = optional(string)
client_secret = optional(string)
default_ttl_seconds = optional(number)
max_ttl_seconds = optional(number)
})
description = "Azure secret engine configuration"
default = null
}
variable "azure_secret_backend_roles" {
type = map(object({
application_object_id = optional(string)
azure_roles = optional(list(object({
role_id = optional(string)
role_name = optional(string)
scope = string
})))
azure_groups = optional(list(object({
group_name = optional(string)
object_id = optional(string)
})))
ttl_seconds = optional(number)
max_ttl_seconds = optional(number)
}))
description = "A map of Azure secret engine roles, in the {role_name = {config}} format"
default = {}
}
//
// Database
//
variable "database_config" {
type = object({
postgres = optional(map(object({
allowed_roles = optional(list(string))
connection_url = string
max_open_connections = optional(number)
max_idle_connections = optional(number)
max_connection_lifetime_seconds = optional(number)
})))
})
description = "Database secret engine configuration"
default = null
}
variable "database_static_backend_roles" {
type = map(object({
database_name = string
rotation_period_seconds = optional(number)
}))
description = "Map a Vault database role to a user in a database"
default = {}
}
//
// PKI
//
variable "pki_config" {
type = object({
cert_type = string
})
description = "PKI secret engine configuration"
default = null
}
variable "pki_root_cert" {
type = object({
common_name = string
alternative_names = optional(list(string))
ttl_seconds = optional(number)
vault_address = string
})
description = "Root CA cert configuration"
default = null
}
variable "pki_intermediate_ca" {
type = object({
signing_ca_mount_path = string
common_name = string
alternative_names = optional(list(string))
ttl_seconds = optional(number)
})
description = "Intermediate CA configuration"
default = null
}
variable "pki_secret_backend_roles" {
type = map(object({
ttl_seconds = optional(number)
max_ttl_seconds = optional(number)
allowed_domains = optional(list(string))
allowed_uri_sans = optional(list(string))
}))
description = "Map of PKI secret backend roles. In {role_name = {config}} format."
default = {}
}
//
// Terraform Cloud
//
variable "terraform_config" {
type = object({
token = string
})
description = "Terraform cloud secret engine configuration"
default = null
}
variable "terraform_secret_backend_roles" {
type = map(object({
token_identity = string
ttl_seconds = optional(number)
max_ttl_seconds = optional(number)
}))
description = "Map of Terraform cloud secret backend roles. In {role_name = {config}} format"
default = {}
}