Databricks: cannot create mws credentials: invalid Databricks Account configuration

212 views Asked by At


 Setting up databricks mws_credentials through terraform on my aws account. However, when configuring databricks_mws_credentials through Terraform on AWS.

The code was working before. i had deleted the mws credential file from my cloudformation stack and wanated to create a new one. when i tried to create a new mws credential and link it to a new workspace it would give me the above error.

i’ve run into an error that I can't figure out how to debug. Below is the error i am getting:

Error: cannot create mws credentials: invalid Databricks Account configuration
│ 
│ with module.databricks.databricks_mws_credentials.this,
│ on modules/aws-databricks-tf/main.tf line 128, in resource "databricks_mws_credentials" "this":
│ 128: resource "databricks_mws_credentials" "this" {
│


I have checked my account username, password and account-ID, token which all seem correct. But i am getting the same error.

Here is my databricks_mws_credentials resource creation code:

resource "databricks_mws_credentials" "this" {
#provider = databricks.mws
account_id = var.databricks_account_id
# role_arn = aws_iam_role.cross_account_role.arn
role_arn = var.databricks_role_arn
credentials_name = var.databricks_credentials
# depends_on = [aws_iam_role_policy.this]
}

Below is my module that calls the databricks resource. which contains the provided the username, password, account-ID and IAM role .


module "databricks" {
source = "./modules/aws-databricks-tf"

region = var.region
databricks_vpc_id = element(data.aws_vpcs.vpc_list.ids, 0)
databricks_subnet_ids = data.aws_subnets.subnet_ids_private.ids # Private Subnet 1/2
databricks_security_group_ids = [aws_security_group.databricksNode-sg.id]
env = var.env
databricks_account_username = "my-username"
databricks_account_password = "mypassword"
databricks_account_id = "account-id"
databricks_root_storage_bucket = "root-bucket"
 
# cross_account_iam_role = "DatabricksRole"
databricks_role_arn = my-databricks-role # Instead of creating the Databricks Role via terraform, I have created it manually in the UI with relevant policies and trust relationship
databricks_credentials = "DatabricksCredentials"
 

I have also tried updating the databricks password but the issue still persists. Any other suggestions that i can try.

 

0

There are 0 answers