feat(iaas): add iaas network v2 alpha (#899)

* add experimental network v2
This commit is contained in:
Marcel Jacek 2025-07-07 13:25:54 +02:00 committed by GitHub
parent a00b0466d5
commit d9dc1d4495
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 3777 additions and 923 deletions

View file

@ -1,19 +1,32 @@
variable "project_id" {}
variable "name" {}
variable "ipv4_gateway" {}
variable "ipv4_nameservers" {}
variable "ipv4_nameserver_0" {}
variable "ipv4_nameserver_1" {}
variable "ipv4_prefix" {}
variable "ipv4_prefix_length" {}
variable "routed" {}
variable "label" {}
resource "stackit_network" "network" {
resource "stackit_network" "network_prefix" {
project_id = var.project_id
name = var.name
ipv4_gateway = var.ipv4_gateway != "" ? var.ipv4_gateway : null
no_ipv4_gateway = var.ipv4_gateway != "" ? null : true
ipv4_nameservers = [var.ipv4_nameservers]
ipv4_nameservers = [var.ipv4_nameserver_0, var.ipv4_nameserver_1]
ipv4_prefix = var.ipv4_prefix
routed = var.routed
labels = {
"acc-test" : var.label
}
}
resource "stackit_network" "network_prefix_length" {
project_id = var.project_id
name = var.name
no_ipv4_gateway = true
ipv4_nameservers = [var.ipv4_nameserver_0, var.ipv4_nameserver_1]
ipv4_prefix_length = var.ipv4_prefix_length
routed = var.routed
labels = {

View file

@ -0,0 +1,43 @@
variable "project_id" {}
variable "name" {}
variable "ipv4_gateway" {}
variable "ipv4_nameserver_0" {}
variable "ipv4_nameserver_1" {}
variable "ipv4_prefix" {}
variable "ipv4_prefix_length" {}
variable "routed" {}
variable "label" {}
variable "organization_id" {}
variable "network_area_id" {}
# resource "stackit_network" "network_prefix" {
# project_id = var.project_id
# name = var.name
# # ipv4_gateway = var.ipv4_gateway != "" ? var.ipv4_gateway : null
# # no_ipv4_gateway = var.ipv4_gateway != "" ? null : true
# ipv4_nameservers = [var.ipv4_nameserver_0, var.ipv4_nameserver_1]
# ipv4_prefix = var.ipv4_prefix
# routed = var.routed
# labels = {
# "acc-test" : var.label
# }
# }
resource "stackit_network" "network_prefix_length" {
project_id = var.project_id
name = var.name
# no_ipv4_gateway = true
ipv4_nameservers = [var.ipv4_nameserver_0, var.ipv4_nameserver_1]
ipv4_prefix_length = var.ipv4_prefix_length
routed = var.routed
labels = {
"acc-test" : var.label
}
routing_table_id = stackit_routing_table.routing_table.routing_table_id
}
resource "stackit_routing_table" "routing_table" {
organization_id = var.organization_id
network_area_id = var.network_area_id
name = var.name
}

View file

@ -0,0 +1,7 @@
variable "project_id" {}
variable "name" {}
resource "stackit_network" "network" {
project_id = var.project_id
name = var.name
}