-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvariables.tf
More file actions
122 lines (107 loc) · 3.41 KB
/
variables.tf
File metadata and controls
122 lines (107 loc) · 3.41 KB
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
variable "ibmcloud_api_key" {
description = "APIkey that's associated with the account to provision resources to"
type = string
sensitive = true
}
variable "resource_group" {
type = string
description = "An existing resource group name to use for this example, if unset a new resource group will be created"
default = null
}
variable "region" {
description = "The region to which to deploy all resources created by this example"
type = string
default = "us-south"
}
variable "prefix" {
description = "The prefix that you would like to append to your resources"
type = string
default = "slz-fs-vsi"
}
variable "resource_tags" {
description = "List of tags to apply to resources created by this module."
type = list(string)
default = []
}
variable "machine_type" {
description = "VSI machine type. Run 'ibmcloud is instance-profiles' to get a list of regional profiles"
type = string
default = "cx2-2x4"
}
variable "create_security_group" {
description = "Create security group for VSI"
type = bool
default = false
}
variable "security_group" {
description = "Security group created for VSI"
type = object({
name = string
rules = list(
object({
name = string
direction = string
source = string
tcp = optional(
object({
port_max = number
port_min = number
})
)
udp = optional(
object({
port_max = number
port_min = number
})
)
icmp = optional(
object({
type = number
code = number
})
)
})
)
})
default = null
}
variable "user_data" {
description = "User data to initialize VSI deployment"
type = string
default = null
}
variable "vsi_per_subnet" {
description = "Number of VSI instances for each subnet"
type = number
default = 1
}
variable "ssh_key" {
type = string
description = "An existing ssh key name to use for this example, if unset a new ssh key will be created"
default = null
}
variable "vpc_name" {
type = string
description = "Name for VPC"
default = "vpc"
}
variable "boot_volume_encryption_key" {
description = "CRN of boot volume encryption key"
type = string
}
variable "skip_iam_authorization_policy" {
type = bool
description = "Set to true to skip the creation of an IAM authorization policy that permits all Storage Blocks to read the encryption key from the KMS instance. If set to false, pass in a value for the boot volume encryption key in the `boot_volume_encryption_key` variable. In addition, no policy is created if var.kms_encryption_enabled is set to false."
default = false
}
variable "access_tags" {
type = list(string)
description = "A list of access tags to apply to the VSI resources created by the module. For more information, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial."
default = []
validation {
condition = alltrue([
for tag in var.access_tags : can(regex("[\\w\\-_\\.]+:[\\w\\-_\\.]+", tag)) && length(tag) <= 128
])
error_message = "Tags must match the regular expression \"[\\w\\-_\\.]+:[\\w\\-_\\.]+\". For more information, see https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limits."
}
}