fix: use subnet_id for hcloud server network resource
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
96ca43bf01
commit
197c2359c1
8
main.tf
8
main.tf
@ -74,12 +74,12 @@ resource "hcloud_ssh_key" "key" {
|
|||||||
public_key = "${element(split(" ", each.value), 0)} ${element(split(" ", each.value), 1)}"
|
public_key = "${element(split(" ", each.value), 0)} ${element(split(" ", each.value), 1)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hcloud_server_network" "network" {
|
resource "hcloud_server_network" "subnets" {
|
||||||
for_each = { for row in var.server : row.name => row if contains(keys(row), "network") }
|
for_each = { for row in var.server : row.name => row if contains(keys(row), "subnet") }
|
||||||
|
|
||||||
server_id = hcloud_server.server[each.value.name].id
|
server_id = hcloud_server.server[each.value.name].id
|
||||||
network_id = each.value.network
|
subnet_id = each.value.subnet
|
||||||
ip = each.value.network_ip
|
ip = each.value.subnet_ip
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "hcloud_rdns" "serverv4" {
|
resource "hcloud_rdns" "serverv4" {
|
||||||
|
Loading…
Reference in New Issue
Block a user