Skip to content

Commit 936b6eb

Browse files
committed
remove drives config. fix lables. update tf moduels
1 parent 368a8ad commit 936b6eb

File tree

3 files changed

+25
-39
lines changed

3 files changed

+25
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Infra for utilizing Hetzner low-cost VPS and Docker containers, wrapped in [Cool
88

99
Before you begin, ensure you have the following:
1010

11-
- [Hetzner Cloud account](https://hetzner.cloud/?ref=Ix9xCKNxJriM)
11+
- [Hetzner Cloud account](https://hetzner.cloud/?ref=Ix9xCKNxJriM) (20$ free credits)
1212
- [Terraform](https://www.terraform.io/downloads.html)
1313
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
1414

coolify_hetzner_infra/main.tf

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
11
module "cluster" {
2-
source = "github.com/Ujstor/terraform-hetzner-modules//modules/cluster?ref=v0.0.3"
2+
source = "github.com/Ujstor/terraform-hetzner-modules//modules/cluster?ref=v0.0.8"
33

44
ssh_key_name = "coolify_cluster_prod_key"
55
ssh_key_path = ".ssh" # create dir in root where terraform is executed
66

77
server_config = {
88
controller = {
9-
location = "fsn1"
10-
server_type = "cx22"
11-
labels = "controller"
9+
location = "fsn1"
10+
server_type = "cx22"
11+
labels = {
12+
controller = "true"
13+
}
1214
ipv4_enabled = true
1315
ipv6_enabled = false
1416
subnet_id = module.network_config.subnet_id.subnet-1.subnet_id
1517
subnet_ip = "10.0.1.1"
1618
}
1719
worker-1 = {
18-
location = "nbg1"
19-
server_type = "cx22"
20-
labels = "worker"
20+
location = "nbg1"
21+
server_type = "cx22"
22+
labels = {
23+
worker = "true"
24+
}
2125
ipv4_enabled = true
2226
ipv6_enabled = false
2327
subnet_id = module.network_config.subnet_id.subnet-2.subnet_id
2428
subnet_ip = "10.0.2.1"
2529
}
2630
worker-2 = {
27-
location = "hel1"
28-
server_type = "cx22"
29-
labels = "worker"
31+
location = "hel1"
32+
server_type = "cx22"
33+
labels = {
34+
worker = "true"
35+
}
3036
ipv4_enabled = true
3137
ipv6_enabled = false
3238
subnet_id = module.network_config.subnet_id.subnet-2.subnet_id
3339
subnet_ip = "10.0.2.2"
3440
}
3541
worker-3 = {
36-
location = "hel1"
37-
server_type = "cx22"
38-
labels = "worker"
42+
location = "hel1"
43+
server_type = "cx22"
44+
labels = {
45+
worker = "true"
46+
}
3947
ipv4_enabled = true
4048
ipv6_enabled = false
4149
subnet_id = module.network_config.subnet_id.subnet-2.subnet_id
@@ -99,7 +107,7 @@ module "cluster" {
99107
}
100108

101109
module "cloudflare_record" {
102-
source = "github.com/Ujstor/terraform-hetzner-modules//modules/network/cloudflare_record?ref=v0.0.3"
110+
source = "github.com/Ujstor/terraform-hetzner-modules//modules/network/cloudflare_record?ref=v0.0.8"
103111

104112
cloudflare_record = {
105113
controller = {
@@ -161,30 +169,8 @@ module "cloudflare_record" {
161169
}
162170
}
163171

164-
module "volumes" {
165-
source = "github.com/Ujstor/terraform-hetzner-modules//modules/volumes?ref=v0.0.3"
166-
167-
volume_config = {
168-
volume-1 = {
169-
size = 100
170-
location = module.cluster.server_status.worker-1.location
171-
server_id = module.cluster.server_status.worker-1.id
172-
}
173-
volume-2 = {
174-
size = 100
175-
location = module.cluster.server_status.worker-2.location
176-
server_id = module.cluster.server_status.worker-2.id
177-
}
178-
volume-3 = {
179-
size = 100
180-
location = module.cluster.server_status.worker-3.location
181-
server_id = module.cluster.server_status.worker-3.id
182-
}
183-
}
184-
}
185-
186172
module "network_config" {
187-
source = "github.com/Ujstor/terraform-hetzner-modules//modules/network/vpc_subnet?ref=v0.0.3"
173+
source = "github.com/Ujstor/terraform-hetzner-modules//modules/network/vpc_subnet?ref=v0.0.8"
188174

189175
vpc_config = {
190176
vpc_name = "coolify"

global/s3_ssh_keys_backup/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_s3_object" "prod_ssh_dir" {
3232

3333
bucket = aws_s3_bucket.ssh_keys_backup.id
3434
key = "prod/${each.value}"
35-
source = "../../prod/.ssh/${each.value}"
35+
source = "../../coolify_hetzner_infra/.ssh/${each.value}"
3636
etag = filemd5("../../coolify_hetzner_infra/.ssh/${each.value}")
3737
}
3838

0 commit comments

Comments
 (0)