Skip to content

Commit

Permalink
fix: change subnet_ids output value
Browse files Browse the repository at this point in the history
  • Loading branch information
KoLiBer committed Jul 20, 2022
1 parent 257eb3a commit b4fc9c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ resource "hcloud_network" "this" {
}

resource "hcloud_network_subnet" "this" {
for_each = { for idx, val in var.subnets : idx => val }
count = length(var.subnets)

network_id = hcloud_network.this.id
network_zone = var.zone
ip_range = each.value
ip_range = var.subnets[count.index]
type = "cloud"
}
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output "network_id" {
}

output "subnet_ids" {
value = hcloud_network_subnet.this[*].id
value = { for idx, val in var.subnets : val => hcloud_network_subnet.this[idx].id }
sensitive = true
description = "Network Subnet IDs"
}

0 comments on commit b4fc9c5

Please sign in to comment.