forked from sergelogvinov/terraform-talos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
126 lines (113 loc) · 3.38 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
variable "controlplane_role_definition" {
default = ["kubernetes-ccm", "kubernetes-csi", "kubernetes-node-autoscaler"]
}
variable "gallery_name" {
default = ""
}
data "terraform_remote_state" "prepare" {
backend = "local"
config = {
path = "${path.module}/prepare/terraform.tfstate"
}
}
locals {
subscription_id = data.terraform_remote_state.prepare.outputs.subscription
regions = data.terraform_remote_state.prepare.outputs.regions
resource_group = data.terraform_remote_state.prepare.outputs.resource_group
network = data.terraform_remote_state.prepare.outputs.network
network_controlplane = data.terraform_remote_state.prepare.outputs.network_controlplane
network_public = data.terraform_remote_state.prepare.outputs.network_public
network_private = data.terraform_remote_state.prepare.outputs.network_private
network_secgroup = data.terraform_remote_state.prepare.outputs.secgroups
}
variable "arch" {
description = "The Talos architecture list"
type = list(string)
default = ["x64", "Arm64"]
}
variable "tags" {
description = "Tags of resources"
type = map(string)
default = {
environment = "Develop"
}
}
variable "controlplane" {
description = "Controlplane config"
type = map(any)
default = {
"all" = {
repository = "registry.k8s.io"
version = "v1.27.3"
}
"uksouth" = {
count = 0,
type = "Standard_B2ms",
},
"ukwest" = {
count = 0,
type = "Standard_B2ms",
},
}
}
variable "kubernetes" {
type = map(string)
default = {
podSubnets = "10.32.0.0/12,fd40:10:32::/102"
serviceSubnets = "10.200.0.0/22,fd40:10:200::/112"
domain = "cluster.local"
apiDomain = "api.cluster.local"
clusterName = "talos-k8s-azure"
clusterID = ""
clusterSecret = ""
tokenMachine = ""
caMachine = ""
token = ""
ca = ""
}
sensitive = true
}
variable "acr" {
type = map(string)
default = {
acrRepo = ""
acrUsername = ""
acrPassword = ""
}
}
variable "zones" {
description = "The Azure zones"
type = list(string)
default = ["1", "3"]
}
variable "ssh_public_key" {
description = "The SSH-RSA public key, ssh-keygen -t rsa -b 2048 -f ~/.ssh/terraform -C 'terraform'"
type = string
default = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBx2qCSLlZ03TYqHm88pXZPyqZ3fvR1p2jWvsLt3uX+mBMr6B8S4vkX3oEBv43IEgi1bkIrdjJ50QvXNWS6fSOo6G0wZ0FHRCan3t4Kq2U+qoWkDsb5K0Kdgd9DZuaNM9412J2dWldYK7iD3hhQ3wh/E1gPlqrYb2AsPAarK+VA59n63QCDrpmGCW/Pki69e8Mt7HH/A1uw+4wvlrtaytrx6C3Y3/mQfBoas4XJliWHeTgEKeVdIzlOf9XrDnZ85pmvmQbFAtRtaRlfwCHMksVEwunYbg1RPrvQ8/YsSv6sFHwwvqjrJ7hdJcaa3afS3rUyAy7vkO0OXm4KdOEgE8X terraform"
}
variable "instances" {
description = "Map of region's properties"
type = map(any)
default = {
"all" = {
repository = "registry.k8s.io"
version = "v1.27.3"
}
"uksouth" = {
web_count = 0,
web_type = "Standard_B2s",
worker_count = 0,
worker_type = "Standard_B4ms", # B4ms E2as_v4
db_count = 0,
db_type = "Standard_B4ms",
},
"ukwest" = {
web_count = 0,
web_type = "Standard_B2s",
worker_count = 0,
worker_type = "Standard_B4ms", # B4ms E2as_v4
db_count = 0,
db_type = "Standard_B4ms",
},
}
}