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)}"
|
||||
}
|
||||
|
||||
resource "hcloud_server_network" "network" {
|
||||
for_each = { for row in var.server : row.name => row if contains(keys(row), "network") }
|
||||
resource "hcloud_server_network" "subnets" {
|
||||
for_each = { for row in var.server : row.name => row if contains(keys(row), "subnet") }
|
||||
|
||||
server_id = hcloud_server.server[each.value.name].id
|
||||
network_id = each.value.network
|
||||
ip = each.value.network_ip
|
||||
subnet_id = each.value.subnet
|
||||
ip = each.value.subnet_ip
|
||||
}
|
||||
|
||||
resource "hcloud_rdns" "serverv4" {
|
||||
|
Loading…
Reference in New Issue
Block a user