Add tag to network and subnet

This commit is contained in:
2023-11-16 14:22:27 +01:00
parent c5965ad7ab
commit 41812acd69
2 changed files with 9 additions and 2 deletions
+6
View File
@@ -10,6 +10,9 @@ resource "hcloud_network" "kubernetes-network" {
name = "kubernetes"
ip_range = "10.0.0.0/8"
delete_protection = true
labels = {
"kubernetes.io/cluster/${local.test_cluster}" : "shared"
}
}
resource "hcloud_network_subnet" "k8s-network-subnet" {
@@ -17,6 +20,9 @@ resource "hcloud_network_subnet" "k8s-network-subnet" {
network_id = hcloud_network.kubernetes-network.id
network_zone = "eu-central"
ip_range = "10.0.0.0/16"
labels = {
"kubernetes.io/cluster/${local.test_cluster}" : "shared"
}
}
resource "hcloud_firewall" "basic-firewall" {
+3 -2
View File
@@ -19,7 +19,8 @@ data "hcloud_ssh_key" "macos" {
}
locals {
domain = "2martens.de"
domain = "2martens.de"
test_cluster = "test"
}
module "test_cluster" {
@@ -51,7 +52,7 @@ module "test_cluster" {
cidrhost(hcloud_network_subnet.k8s-network-subnet.ip_range, 6)
]
server_subnet_id = hcloud_network_subnet.k8s-network-subnet.id
cluster_name = "test"
cluster_name = local.test_cluster
argocd_environment = "test"
number_nodes = 1
server_type = "cax21"