{"id":29403631,"url":"https://github.com/kchandan/azure-databricks-terraform","last_synced_at":"2026-05-19T04:36:46.145Z","repository":{"id":302166308,"uuid":"1011422652","full_name":"kchandan/azure-databricks-terraform","owner":"kchandan","description":"Terraform Templates to deploy DR Setup for  Azure Databricks","archived":false,"fork":false,"pushed_at":"2025-07-03T00:06:32.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-03T01:20:00.500Z","etag":null,"topics":["azure","databricks","databricks-deploy","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kchandan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-30T19:45:41.000Z","updated_at":"2025-07-03T00:06:35.000Z","dependencies_parsed_at":"2025-07-03T01:20:06.345Z","dependency_job_id":null,"html_url":"https://github.com/kchandan/azure-databricks-terraform","commit_stats":null,"previous_names":["kchandan/databricks-terraform","kchandan/azure-databricks-terraform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kchandan/azure-databricks-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kchandan%2Fazure-databricks-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kchandan%2Fazure-databricks-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kchandan%2Fazure-databricks-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kchandan%2Fazure-databricks-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kchandan","download_url":"https://codeload.github.com/kchandan/azure-databricks-terraform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kchandan%2Fazure-databricks-terraform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264637862,"owners_count":23642063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","databricks","databricks-deploy","terraform-module"],"created_at":"2025-07-10T19:00:49.876Z","updated_at":"2026-05-19T04:36:46.140Z","avatar_url":"https://github.com/kchandan.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# Azure Databricks DR/BCP Deployment\r\n\r\nGoal of this repo is to develop Databricks DR automation based on best practice suggested by various DB articles.\r\n\r\n![image](https://github.com/user-attachments/assets/048836f1-447e-42dc-b50c-90285859f2a9)\r\n\r\n---\r\n\r\nDevOps Automation workflow for Multi-region DR\r\n\r\n\u003cimg width=\"1402\" height=\"821\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6a5737f4-6475-4d5c-8989-4deb8c55b41e\" /\u003e\r\n\r\n\r\n\r\nThis Terraform configuration deploys:\r\n\r\n- A Databricks workspace (Premium tier)\r\n- A VNet with:\r\n  - Public and private subnets\r\n  - Subnet delegation for Databricks\r\n  - NSG (Network Security Group) attachments\r\n- VNet injection for secure Databricks deployment\r\n- Support for Active/Passive DR setup across regions\r\n\r\n\r\n## 🛠️ Requirements\r\n\r\n- Terraform \u003e= 1.3\r\n- Azure CLI (`az login`)\r\n- Sufficient Azure permissions to create resources\r\n\r\n```\r\naz account set --subscription \"\u003cyour-subscription-name-or-id\u003e\"\r\n\r\n```\r\n\r\n## Create resource group\r\n\r\n```\r\naz group create \\\r\n  --name databricks-demo \\\r\n  --location eastus\r\n\r\n```\r\n\r\n```\r\naz storage account create \\\r\n  --name bcrterraformstatefiles \\\r\n  --resource-group databricks-demo \\\r\n  --location eastus \\\r\n  --sku Standard_LRS \\\r\n  --kind StorageV2 \\\r\n  --allow-blob-public-access false\r\n\r\n\r\naz storage account keys list \\\r\n  --account-name bcrterraformstatefiles \\\r\n  --resource-group databricks-demo \\\r\n  --query \"[0].value\" \\\r\n  -o tsv\r\n\r\naz storage container create \\\r\n  --name tfstate \\\r\n  --account-name bcrterraformstatefiles \\\r\n  --account-key \u003cYOUR_STORAGE_ACCOUNT_KEY\u003e\r\n\r\n\r\n```\r\n\r\n---\r\n\r\n## 🚀 How to Deploy the Infrastructure\r\n\r\n```bash\r\n# Step into the environment folder\r\ncd infra/prod/eastus\r\n\r\n# Initialize the Terraform project\r\nterraform init\r\n\r\n# Preview what will be created\r\nterraform plan -var-file=\"terraform.tfvars\"\r\n\r\n# Apply the infrastructure\r\nterraform apply -var-file=\"terraform.tfvars\"\r\n````\r\n** Wait for 5 minutes before login to the workspace **\r\n\r\n---\r\n\r\n##  How to Deploy the Jobs/Code\r\n\r\n```bash\r\n\r\nexport DATABRICKS_HOST=\"https://\u003cDatabricks-instance-id\u003e.cloud.databricks.com\"\r\nexport DATABRICKS_TOKEN=\"\u003cYOUR-PAT\u003e\"\r\n\r\ncd /apps/dev\r\nterraform init\r\nterraform plan -var-file=\"terraform.tfvars\"\r\nterraform apply --auto-approve -var-file=\"terraform.tfvars\"\r\n\r\n```\r\n\r\n\r\n## 🧹 To Destroy\r\n\r\n```bash\r\nterraform destroy -var-file=\"terraform.tfvars\"\r\n```\r\n\r\n---\r\n\r\n## ✅ Outputs\r\n\r\nAfter deployment, you'll get:\r\n\r\n* `databricks_host` — URL to access your Databricks workspace\r\n\r\n---\r\n\r\n## 📝 Notes\r\n\r\n* Adjust the `terraform.tfvars` to match region and resource group for each deployment.\r\n* Use additional folders like `westus` for DR/secondary regions.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkchandan%2Fazure-databricks-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkchandan%2Fazure-databricks-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkchandan%2Fazure-databricks-terraform/lists"}