I'm trying to create a new workspace in a empty account. I have managed to create all the other resources without issues but when I try to create the workspace it fails with the following error:
Error: cannot create mws workspaces: MALFORMED_REQUEST: Invalid CredentialsId:
My config is the following:
resource "databricks_mws_workspaces" "db_landing_ws" {
provider = databricks.accounts
account_id = var.databricks_account_id
aws_region = var.aws_region
workspace_name = "landing-${var.env_short}${var.aws_region_short}}"
credentials_id = databricks_mws_credentials.db_landing_ws_role.id
storage_configuration_id = databricks_mws_storage_configurations.db_landing_ws_s3_bucket.id
network_id = databricks_mws_networks.db_landing_vpc.id
token{
comment = "Terraform"
}
}
And the provider is configured as follows:
provider "databricks" {
alias = "accounts"
host = "https://accounts.cloud.databricks.com"
account_id = var.databricks_account_id
client_id = jsondecode(data.aws_secretsmanager_secret_version.databricks_secret_id.secret_string)["client_id"]
client_secret = jsondecode(data.aws_secretsmanager_secret_version.databricks_secret_id.secret_string)["secret_id"]
}
Where I provide a service principal client and secret id via secrets manager.
I have tried different ways of configuring the provider ( with user and password ) but without any luck. Any suggestions would be greatly appreciated.
Thanks
Istvan C