refactor: use standalone hcloud_primary_ip resource for control plane node ip
This commit is contained in:
parent
a6d00bd4c5
commit
f916e715e5
2 changed files with 24 additions and 2 deletions
|
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.6.0] - 2024-11-23
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Use standalone resource for control plane primary IP
|
||||||
|
|
||||||
## [0.5.0] - 2024-11-20
|
## [0.5.0] - 2024-11-20
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
20
machines.tf
20
machines.tf
|
|
@ -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" {
|
resource "hcloud_server" "cthulhu_control_plane" {
|
||||||
count = 1
|
count = local.control_plane_nodes
|
||||||
|
|
||||||
name = "control-plane-${count.index}"
|
name = "control-plane-${count.index}"
|
||||||
image = "rocky-9"
|
image = "rocky-9"
|
||||||
|
|
@ -26,7 +42,7 @@ resource "hcloud_server" "cthulhu_control_plane" {
|
||||||
|
|
||||||
public_net {
|
public_net {
|
||||||
ipv4_enabled = true
|
ipv4_enabled = true
|
||||||
ipv6_enabled = true
|
ipv6_enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
|
|
||||||
Reference in a new issue