move Michael project dir to project_old

This commit is contained in:
Maximilian_Schlenz 2025-07-14 13:36:55 +02:00
parent 5db4a90b93
commit ea99fca002
4 changed files with 81 additions and 0 deletions

34
project_old/main.tf Normal file
View file

@ -0,0 +1,34 @@
variable "projects" {
type = map(object({
name = string
owner_email = string
}))
default = {
project1 = {
name = "project-alpha"
owner_email = "michael.sodan@stackit.cloud"
}
project2 = {
name = "project-beta"
owner_email = "michael.sodan@stackit.cloud"
}
}
}
resource "stackit_resourcemanager_project" "projects" {
for_each = var.projects
parent_container_id = var.organization_id # Nutzt jetzt die übergebene Variable
name = each.value.name
owner_email = each.value.owner_email
# labels = { ... } # Vorerst entfernt, da stackit_network_area nicht definiert war
}
output "project_info" {
value = {
for k, project in stackit_resourcemanager_project.projects : k => {
project_id = project.project_id
container_id = project.container_id
}
}
}

10
project_old/provider.tf Normal file
View file

@ -0,0 +1,10 @@
terraform {
required_providers {
stackit = {
source = "stackitcloud/stackit"
version = ">= 0.54.0" # Diese Version passt zu Ihrer Anforderung
}
}
}

27
project_old/sna.tf Normal file
View file

@ -0,0 +1,27 @@
/* resource "time_sleep" "wait_before_destroy" {
destroy_duration = "60s"
}
*/
resource "stackit_network_area" "sna" {
organization_id = var.organization_id
name = "bego_sna"
network_ranges = [
{
prefix = "10.220.0.0/16"
}
]
transfer_network = "var.sna_net"
//depends_on = [time_sleep.wait_before_destroy]
}
/* resource "stackit_network_area_route" "sna_route1" {
organization_id = var.organization_id
network_area_id = stackit_network_area.sna.network_area_id
prefix = "10.220.99.0/24"
next_hop = "10.220.0.0"
labels = {
"key" = "value"
}
}
*/

10
project_old/variables.tf Normal file
View file

@ -0,0 +1,10 @@
variable "organization_id" {
description = "Empfängt die Container-ID der Organisation vom Root-Modul."
type = string
}
variable "sna_net" {
description = "SNA Transfer Network"
type = string
}