Skip to content

Commit

Permalink
DBP-919 create output vars for ansible tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Schiborr committed Oct 1, 2024
1 parent 79d816d commit 9d563ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/ionos-nlb-for-servicecenter/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
locals {
parts_of_node_ip = split(".", var.node_nlb_lan_ips[0])
# shorten ip from <num>.<num>.<num>.<num> to <num>.<num>.<num>
node_ip_part = join(".", slice(local.parts_of_node_ip, 0, length(local.parts_of_node_ip) - 1))
cluster_node_ip_range = "${local.node_ip_part}.0/23"
}
7 changes: 7 additions & 0 deletions modules/ionos-nlb-for-servicecenter/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
output "cluster_node_ip_range" {
value = local.cluster_node_ip_range
}

output "service_cluster_node_ips" {
value = var.node_nlb_lan_ips
}

0 comments on commit 9d563ba

Please sign in to comment.