1
0
Fork 0

refactor: use standalone hcloud_primary_ip resource for control plane node ip

This commit is contained in:
Vojtěch Mareš 2024-11-23 09:29:55 +01:00
parent a6d00bd4c5
commit f916e715e5
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
2 changed files with 24 additions and 2 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## [0.6.0] - 2024-11-23
### Changed
- Use standalone resource for control plane primary IP
## [0.5.0] - 2024-11-20
### Added

View file

@ -1,5 +1,21 @@
locals {
control_plane_nodes = 1
}
# 58639934
resource "hcloud_primary_ip" "cthulhu_control_plane" {
count = local.control_plane_nodes
name = "control-plane-${count.index}"
type = "ipv4"
assignee_type = "server"
assignee_id = hcloud_server.cthulhu_control_plane[count.index].id
auto_delete = false
delete_protection = true
}
resource "hcloud_server" "cthulhu_control_plane" {
count = 1
count = local.control_plane_nodes
name = "control-plane-${count.index}"
image = "rocky-9"
@ -26,7 +42,7 @@ resource "hcloud_server" "cthulhu_control_plane" {
public_net {
ipv4_enabled = true
ipv6_enabled = true
ipv6_enabled = false
}
network {