Skip to main content

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 to 2.10.5).
  • executor (String) Task execution backend (defaults to KubernetesExecutor).
  • git_sync_branch (String) Git branch to track when git_sync_repo is configured (defaults to main).
  • git_sync_repo (String) Optional Git repository URL for continuous DAG synchronization.
  • max_workers (Number) Maximum concurrent KubernetesExecutor task pods (defaults to 16).
  • min_workers (Number) Minimum concurrent KubernetesExecutor task pods (0 enables scale-to-zero, defaults to 0).

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