updated tf strcutrure

This commit is contained in:
Manuel Ganter 2025-11-11 16:12:54 +01:00
parent ff81bf738a
commit 728b27146e
No known key found for this signature in database
3 changed files with 253 additions and 45 deletions

View file

@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer

View file

@ -0,0 +1,47 @@
terraform {
required_providers {
edge-connect = {
source = "local/edge-connect"
}
}
}
provider "edge-connect" {
endpoint = "https://hub.apps.edge.platform.mg3.mdb.osc.live"
}
resource "edge-connect_app" "edge_app_demo" {
name = "edge-app-demo"
app_version = "1"
organization = "edp2-orca"
manifest = file("${path.module}/k8s-deployment.yaml")
infra_template {
region = "US"
cloudlet_org = "TelekomOp"
cloudlet_name = "gardener-shepherd-test"
flavor_name = "default"
network {
outbound_connections {
protocol = "tcp"
port_range_min = 80
port_range_max = 80
remote_cidr = "0.0.0.0/0"
}
outbound_connections {
protocol = "tcp"
port_range_min = 443
port_range_max = 443
remote_cidr = "0.0.0.0/0"
}
}
}
}
output "app_id" {
description = "ID of the EdgeConnect app"
value = edge-connect_app.edge_app_demo.id
}