All the credits to betabandido. I just fork the repository and make some changes to work as I think my terraform scripts should work.
- Website: https://www.terraform.io
- Mailing list: Google Groups
Clone repository
$ git clone git@github.com:nenetto/terraform-provider-databricks
Enter the provider directory and build the provider
$ cd terraform-provider-databricks
$ go build -o bin/terraform-provider-databricks
Copy the binary generated file into your /.terraform/plugins//terraform-provider-databricks. The name of the plugin is IMPORTANT and must not be changed in order to make it work in terraform
provider "databricks" {
domain = "<your-account>.cloud.databricks.com"
token = "<your token>"
}
resource "databricks_notebook" "notebook" {
path = "/Users/<username>/tf-test"
language = "PYTHON"
content = "${base64encode("print('generated by terraform')")}"
}
resource "databricks_cluster" "cluster" {
name = "tf-test"
spark_version = "4.1.x-scala2.11"
node_type_id = "m4.large"
num_workers = 1
autotermination_minutes = 10
aws_attributes {
zone_id = "eu-west-1c"
ebs_volume_type = "GENERAL_PURPOSE_SSD"
ebs_volume_count = 1
ebs_volume_size = 100
}
}
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.9+ is required).