我在AWS上配置databricks_mws_credentials通過起程拓殖。這工作幾天前——現在,我變得“錯誤:無法創建多工作站係統憑證:無法完成請求;未經身份驗證的用戶”。
我的用戶/密碼/賬戶憑證是正確的。他們是通過環境變量:
出口TF_VAR_databricks_account_username = " […] "
出口TF_VAR_databricks_account_password = " […] "
出口TF_VAR_databricks_account_id = " […] "
我煮了一個最小的例子顯示錯誤。它是基於https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/mws_credentials:
起程拓殖{
required_providers {
aws = {
源= " hashicorp / aws”
version = " ~ > 3.70.0”
}
磚= {
源= "磚/磚"
version = " 1.2.0 "
}
}
required_version = " > = 1.0.0 "
}
供應商“aws”{
別名=“磚”
地區= var.region
assume_role {
role_arn = "是:aws:我::$ {var.isee_databricks_aws_account_id}:角色/起程拓殖”
}
}
/ /初始化供應商“多工作站係統”模式提供新的工作區。
/ /查看https://registry.terraform.io/providers/databricks/databricks/latest/docs驗證
供應商“磚”{
別名= "多工作站係統"
主機= "https://accounts.cloud.www.eheci.com”
用戶名= var.databricks_account_username
密碼= var.databricks_account_password
}
數據“databricks_aws_assume_role_policy”“這”{
external_id = var.databricks_account_id
}
資源”aws_iam_role”“cross_account_role”{
name = " test-crossaccount "
assume_role_policy = data.databricks_aws_assume_role_policy.this.json
}
數據“databricks_aws_crossaccount_policy”“這”{
}
資源“aws_iam_role_policy””這個“{
name = "測試政策"
角色= aws_iam_role.cross_account_role.id
政策= data.databricks_aws_crossaccount_policy.this.json
}
資源“databricks_mws_credentials””這個“{
提供者= databricks.mws
account_id = var.databricks_account_id
credentials_name = " test-creds "
role_arn = aws_iam_role.cross_account_role.arn
}