79 lines
2 KiB
HCL
79 lines
2 KiB
HCL
terraform {
|
|
required_providers {
|
|
edge-connect = {
|
|
source = "local/edge-connect"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "edge-connect" {
|
|
endpoint = "https://hub.apps.edge.platform.mg3.mdb.osc.live"
|
|
|
|
variable "app_organization" {
|
|
default = "edp2"
|
|
}
|
|
|
|
resource "edge-connect_app" "edge_app_demo" {
|
|
name = "edge-app-demo"
|
|
app_version = "1.0.0"
|
|
organization = var.app_organization
|
|
|
|
manifest = file("${path.module}/k8s-deployment.yaml")
|
|
|
|
region = "EU"
|
|
cloudlet_org = "TelekomOP"
|
|
cloudlet_name = "Munich"
|
|
flavor_name = "EU.small"
|
|
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "edge-connect_app_instance" "edge_app_demo" {
|
|
name = "edge-app-demo-instance"
|
|
organization = var.app_organization
|
|
region = "EU"
|
|
cloudlet_org = "TelekomOP"
|
|
cloudlet_name = "Munich"
|
|
app_name = edge-connect_app.edge_app_demo.name
|
|
app_version = edge-connect_app.edge_app_demo.app_version
|
|
app_organization = edge-connect_app.edge_app_demo.organization
|
|
flavor_name = "EU.small"
|
|
}
|
|
|
|
data "edge-connect_app_instance" "edge_app_demo" {
|
|
region = edge-connect_app_instance.edge_app_demo.region
|
|
}
|
|
|
|
output "app_data_retrieved" {
|
|
description = "Indicates if app instance data was retrieved"
|
|
value = data.edge-connect_app_instance.edge_app_demo
|
|
}
|
|
|
|
output "app_id" {
|
|
description = "ID of the EdgeConnect app"
|
|
value = edge-connect_app.edge_app_demo.id
|
|
}
|
|
|
|
output "app_instance_id" {
|
|
description = "ID of the EdgeConnect app instance"
|
|
value = edge-connect_app_instance.edge_app_demo.id
|
|
}
|
|
|
|
output "app_instance_state" {
|
|
description = "State of the EdgeConnect app instance"
|
|
value = edge-connect_app_instance.edge_app_demo.state
|
|
}
|