generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
185 lines (173 loc) · 5.77 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
########################################################################################################################
# Input Variables
########################################################################################################################
variable "resource_group_id" {
description = "ID of the resource group to use when creating resources."
type = string
}
variable "project_name" {
description = "The name of the project to which code engine resources will be added. It is required if var.existing_project_id is null."
type = string
default = null
}
variable "existing_project_id" {
description = "The ID of the existing project to which code engine resources will be added. It is required if var.project_name is null."
type = string
default = null
}
variable "apps" {
description = "A map of code engine apps to be created."
type = map(object({
image_reference = string
image_secret = optional(string)
run_env_variables = optional(list(object({
type = optional(string)
name = optional(string)
value = optional(string)
prefix = optional(string)
key = optional(string)
reference = optional(string)
})))
run_volume_mounts = optional(list(object({
mount_path = string
reference = string
name = optional(string)
type = string
})))
image_port = optional(number)
managed_domain_mappings = optional(string)
run_arguments = optional(list(string))
run_as_user = optional(number)
run_commands = optional(list(string))
run_service_account = optional(string)
scale_concurrency = optional(number)
scale_concurrency_target = optional(number)
scale_cpu_limit = optional(string)
scale_ephemeral_storage_limit = optional(string)
scale_initial_instances = optional(number)
scale_max_instances = optional(number)
scale_memory_limit = optional(string)
scale_min_instances = optional(number)
scale_request_timeout = optional(number)
scale_down_delay = optional(number)
}))
default = {}
}
variable "jobs" {
description = "A map of code engine jobs to be created."
type = map(object({
image_reference = string
image_secret = optional(string)
run_env_variables = optional(list(object({
type = optional(string)
name = optional(string)
value = optional(string)
prefix = optional(string)
key = optional(string)
reference = optional(string)
})))
run_volume_mounts = optional(list(object({
mount_path = string
reference = string
name = optional(string)
type = string
})))
run_arguments = optional(list(string))
run_as_user = optional(number)
run_commands = optional(list(string))
run_mode = optional(string)
run_service_account = optional(string)
scale_array_spec = optional(string)
scale_cpu_limit = optional(string)
scale_ephemeral_storage_limit = optional(string)
scale_max_execution_time = optional(number)
scale_memory_limit = optional(string)
scale_retry_limit = optional(number)
}))
default = {}
}
variable "config_maps" {
description = "A map of code engine config maps to be created."
type = map(object({
data = map(string)
}))
default = {}
}
variable "secrets" {
description = "A map of code engine secrets to be created."
type = map(object({
format = string
data = map(string)
# Issue with provider, service_access is not supported at the moment. https://github.com/IBM-Cloud/terraform-provider-ibm/issues/5232
# service_access = optional(list(object({
# resource_key = list(object({
# id = optional(string)
# }))
# role = list(object({
# crn = optional(string)
# }))
# service_instance = list(object({
# id = optional(string)
# }))
# })))
}))
default = {}
}
variable "builds" {
description = "A map of code engine builds to be created."
type = map(object({
output_image = string
output_secret = string # pragma: allowlist secret
source_url = string
strategy_type = string
source_context_dir = optional(string)
source_revision = optional(string)
source_secret = optional(string)
source_type = optional(string)
strategy_size = optional(string)
strategy_spec_file = optional(string)
timeout = optional(number)
}))
default = {}
}
variable "domain_mappings" {
description = "A map of code engine domain mappings to be created."
type = map(object({
tls_secret = string # pragma: allowlist secret
components = list(object({
name = string
resource_type = string
}))
}))
default = {}
}
variable "bindings" {
description = "A map of code engine bindings to be created."
type = map(object({
secret_name = string
components = list(object({
name = string
resource_type = string
}))
}))
default = {}
}
variable "cbr_rules" {
type = list(object({
description = string
account_id = string
rule_contexts = list(object({
attributes = optional(list(object({
name = string
value = string
}))) }))
enforcement_mode = string
operations = optional(list(object({
api_types = list(object({
api_type_id = string
}))
})))
}))
description = "The list of context-based restrictions rules to create."
default = []
}