forked from terraform-iaac/terraform-kubernetes-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
44 lines (44 loc) · 1.37 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
variable "app_name" {
type = string
description = "(Required) Application name for attach to service"
}
variable "app_namespace" {
type = string
description = "(Required) Namespace where located application"
}
variable "port_mapping" {
type = list(object({
name = string
external_port = number
internal_port = number
protocol = optional(string, "TCP")
node_port = optional(number, null)
}))
description = "(Required) Mapping ports from container to expose port"
}
variable "type" {
type = string
default = null
description = "(Optional) Default is ClusterIP. Can accept: NodePort , LoadBalancer ."
}
variable "load_balancer_ip" {
type = string
description = "(Optional) !!!Only applies with type = LoadBalancer!!! Define External Static IP address."
default = null
}
variable "load_balancer_ips_whitelist" {
type = list(string)
default = null
description = "(Optional) !!!Only applies with type = LoadBalancer!!! Define IPs cidr range for whitelist in Load Balancer. By default accept all IPs."
}
variable "annotations" {
description = "(Optional) Add annotations"
default = {}
}
locals {
labels = var.custom_labels == null ? { app = var.app_name } : var.custom_labels
}
variable "custom_labels" {
description = "(Optional) Custom labels & selector"
default = null
}