-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvariables.tf
128 lines (110 loc) · 4.8 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
variable "cluster_name" {
description = "(Required) The name of the Amazon EKS cluster to add the EKS add-on to."
type = string
nullable = false
}
variable "name" {
description = "(Required) The name of the EKS add-on."
type = string
nullable = false
}
variable "addon_version" {
description = "(Optional) The version of the add-on. If not provided, this is configured with default compatibile version for the respective EKS cluster version."
type = string
default = null
nullable = true
}
variable "configuration" {
description = "(Optional) The set of configuration values for the add-on. This JSON string value must match the JSON schema derived from `describe-addon-configuration`."
type = string
default = null
nullable = true
}
variable "service_account_role" {
description = <<EOF
(Optional) The ARN (Amazon Resource Name) of the IAM Role to bind to the add-on's service account. The role must be assigned the IAM permissions required by the add-on. If you don't specify an existing IAM role, then the add-on uses the permissions assigned to the node IAM role.
EOF
type = string
default = null
nullable = true
}
variable "conflict_resolution_strategy_on_create" {
description = <<EOF
(Optional) How to resolve field value conflicts when migrating a self-managed add-on to an EKS add-on. Valid values are `NONE` and `OVERWRITE`. Defaults to `OVERWRITE`.
`NONE` - If the self-managed version of the add-on is installed on the cluster, Amazon EKS doesn't change the value. Creation of the add-on might fail.
`OVERWRITE` - If the self-managed version of the add-on is installed on your cluster and the Amazon EKS default value is different than the existing value, Amazon EKS changes the value to the Amazon EKS default value.
EOF
type = string
default = "OVERWRITE"
nullable = false
validation {
condition = contains(["NONE", "OVERWRITE"], var.conflict_resolution_strategy_on_create)
error_message = "Valid values for `conflict_resolution_strategy_on_create` are `NONE` and `OVERWRITE`."
}
}
variable "conflict_resolution_strategy_on_update" {
description = <<EOF
(Optional) How to resolve field value conflicts for an EKS add-on if you've changed a value from the EKS default value. Valid values are `NONE`, `OVERWRITE` and `PRESERVE`. Defaults to `OVERWRITE`.
`NONE` - Amazon EKS doesn't change the value. The update might fail.
`OVERWRITE` - Amazon EKS overwrites the changed value back to the Amazon EKS default value.
`PRESERVE` - Amazon EKS preserves the value. If you choose this option, we recommend that you test any field and value changes on a non-production cluster before updating the add-on on the production cluster.
EOF
type = string
default = "OVERWRITE"
nullable = false
validation {
condition = contains(["NONE", "OVERWRITE", "PRESERVE"], var.conflict_resolution_strategy_on_update)
error_message = "Valid values for `conflict_resolution_strategy_on_update` are `NONE`, `OVERWRITE` and `PRESERVE`."
}
}
variable "preserve_on_delete" {
description = <<EOF
(Optional) Whether to preserve the created Kubernetes resources on the cluster when deleting the EKS add-on. Defaults to `false`.
EOF
type = bool
default = false
nullable = false
}
variable "timeouts" {
description = "(Optional) How long to wait for the EKS Fargate Profile to be created/updated/deleted."
type = object({
create = optional(string, "20m")
update = optional(string, "20m")
delete = optional(string, "40m")
})
default = {}
nullable = false
}
variable "tags" {
description = "(Optional) A map of tags to add to all resources."
type = map(string)
default = {}
nullable = false
}
variable "module_tags_enabled" {
description = "(Optional) Whether to create AWS Resource Tags for the module informations."
type = bool
default = true
nullable = false
}
###################################################
# Resource Group
###################################################
variable "resource_group_enabled" {
description = "(Optional) Whether to create Resource Group to find and group AWS resources which are created by this module."
type = bool
default = true
nullable = false
}
variable "resource_group_name" {
description = "(Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with `AWS` or `aws`."
type = string
default = ""
nullable = false
}
variable "resource_group_description" {
description = "(Optional) The description of Resource Group."
type = string
default = "Managed by Terraform."
nullable = false
}