Ugrás a fő tartalomhoz

Sovereign Cloud on STACKIT

Basic Advanced

Service: Sovereign Cloud on STACKIT · Typical shape: landing zone in 2-4 weeks, then workload delivery or migration waves (T&M); often follows a Cloud or Migration Assessment

STACKIT is the cloud of Schwarz Digits (Schwarz Group, Germany), operated from data centres in Germany and Austria. We use it when data residency, EU jurisdiction, and auditable operator control are hard requirements: public sector, healthcare, finance, critical infrastructure. This page is the engineering playbook: what to build, how to build it in Terraform/OpenTofu, and how to evidence sovereignty.

What we deliver​

  • STACKIT organization structure (folders, projects, labels, billing references) as code.
  • IAM: role assignments, CI service accounts with workload identity federation (no static keys).
  • Network: network areas, project networks, security groups, VPN to on-prem.
  • Platform: SKE (Kubernetes) clusters, PostgreSQL Flex, Object Storage, Secrets Manager, KMS, Observability.
  • Backup and restore tested for every stateful service.
  • A sovereignty evidence pack: residency, key management, operator access, provider attestations, mapped to the customer's controls.

STACKIT service map​

Catalogue as reflected in the official Terraform provider v0.120.0 and STACKIT docs (as of 2026-10):

DomainServicesTerraform resources (examples)
ComputeCompute Engine (VMs, GPU), images, key pairs, affinity groups, server backup and update schedulingstackit_server, stackit_volume, stackit_server_backup_schedule
ContainersSKE (Kubernetes Engine, Flatcar nodes by default), Edge Cloud, Cloud Foundrystackit_ske_cluster, stackit_ske_kubeconfig
DatabasesPostgreSQL Flex, MongoDB Flex, SQL Server Flex, MariaDB, Redis, Valkey, OpenSearch, RabbitMQstackit_postgresflex_instance, stackit_mongodbflex_instance
StorageObject Storage (S3-compatible, object lock), Block Storage, File Storage (SFS)stackit_objectstorage_bucket, stackit_sfs_share
NetworkNetworks, network areas (SNA), routing tables, security groups, public IPs, Load Balancer, Application Load Balancer + WAF, VPN, DNS, CDNstackit_network_area, stackit_network, stackit_vpn_gateway
SecuritySecrets Manager (Vault-compatible), KMS, service accounts and federationstackit_secretsmanager_instance, stackit_kms_key
ObservabilityObservability (managed Grafana, metrics, logs, traces), Logs, Telemetry Routerstackit_observability_instance, stackit_logs_instance
Data and AIAI Model Serving (OpenAI-compatible API), AI Model Experiments (MLflow), Dremio, Intakestackit_modelserving_token, stackit_dremio_instance
DeveloperSTACKIT Gitstackit_git

Regions: eu01 (Germany) and eu02 (Austria); each region has at least three physically separate availability zones with approximately 0.5 ms latency between them (examples use eu01-1 to eu01-3; confirm the names on the regions page), plus a Metro AZ (eu01-m) for synchronously replicated services such as Compute Engine and Block Storage. STACKIT may launch new features in one region first, so check availability per service before committing a design to eu02. Check per-service availability in the Regions docs.

Reference architecture​

Account, organization, and project structure​

STACKIT's Resource Manager hierarchy is customer account → organization → folders (optional, one level only) → projects → resources. The project is the boundary for quota, billing reference, and IAM context; every resource lives in exactly one project.

Pattern (from STACKIT guidance)Use for
Org → Folder (environment) → Project (application)Our default for customer platforms with dev/staging/prod
Org → Folder (team) → Project (service)Large enterprises delegating IAM and budget per team
Org → ProjectPoCs and small single-app setups

Conventions we apply: project names <app>-<env>, labels env, owner, cost-center, data-class, and a billingReference label on every project for chargeback.

Implementation steps​

1. Bootstrap​

  1. Customer creates the organization (comes with the customer account) and a bootstrap service account with owner rights on a dedicated platform-iac project.
  2. Create the state bucket and credentials. STACKIT Object Storage works as an S3 backend, but its lock behaviour is unconfirmed, so do not rely on use_lockfile — use the PostgreSQL backend (on a PostgreSQL Flex instance) when several pipelines can apply concurrently, or serialise applies in CI.
