{"id":18400657,"url":"https://github.com/databricks/terraform-provider-databricks","last_synced_at":"2025-05-14T19:09:20.633Z","repository":{"id":37098069,"uuid":"240289534","full_name":"databricks/terraform-provider-databricks","owner":"databricks","description":"Databricks Terraform Provider","archived":false,"fork":false,"pushed_at":"2025-05-14T14:03:38.000Z","size":76451,"stargazers_count":514,"open_issues_count":520,"forks_count":428,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-05-14T19:09:18.938Z","etag":null,"topics":["aws","azure","databricks","databricks-automation","gcp","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/databricks/databricks/latest","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databricks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-13T15:10:40.000Z","updated_at":"2025-05-14T14:03:39.000Z","dependencies_parsed_at":"2024-03-16T14:42:18.641Z","dependency_job_id":"c7a96324-f504-4878-84d2-b7fca2df10bf","html_url":"https://github.com/databricks/terraform-provider-databricks","commit_stats":{"total_commits":2810,"total_committers":213,"mean_commits":"13.192488262910798","dds":0.7565836298932385,"last_synced_commit":"e11d99a9e99fd5a15192b23ad9e9a2c7d6b5f5fd"},"previous_names":["databrickslabs/databricks-terraform","databrickslabs/terraform-provider-databricks"],"tags_count":158,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fterraform-provider-databricks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fterraform-provider-databricks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fterraform-provider-databricks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fterraform-provider-databricks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databricks","download_url":"https://codeload.github.com/databricks/terraform-provider-databricks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"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":["aws","azure","databricks","databricks-automation","gcp","terraform","terraform-provider"],"created_at":"2024-11-06T02:35:42.773Z","updated_at":"2025-05-14T19:09:20.266Z","avatar_url":"https://github.com/databricks.png","language":"Go","readme":"# Databricks Terraform Provider\n\n![Resources](docs/resources.png)\n\n[AWS](docs/guides/aws-workspace.md) tutorial\n| [Azure](docs/guides/azure-workspace.md) tutorial\n| [End-to-end](docs/guides/workspace-management.md) tutorial\n| [Authentication](docs/index.md)\n| [Troubleshooting Guide](docs/guides/troubleshooting.md)\n| [Changelog](CHANGELOG.md)\n| [Contributing and Development Guidelines](CONTRIBUTING.md)\n\n[![build](https://github.com/databricks/terraform-provider-databricks/workflows/build/badge.svg?branch=main)](https://github.com/databricks/terraform-provider-databricks/actions?query=workflow%3Abuild+branch%3Amain) [![codecov](https://codecov.io/gh/databricks/terraform-provider-databricks/branch/main/graph/badge.svg)](https://codecov.io/gh/databricks/terraform-provider-databricks) [![downloads](https://img.shields.io/github/downloads/databricks/terraform-provider-databricks/total.svg)](https://hanadigital.github.io/grev/?user=databricks\u0026repo=terraform-provider-databricks)\n\nDatabricks Terraform provider works with Terraform 1.1.5 or newer. To use it please refer to instructions specified at [registry page](https://registry.terraform.io/providers/databricks/databricks/latest):\n\n```hcl\nterraform {\n  required_providers {\n    databricks = {\n      source = \"databricks/databricks\"\n    }\n  }\n}\n```\n\nIf you want to build it from sources, please refer to [contributing guidelines](CONTRIBUTING.md).\n\nThen create a small sample file, named `main.tf` with approximately following contents. Replace `\u003cyour PAT token\u003e` with newly created [PAT Token](https://docs.databricks.com/dev-tools/api/latest/authentication.html).\n\n```terraform\nprovider \"databricks\" {\n  host  = \"https://abc-defg-024.cloud.databricks.com/\"\n  token = \"\u003cyour PAT token\u003e\"\n}\n\ndata \"databricks_current_user\" \"me\" {}\ndata \"databricks_spark_version\" \"latest\" {}\ndata \"databricks_node_type\" \"smallest\" {\n  local_disk = true\n}\n\nresource \"databricks_notebook\" \"this\" {\n  path     = \"${data.databricks_current_user.me.home}/Terraform\"\n  language = \"PYTHON\"\n  content_base64 = base64encode(\u003c\u003c-EOT\n    # created from ${abspath(path.module)}\n    display(spark.range(10))\n    EOT\n  )\n}\n\nresource \"databricks_job\" \"this\" {\n  name = \"Terraform Demo (${data.databricks_current_user.me.alphanumeric})\"\n\n  new_cluster {\n    num_workers   = 1\n    spark_version = data.databricks_spark_version.latest.id\n    node_type_id  = data.databricks_node_type.smallest.id\n  }\n\n  notebook_task {\n    notebook_path = databricks_notebook.this.path\n  }\n}\n\noutput \"notebook_url\" {\n  value = databricks_notebook.this.url\n}\n\noutput \"job_url\" {\n  value = databricks_job.this.url\n}\n```\n\nThen run `terraform init` then `terraform apply` to apply the hcl code to your Databricks workspace.\n\n## OpenTofu Support\n\n[OpenTofu](https://opentofu.org/) is an open-source fork of Terraform with the MPL 2.0 license. The Databricks Terraform provider should be compatible with OpenTofu, but this integration is not actively tested and should be considered experimental. Please raise a Github issue if you find any incompatibility.\n\n## Switching from `databrickslabs` to `databricks` namespace\n\nTo make Databricks Terraform Provider generally available, we've moved it from [https://github.com/databrickslabs](https://github.com/databrickslabs) to [https://github.com/databricks](https://github.com/databricks). We've worked closely with the Terraform Registry team at Hashicorp to ensure a smooth migration. Existing terraform deployments continue to work as expected without any action from your side. We ask you to replace `databrickslabs/databricks` with `databricks/databricks` in all your `.tf` files.\n\nYou should have [`.terraform.lock.hcl`](https://github.com/databrickslabs/terraform-provider-databricks/blob/v0.6.2/scripts/versions-lock.hcl) file in your state directory that is checked into source control. terraform init will give you the following warning.\n\n```text\nWarning: Additional provider information from registry \n\nThe remote registry returned warnings for registry.terraform.io/databrickslabs/databricks:\n- For users on Terraform 0.13 or greater, this provider has moved to databricks/databricks. Please update your source in required_providers.\n```\n\nAfter you replace `databrickslabs/databricks` with `databricks/databricks` in the `required_providers` block, the warning will disappear. Do a global \"search and replace\" in `*.tf` files. Alternatively you can run `python3 -c \"$(curl -Ls https://dbricks.co/updtfns)\"` from the command-line, that would do all the boring work for you.\n\nIf you didn't check-in [`.terraform.lock.hcl`](https://www.terraform.io/language/files/dependency-lock#lock-file-location) to the source code version control, you may you may see `Failed to install provider` error. Please follow the simple steps described in the [troubleshooting guide](docs/guides/troubleshooting.md).\n\n## Use of Terraform exporter\n\nThe exporter functionality is experimental and provided as is. It has an evolving interface, which may change or be removed in future versions of the provider.\n","funding_links":[],"categories":["🧱 Databricks"],"sub_categories":["📚 Repos"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabricks%2Fterraform-provider-databricks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabricks%2Fterraform-provider-databricks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabricks%2Fterraform-provider-databricks/lists"}