databricks / terraform-databricks-examples

Examples of using Terraform to deploy Databricks resources
https://registry.terraform.io/modules/databricks/examples/databricks/latest
Other
214 stars 133 forks source link

Example aws-workspace-with-firewall fails creation unless Token is removed #132

Open caldempsey opened 6 months ago

caldempsey commented 6 months ago

Using a provider of

provider "databricks" {
  profile = "ACCOUNT-<ID>"
} 

This doesn't create:

resource "databricks_mws_workspaces" "this" {
  provider =       databricks
  account_id     = var.databricks_account_id
  aws_region     = var.region
  workspace_name = local.prefix

  credentials_id           = databricks_mws_credentials.this.credentials_id
  storage_configuration_id = databricks_mws_storage_configurations.this.storage_configuration_id
  network_id               = databricks_mws_networks.this.network_id

  depends_on = [ time_sleep.wait, databricks_mws_storage_configurations.this, databricks_mws_credentials.this, databricks_mws_networks.this ]

  token {
    comment = "Terraform"
  }
}

Unless the token block is removed (which requires you to manually destroy the workspace and prune the terraform state first). The error is:

default auth: cannot configure default credentials

Logging my findings. To reproduce try to set this up using the modern OAuth login, latest version of Databricks.

Happy hunting!