Databricks Platform Architect · Section 2 · 13% of the exam
Manage accounts and workspaces as code with the Databricks Terraform provider and the Databricks CLI.
One of the objectives of the Databricks Platform Architect accreditation (AWS, Azure or GCP) exam, in the section “Account API and Automation”. Here is what it covers, the points to remember and a question to try.
What it covers
The Databricks Terraform provider manages account-level objects (workspaces, networks, identities, metastore assignments) and workspace-level objects (policies, permissions, jobs) through separate provider configurations. With the cloud's own provider, careful state and secret handling, and the Databricks CLI for one-off account tasks, an architect can rebuild the platform from code. Declarative Automation Bundles cover the project layer on top.
Points to remember
- An account-level provider uses the account host plus
account_id; a workspace-level provider uses the workspace URL and noaccount_id. Usealiasandprovider = databricks.<alias>on every resource. databricks_mws_*resources are account-only: credentials and storage configurations on AWS; networks, customer-managed keys and workspaces on AWS and GCP. Azure workspaces useazurerm_databricks_workspace.databricks_cluster_policyis workspace-only anddatabricks_mws_permission_assignmentis account-only. Groups, service principals, secrets anddatabricks_metastore_assignmentwork at either level.- GCP provisioning resources need a Google-issued OIDC token, through
google_service_accountimpersonation orgoogle_credentials, from a service account that is an account admin. - Keep workspace creation and workspace configuration in separate modules. Data sources fail with
cannot configure default credentialswhen the workspace doesn't exist yet.
Try a question
A platform team owns the workspaces, networking, account groups and compute policies of 12 workspaces. Data engineering teams own Lakeflow Jobs and Lakeflow Spark Declarative Pipelines plus their notebooks, and they want CI to promote them from dev to staging to prod. Which split fits Databricks tooling best?
- ADeclarative Automation Bundles for everything, including workspace creation and account groups, so that there is one tool
- BTerraform for everything, including each team's job and pipeline definitions, with notebooks edited by hand in workspace folders
- CTerraform for the platform layer, and Declarative Automation Bundles with dev, staging and prod targets for each team's jobs, pipelines and code
- DA cron job running
databricks account workspaces createfor the platform layer, and Git folders alone for promoting jobs
Show the answer
C. Terraform manages long-lived platform and account resources with desired state and drift detection: workspaces, networks, keys, identities, metastore assignment and workspace guardrails such as compute policies. Declarative Automation Bundles (formerly Databricks Asset Bundles) package a project's code with its jobs, pipelines and other workspace resources. You deploy them to per-environment targets with databricks bundle deploy, which suits team-owned CI/CD. Bundles deploy into existing workspaces; they don't create workspaces or account identities.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Infrastructure as Code: Terraform and the Databricks CLI teaches this objective (about 45 minutes), and 8 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.