generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.tf
164 lines (144 loc) · 5.21 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
variable "resource_group_id" {
description = "The resource group ID where the Event Streams instance is created."
type = string
}
variable "tags" {
type = list(string)
description = "The list of tags associated with the Event Steams instance."
default = []
}
variable "access_tags" {
type = list(string)
description = "The list of access tags associated with the Event Steams instance."
default = []
}
variable "es_name" {
description = "The name of the Event Streams instance."
type = string
}
variable "region" {
type = string
description = "The region where the Event Streams are created."
default = "us-south"
}
variable "schemas" {
type = list(object(
{
schema_id = string
schema = object({
type = string
name = string
fields = optional(list(object({
name = string
type = string
})))
})
}
))
description = "The list of schema objects. Include the `schema_id` and the `type` and `name` of the schema in the `schema` object."
default = []
}
variable "schema_global_rule" {
type = string
description = "Schema global compatibility rule. Allowed values are 'NONE', 'FULL', 'FULL_TRANSITIVE', 'FORWARD', 'FORWARD_TRANSITIVE', 'BACKWARD', 'BACKWARD_TRANSITIVE'."
default = null
}
variable "topics" {
type = list(object(
{
name = string
partitions = number
config = map(string)
}
))
description = "The list of topics to apply to resources. Only one topic is allowed for Lite plan instances."
default = []
}
variable "skip_kms_iam_authorization_policy" {
type = bool
description = "Set to true to skip the creation of an IAM authorization policy that permits all Event Streams database instances in the resource group to read the encryption key from the KMS instance. If set to false, pass in a value for the KMS instance in the kms_key_crn variable. In addition, no policy is created if var.kms_encryption_enabled is set to false."
default = false
}
variable "skip_es_s2s_iam_authorization_policy" {
type = bool
description = "Set to true to skip the creation of an Event Streams s2s IAM authorization policy to provision an Event Streams mirroring instance. This is required to read from the source cluster. This policy is required when creating mirroring instance."
default = false
}
variable "kms_key_crn" {
type = string
description = "The root key CRN of the key management service (Key Protect or Hyper Protect Crypto Services) to use to encrypt the payload data."
}
##############################################################
# Context-based restriction (CBR)
##############################################################
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
}))
description = "The list of context-based restriction rules to create."
default = []
# Validation happens in the rule module
}
variable "service_credential_names" {
description = "The mapping of names and roles for service credentials that you want to create for the Event streams."
type = map(string)
default = {}
}
variable "metrics" {
type = list(string)
description = "Enhanced metrics to activate, as list of strings. Allowed values: 'topic', 'partition', 'consumers'."
default = []
}
variable "quotas" {
type = list(object({
entity = string
producer_byte_rate = optional(number, -1)
consumer_byte_rate = optional(number, -1)
}))
description = "Quotas to be applied to the Event Streams instance. Entity may be 'default' to apply to all users, or an IAM ServiceID for a specific user. Rates are bytes/second, with -1 meaning no quota."
default = []
}
##############################################################
# Mirroring
##############################################################
variable "mirroring_topic_patterns" {
type = list(string)
description = "The list of the topics to set in instance. Required only if creating mirroring instance."
default = null
}
variable "mirroring" {
description = "Event Streams mirroring configuration. Required only if creating mirroring instance. For more information on mirroring, see https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-mirroring."
type = object({
source_crn = string
source_alias = string
target_alias = string
options = optional(object({
topic_name_transform = object({
type = string
rename = optional(object({
add_prefix = optional(string)
add_suffix = optional(string)
remove_prefix = optional(string)
remove_suffix = optional(string)
}))
})
group_id_transform = object({
type = string
rename = optional(object({
add_prefix = optional(string)
add_suffix = optional(string)
remove_prefix = optional(string)
remove_suffix = optional(string)
}))
})
}))
})
default = null
}