okustera_airflow_workspace (Resource)
Provisions and manages a dedicated Apache Airflow workspace in Okustera. Each workspace runs on the serverless KubernetesExecutor backed by CloudNativePG PostgreSQL 16 for metadata persistence and Ceph RADOS Gateway (RGW S3) with OpenStack Barbican KMS encryption for DAG and task log storage.
Example Usage
Git-Sync Backed Production Airflow Workspace
resource "okustera_airflow_workspace" "analytics" {
name = "analytics-etl"
airflow_version = "2.10.5"
executor = "KubernetesExecutor"
min_workers = 0
max_workers = 32
git_sync_repo = "https://gitlab.example.com/data-engineering/airflow-dags.git"
git_sync_branch = "main"
}
output "airflow_web_ui_url" {
value = okustera_airflow_workspace.analytics.web_ui_url
}
S3 Drop-Zone Airflow Workspace
resource "okustera_airflow_workspace" "s3_pipelines" {
name = "sovereign-s3-etl"
airflow_version = "2.10.5"
max_workers = 16
}
Schema
Required
name(String, Forces new resource) Human-readable Airflow workspace name.
Optional
airflow_version(String) Apache Airflow engine version (defaults to2.10.5).executor(String) Task execution backend (defaults toKubernetesExecutor).git_sync_branch(String) Git branch to track whengit_sync_repois configured (defaults tomain).git_sync_repo(String) Optional Git repository URL for continuous DAG synchronization.max_workers(Number) Maximum concurrentKubernetesExecutortask pods (defaults to16).min_workers(Number) Minimum concurrentKubernetesExecutortask pods (0enables scale-to-zero, defaults to0).
Read-Only
dags_bucket(String) Ceph RGW S3 URI for DAG definitions.id(String) Unique Airflow workspace identifier.logs_bucket(String) Ceph RGW S3 URI for task execution logs.metadata_db(String) CloudNativePG PostgreSQL metadata database identifier.status(String) Operational workspace status (HEALTHY,PAUSED,DEGRADED).web_ui_url(String) HTTPS endpoint for the Airflow Webserver UI.
Import
Import is supported using the workspace id:
terraform import okustera_airflow_workspace.analytics ws-analytics-etl