backend.tf
terraform {
required_providers {
stackit = { source = "stackitcloud/stackit", version = "~> 0.120" }
}
backend "s3" {
bucket = "acme-tfstate"
key = "platform/landing-zone.tfstate"
region = "eu01"
endpoints = { s3 = "https://object.storage.eu01.onstackit.cloud" }
skip_credentials_validation = true
skip_region_validation = true
skip_s3_checksum = true
skip_requesting_account_id = true
}
}

Pass AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY for the bucket credentials via CI secrets, never in the file.

2. IAM and service accounts​

Role bindings exist on organization, folder, and project. Service accounts belong to a project. For CI, use workload identity federation: the provider exchanges the CI's short-lived OIDC token for a STACKIT token, so no long-lived key exists.

iam.tf
provider "stackit" {
default_region = "eu01"
experiments = ["iam"] # role-assignment resources are behind the iam experiment
}

resource "stackit_service_account" "ci" {
project_id = var.platform_project_id
name = "ci-deployer"
}

resource "stackit_service_account_federated_identity_provider" "gitlab" {
project_id = stackit_service_account.ci.project_id
service_account_email = stackit_service_account.ci.email
name = "gitlab-main"
issuer = "https://gitlab.example.com"
assertions = [
{ item = "aud", operator = "equals", value = "sts.accounts.stackit.cloud" },
{ item = "sub", operator = "equals", value = "project_path:platform/infra:ref_type:branch:ref:main" },
]
}

resource "stackit_authorization_project_role_assignment" "ci_app_prod" {
resource_id = stackit_resourcemanager_project.app["prod"].project_id
role = "editor"
subject = stackit_service_account.ci.email
}

resource "stackit_authorization_project_role_assignment" "auditors" {
resource_id = stackit_resourcemanager_project.app["prod"].project_id
role = "reader"
subject = "security-audit@acme.example"
}
provider in CI
provider "stackit" {
default_region = "eu01"
use_oidc = true
service_account_email = var.ci_service_account_email
}

The iam experiment is marked unstable by the provider maintainers; pin the provider version and review the changelog on every bump. List assignable roles with stackit curl against the Authorization API path /v2/{resourceType}/{resourceId}/roles:

stackit curl "https://authorization.api.stackit.cloud/v2/{resourceType}/{resourceId}/roles"

Where key flow is unavoidable, create keys with stackit_service_account_key and force rotation with time_rotating.

3. Landing zone in Terraform​

landing-zone.tf
locals {
envs = toset(["dev", "prod"])
}

resource "stackit_resourcemanager_folder" "env" {
for_each = local.envs
name = each.key
owner_email = var.platform_owner_email
parent_container_id = var.organization_id
}

resource "stackit_resourcemanager_project" "app" {
for_each = local.envs
name = "billing-${each.key}"
owner_email = var.platform_owner_email
parent_container_id = stackit_resourcemanager_folder.env[each.key].container_id
labels = {
env = each.key
owner = "team-billing"
billingReference = "CC-4711"
networkArea = stackit_network_area.main.network_area_id
}
}

resource "stackit_network_area" "main" {
organization_id = var.organization_id
name = "acme-sna"
}

resource "stackit_network_area_region" "eu01" {
organization_id = var.organization_id
network_area_id = stackit_network_area.main.network_area_id
ipv4 = {
transfer_network = "10.255.0.0/24"
network_ranges = [{ prefix = "10.20.0.0/16" }]
}
}

The networkArea label attaches a project to the network area, as shown in the provider's project example. The network-range settings live on stackit_network_area_region, not on stackit_network_area.

4. Networking​

network.tf
resource "stackit_network" "app" {
project_id = stackit_resourcemanager_project.app["prod"].project_id
name = "app-net"
ipv4_prefix = "10.20.10.0/24"
routed = true
}

resource "stackit_security_group" "web" {
project_id = stackit_resourcemanager_project.app["prod"].project_id
name = "web"
}

