feat: networking
This commit is contained in:
22
terraform/compute.tf
Normal file
22
terraform/compute.tf
Normal file
@@ -0,0 +1,22 @@
|
||||
// Add the servers to a placement group.
|
||||
resource "hcloud_placement_group" "group" {
|
||||
name = "Cluster Group"
|
||||
type = "spread"
|
||||
}
|
||||
|
||||
// Secure NAT via SSH key.
|
||||
resource "hcloud_ssh_key" "main" {
|
||||
name = "my-ssh-key"
|
||||
public_key = file(var.public_key_file)
|
||||
}
|
||||
|
||||
// The Jumphost/NAT, to interact and provide internet access to the cluster.
|
||||
resource "hcloud_server" "nat" {
|
||||
name = "Cluster NAT"
|
||||
image = "debian-12"
|
||||
server_type = "cx23"
|
||||
placement_group_id = hcloud_placement_group.group.id
|
||||
ssh_keys = [hcloud_ssh_key.main.id]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user