-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.tf
147 lines (127 loc) · 3.65 KB
/
vars.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
variable "sel_user_name" {
type = string
description = "Name of user for access to Selectel VPC project"
}
variable "sel_user_password" {
type = string
description = "Password of user for access to Selectel VPC project"
}
variable "sel_api_key" {
type = string
description = "Selectel API key. Can be create: https://my.selectel.ru/profile/apikeys"
}
variable "sel_project_name" {
type = string
default = "sreway"
description = "Selectel VPC project name"
}
variable "sel_project_id" {
type = string
description = "Selectel VPC project ID"
}
variable "sel_account_id" {
type = string
description = "Selectel account id. (contract number)"
}
variable "sel_auth_url" {
type = string
default = "https://api.selvpc.ru/identity/v3"
description = "Auth url of Selectel VPC API."
}
variable "sel_region_name" {
type = string
default = "ru-7"
description = "Name of region for Selectel VPC resources"
}
variable "sel_ssh_key_name" {
type = string
default = "ci"
description = "The name of the SSH key pair to put on the compute instance. The key pair must already be created in some region and associated with Selectel vpc project"
}
variable "networks" {
type = map(object({
name = string
subnet_cidr = string
router_name = string
dns_nameservers = list(string)
tags = list(string)
}))
default = {
"wireguard-net" = {
name = "wireguard-net"
subnet_cidr = "192.168.1.0/24"
router_name = "wireguard-router"
enable_dhcp = false
dns_nameservers = ["188.93.16.19", "188.93.17.19"]
tags = ["wireguard_net"]
}
}
description = "Hash map of Virtual Private Cloud network settings that should be created"
}
variable "instances" {
type = map(object({
name = string
vcpus = number
ram = number
disk = number
image = string
zone = string
network_name = string
remote_volumes = map(object({
name = string
size = number
type = string
zone = string
}))
create_floating_ip = bool
tags = list(string)
}))
default = {
"wireguard" = {
disk = 40
image = "Ubuntu 22.04 LTS 64-bit"
name = "wireguard"
ram = 4096
vcpus = 2
zone = "ru-7a"
network_name = "wireguard-net"
remote_volumes = {}
create_floating_ip = true
tags = ["wireguard", "bastion", "docker", "primary", "preemptible"]
},
}
description = "Hash map of instances setting that should be created"
}
variable "dns_records" {
type = map(object({
name = string
domain = string
type = string
ttl = number
link_instance_name = string
}))
default = {
"wireguard" = {
name = "wireguard.sreway.ru"
domain = "sreway.ru"
type = "A"
ttl = 200
link_instance_name = "wireguard"
},
}
description = "Hash map of settings dns records that should be created"
}
variable "ssh_user_admin" {
type = string
default = "is"
description = "SSH username administrator on compute nodes (sudoers)"
}
variable "ssh_user_ci" {
type = string
default = "ci"
description = "SSH unprivileged username on compute nodes (not sudoers)"
}
variable "ssh_public_key" {
type = string
description = "SSH public key on compute nodes"
}