resource "stackit_security_group_rule" "https_in" {
project_id = stackit_resourcemanager_project.app["prod"].project_id
security_group_id = stackit_security_group.web.security_group_id
direction = "ingress"
ip_range = "0.0.0.0/0"
protocol = { name = "tcp" }
port_range = { min = 443, max = 443 }
}
  • Hub-and-spoke: shared services (VPN gateway, DNS forwarders, bastion) in shared-prod, workloads in their own projects, all in one SNA.
  • Hybrid: stackit_vpn_gateway + stackit_vpn_connection to on-prem; see Hybrid Cloud & OpenStack for the on-prem side.
  • Managed services (PostgreSQL Flex, Secrets Manager, Observability) are reachable via ACLs on public endpoints by default. Restrict ACLs to the SKE egress ranges (stackit_ske_cluster.*.egress_address_ranges) and the VPN range; SNA-only access scopes (access_scope = "SNA") appear in the provider schema for SKE, PostgreSQL Flex, and KMS; confirm with STACKIT which are generally available before designing for private-only endpoints.

5. SKE cluster​

ske.tf
data "stackit_ske_kubernetes_versions" "supported" {
version_state = "SUPPORTED"
}

resource "stackit_ske_cluster" "prod" {
project_id = stackit_resourcemanager_project.app["prod"].project_id
name = "prod"
kubernetes_version_min = var.kubernetes_version_min # pick from the data source; review on bumps

node_pools = [{
name = "general"
machine_type = "g2i.4"
os_name = "flatcar"
minimum = 3
maximum = 9
max_surge = 3
availability_zones = ["eu01-1", "eu01-2", "eu01-3"]
volume_type = "storage_premium_perf6"
volume_size = 50
}]

maintenance = {
enable_kubernetes_version_updates = true
enable_machine_image_version_updates = true
start = "01:00:00Z"
end = "03:00:00Z"
}

extensions = {
acl = { enabled = true, allowed_cidrs = var.admin_cidrs }
observability = { enabled = true, instance_id = stackit_observability_instance.main.instance_id }
dns = { enabled = true, zones = ["prod.acme.runs.onstackit.cloud"] }
}
}

resource "stackit_ske_kubeconfig" "prod" {
project_id = stackit_ske_cluster.prod.project_id
cluster_name = stackit_ske_cluster.prod.name
refresh = true
expiration = 7200
refresh_before = 3600
}

Notes:

  • max_surge (or max_unavailable) must be at least the number of AZs in the pool when set.
  • The argus extension is deprecated (provider docs: removed 2026-01-06); use observability.
  • For non-prod, add hibernations = [{ start = "0 19 * * 1-5", end = "0 7 * * 1-5", timezone = "Europe/Berlin" }] to stop nodes overnight.
  • Engineers use short-lived credentials: stackit ske kubeconfig create prod --login (or --idp for IdP-backed access) instead of long-lived admin kubeconfigs.
  • Encrypt node volumes with KMS following the provider guide "Setting up encrypted volumes for SKE".

CLI equivalent for quick experiments:

stackit config set --project-id "$PROJECT_ID"
stackit ske cluster generate-payload > payload.json # edit node pools, AZs, maintenance
stackit ske cluster create poc --payload @./payload.json
stackit ske kubeconfig create poc --login

6. Data services, secrets, and keys​

data.tf
resource "stackit_kms_keyring" "app" {
project_id = local.prod_project_id
display_name = "billing-prod"
}

resource "stackit_kms_key" "data" {
project_id = local.prod_project_id
keyring_id = stackit_kms_keyring.app.keyring_id
display_name = "data-kek"
protection = "software"
algorithm = "aes_256_gcm"
purpose = "symmetric_encrypt_decrypt"
}

resource "stackit_postgresflex_instance" "main" {
project_id = local.prod_project_id
name = "billing-db"
version = "17"
flavor_id = var.pg_flavor_id # a "-replica" flavor for 3-node HA; list via data.stackit_postgresflex_flavors
storage = { class = "premium-perf2-stackit", size = 100 }
backup_schedule = "0 2 * * *"
retention_days = 35
network = { acl = stackit_ske_cluster.prod.egress_address_ranges }
encryption = {
kek_keyring_id = stackit_kms_keyring.app.keyring_id
kek_key_id = stackit_kms_key.data.key_id
kek_key_version = "1"
service_account = var.kms_service_account_email
}
}

resource "stackit_secretsmanager_instance" "main" {
project_id = local.prod_project_id
name = "billing-secrets"
acls = stackit_ske_cluster.prod.egress_address_ranges
}

resource "stackit_objectstorage_compliance_lock" "prod" {
project_id = local.prod_project_id
}

