cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Unable to create databricks group and add permission via terraform

soumiknow
Contributor II

I have the following terraform code to create a databricks group and add permission to a workflow:

 

resource "databricks_group" "dbx_group" {
  display_name = "ENV_MONITORING_TEAM"
}

resource "databricks_permissions" "workflow_permission" {
  job_id = databricks_job.workflow.id
  access_control {
    group_name       = databricks_group.dbx_group.display_name
    permission_level = "CAN_MANAGE_RUN"
  }
}

I have the following databricks terraform provider:

provider "databricks" {
  alias                  = "workspace"
  host                   = local.dbx_host
  google_service_account = local.gcp_sa
}

Now, when I execute 'terraform plan', it returned error:

Error: cannot create group: failed during request visitor: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method

If I use the 'host' & the generated 'token' values in '.databrickscfg' file, then 'terraform plan' and 'terraform apply' worked, but I have to use the 'google_service_account' directly to execute the group creation code.

Please suggest what needs to be done here in the existing provider so that the group and permission can be created via terraform.

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now