2022-12-16 17:42:21 +00:00
|
|
|
resource "hcloud_network" "kube-network" {
|
|
|
|
name = "kube-network"
|
2022-12-17 00:24:27 +00:00
|
|
|
ip_range = "10.0.0.0/8"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "hcloud_network_subnet" "kube-subnet" {
|
|
|
|
network_id = hcloud_network.kube-network.id
|
|
|
|
type = "cloud"
|
|
|
|
network_zone = "eu-central"
|
2022-12-16 17:42:21 +00:00
|
|
|
ip_range = "10.0.1.0/24"
|
|
|
|
}
|
2022-12-17 00:24:27 +00:00
|
|
|
|
|
|
|
# resource "hcloud_server" "server" {
|
|
|
|
# name = "control-plane"
|
|
|
|
# server_type = "cx21"
|
|
|
|
# image = "ubuntu-22.04"
|
|
|
|
# location = "nbg1"
|
|
|
|
|
|
|
|
# network {
|
|
|
|
# network_id = hcloud_network.kube-network.id
|
|
|
|
# ip = "10.0.1.1"
|
|
|
|
# }
|
|
|
|
|
|
|
|
# depends_on = [
|
|
|
|
# hcloud_network_subnet.kube-subnet
|
|
|
|
# ]
|
|
|
|
|
|
|
|
# user_data = templatefile("${path.module}/templates/cloud-init-tailscale.tpl", {
|
|
|
|
# tailscale_key = var.tailscale_key
|
|
|
|
# })
|
|
|
|
# }
|