resource "stackit_objectstorage_bucket" "archive" {
depends_on = [stackit_objectstorage_compliance_lock.prod]
project_id = local.prod_project_id
name = "billing-archive-prod"
object_lock = true
}

resource "stackit_objectstorage_default_retention" "archive" {
project_id = local.prod_project_id
bucket_name = stackit_objectstorage_bucket.archive.name
days = 365
mode = "GOVERNANCE"
}
  • PostgreSQL Flex retention_days accepts 32-90; network and retention_days become required after February 2027 — set them now.
  • Customer-managed encryption needs a service account with KMS rights that the data service may act as; grant it through a role assignment, following the provider's authorization examples.
  • Secrets Manager: the provider manages instances, ACLs, and an optional kms_key block for KMS-backed encryption. The provider docs do not expose the API endpoint, so take it from the portal or STACKIT docs, confirm the Vault-compatible interface with STACKIT, and then read secrets in-cluster via External Secrets Operator.
  • Validate the mode value (the provider example uses GOVERNANCE) and the retention period with the customer's records-retention owner before applying.

7. Observability​

observability.tf
resource "stackit_observability_instance" "main" {
project_id = local.shared_project_id
name = "platform-obs"
plan_name = var.observability_plan # e.g. an "Observability-...-EU01" plan
acl = concat(stackit_ske_cluster.prod.egress_address_ranges, var.admin_cidrs)
metrics_retention_days = 90
metrics_retention_days_5m_downsampling = 60
metrics_retention_days_1h_downsampling = 30
logs_retention_days = 30
traces_retention_days = 14
}
  • SKE's observability extension ships cluster metrics to this instance; add stackit_observability_scrapeconfig for app endpoints and stackit_observability_alertgroup / stackit_observability_logalertgroup for alert rules as code (provider guides cover kube-state-metrics and log alerts).
  • Store the Grafana admin password (grafana_initial_admin_password) in Secrets Manager, then switch Grafana to SSO.
  • Ship platform audit events (portal/API actions) to the same Grafana; confirm the audit-log source and dashboard availability with STACKIT.

8. Backup and restore​

AssetMechanismRestore test
VMsstackit_server_backup_enable + stackit_server_backup_schedule (RRULE, retention days)Restore to a new server monthly
PostgreSQL FlexBuilt-in backup_schedule, 32-90 day retention, point-in-time restoreClone to a scratch instance per release
Kubernetes stateVelero to a dedicated Object Storage bucket (S3 API)Restore a namespace into a test cluster
Object StorageObject lock + default retention; replicate critical buckets to eu02 with rclone or app-level copySpot-check object versions
IaC stateVersioned bucket, nightly copy to a second projectPlan against restored state

9. Compliance evidence​

STACKIT publishes its certificates and attestations (as of 2026-10):

EvidenceScope summary
BSI C5 Type 2 (with ISAE 3000 / SOC 2 and ISAE 3402 reports)21 products incl. Compute Engine, SKE, PostgreSQL Flex, MongoDB Flex, SQL Server Flex, Block/Object/File Storage, Observability, Secrets Manager, Load Balancer, AI Model Serving, Backup
ISO/IEC 27001, 27017, 27018ISMS, cloud security, PII protection in cloud
ISO 27001 on the basis of BSI IT-GrundschutzCompute Engine, Network & Security, Block Storage, Object Storage and related operations
TISAX Level 3, ISO 22301, ISO 50001Information security (automotive), business continuity, energy, data centre

C5 is an audit attestation, not a certificate with a seal: request the current C5 report under NDA and check that every service in the design is in its scope. Services outside the list (e.g. Dremio, Edge Cloud) need a documented risk acceptance or an alternative. In German healthcare, C5 Type 2 is required for cloud processing of health data under §393 SGB V since July 2025 (BVMed). In April 2026 The Register reported the European Commission's sovereign cloud tender results, naming four awarded providers; the article does not state a SEAL level for STACKIT, so check the tender results under the Cloud Sovereignty Framework before quoting one.

Our evidence pack maps each customer control (ISO 27001 Annex A, NIS2 measures, BSI Grundschutz modules) to: provider attestation section, our Terraform resource, and a check (Checkov custom policy, Steampipe query, or screenshot).

