diff --git a/network.tf b/network.tf index 7048d7c..392daa1 100644 --- a/network.tf +++ b/network.tf @@ -44,6 +44,7 @@ resource "openstack_networking_subnet_v2" "subnets" { dns_publish_fixed_ip = lookup(each.value.subnet, "dns_publish_fixed_ip", false) service_types = lookup(each.value.subnet, "service_types", []) subnetpool_id = lookup(each.value.subnet, "subnetpool_id", null) + prefix_length = lookup(each.value.subnet, "prefix_length", null) no_gateway = lookup(each.value.subnet, "no_gateway", null) tags = lookup(each.value.subnet, "tags", []) diff --git a/variables.tf b/variables.tf index 3f54def..a115cba 100644 --- a/variables.tf +++ b/variables.tf @@ -181,6 +181,7 @@ variable "networks" { dns_publish_fixed_ip = optional(bool, false) service_types = optional(list(string), []) subnetpool_id = optional(string) + prefix_length = optional(number) no_gateway = optional(bool) tags = optional(list(string), []) @@ -374,30 +375,32 @@ output "role_assignments" { # value = {for v in flatten([for rbac in var.network_rbac: [for project in rbac.projects: {rbac=rbac, project=project}]]): "${v.rbac.network}:${v.project}" => v} # } -output "subnet" { +output "subnets" { value = { for k, v in openstack_networking_subnet_v2.subnets : k => { id = v.id gateway_ip = v.gateway_ip + cidr = v.cidr } } } -output "network" { +output "networks" { value = { for k, v in openstack_networking_network_v2.networks : k => { id = v.id + segments = v.segments } } } -output "router" { +output "routers" { value = { for k, v in openstack_networking_router_v2.routers : k => { id = v.id } } -} \ No newline at end of file +}