10. CLOUD Act and GDPR, technically framed​

  • The US CLOUD Act lets US authorities compel US-based providers to disclose data they control, regardless of where it is stored. Exposure follows the provider's corporate control, not the data centre location.
  • GDPR Art. 48 says third-country court orders are only recognised when based on an international agreement such as an MLAT.
  • STACKIT is operated by Schwarz Digits, a German group. Confirm in the vendor assessment that no US-parented entity or sub-processor can access the data, because the CLOUD Act reaches providers under US jurisdiction. We pair that legal position with technical controls that hold regardless of jurisdiction: EU-only regions, customer-managed keys in KMS, client-side encryption for the most sensitive data, and audited, minimal operator access.
  • Check the whole supply chain: SaaS add-ons, CI runners, monitoring agents, DNS, CDN, and email providers must also be EU-controlled, or the residency claim fails at the weakest link.

Sovereignty controls checklist​

ControlImplementationEvidence
Data residencyAll resources in eu01/eu02; policy check rejects any other region or non-STACKIT data endpointCheckov/OPA policy in CI, Steampipe/CLI inventory export
Key managementKMS keyrings per project, CMEK on PostgreSQL Flex, Secrets Manager, SKE volumes; key rotation documentedTerraform state, KMS key versions
Client-side encryptionFor special-category data: encrypt in app before storage (keys in KMS or customer HSM)Code review, design doc
Operator accessCustomer IAM via SSO, least-privilege roles, no shared owner accounts; review STACKIT's operator-access terms in the C5 reportRole-assignment export, quarterly access review
Machine identityWorkload identity federation for CI; key-flow keys with TTL and rotation only where neededService account inventory
Network exposureACLs on managed services, SKE ACL extension, SNA-only access where enabledTerraform, scan results
Audit loggingPlatform audit logs retained per customer policy; Kubernetes audit forwarding where enabledGrafana dashboard, retention config
Backup sovereigntyBackups stay in STACKIT regions; cross-region copy only to eu02Backup schedules, bucket list
Supply chainContainer registry, CI, monitoring, and AI endpoints all EU-controlled; AI via STACKIT AI Model Serving or self-hosted modelsArchitecture diagram, vendor list
Exit planPortable building blocks (Kubernetes, PostgreSQL, S3 API, OpenTofu); data export procedure testedRunbook, test record

Best practices​

  • Everything through OpenTofu/Terraform from the first resource; the portal is read-only for humans in prod.
  • Pin the provider (~> 0.120 as of 2026-10); it ships frequently and still moves fields (e.g. os_version → os_version_min, network-area ranges → stackit_network_area_region). Read the changelog before each bump.
  • Spread SKE node pools across all three AZs and use replica flavors for PostgreSQL Flex in prod.
  • Use STACKIT AI Model Serving or self-hosted models on SKE GPU nodes for AI features, keeping inference in the same jurisdiction (see Private & Sovereign AI).
  • Keep workloads portable: standard Kubernetes APIs, PostgreSQL, S3, OpenTelemetry.

Pitfalls to design around​

  • Preview features (SNA-only control planes, ALB extension, SKE audit forwarding; status to confirm with STACKIT): ask STACKIT to enable them for the organization at project start, and design a fallback with ACLs.
  • Experimental provider resources (iam, network, routing-tables): isolate them in their own stack so a breaking change touches one state file.
  • Project deletion can delay folder deletion while a project is pending removal; plan teardown of test environments accordingly.
  • State locking: lock behaviour on STACKIT Object Storage is unconfirmed; serialise applies or use the PostgreSQL backend.
  • Region parity: confirm every required service exists in eu02 before designing cross-region DR.

Definition of done​

  • Org/folder/project structure, labels, and billing references created from code
  • CI deploys via workload identity federation; no static service-account keys in CI
  • Role assignments least-privilege and reviewed; auditors have reader
  • Network area, project networks, security groups, and VPN in code; managed-service ACLs restricted
  • SKE cluster across 3 AZs with maintenance window, observability extension, ACL, short-lived kubeconfigs
  • PostgreSQL Flex (replica flavor), Secrets Manager, Object Storage with KMS-backed encryption where supported
  • Observability: dashboards, alert rules as code, retention matching policy
  • Backups scheduled for every stateful asset and one restore test passed for each
  • Every service used is in the current C5 report scope, or a risk acceptance is signed
  • Sovereignty checklist completed with evidence links; supply-chain vendor list reviewed
  • Exit/portability runbook written and data export tested once

Sources​