Closed KingMichaelPark closed 1 year ago
This is similar to #1793, where the correct error message is not surfaced up
The suggested error message in #1793 doesn't seem to apply though as the groups don't already exist in the workspace? I did see that ticket so I am not sure if that means you have a suggestion @nkvuong ?
the similarity with the other issue is that the error from the API response is suppressed by the provider and a generic error message about account API is provided instead
The actual error responded from the API will be in the debug log, but further up
If you manually build the provider from master, and re-run this, it should surface the correct error
Ah I see, thank you, I will give that a go, I will leave the ticket open though because it still may be valid
Interesting! Using the most recent commit provider has given me a different error I will have to dig into. Thank you @nkvuong
╷
│ Error: cannot create mws permission assignment: Permission assignment APIs are not available for this workspace.
│
│ with module.production.databricks_mws_permission_assignment.add_metastore_admins,
│ on modules/aws_workspace/db_workspaces.tf line 17, in resource "databricks_mws_permission_assignment" "add_metastore_admins":
│ 17: resource "databricks_mws_permission_assignment" "add_metastore_admins" {
│
╵
The answer seems to be that there are a few steps required to add users to a workspace. You can't add them to a workspace if the workspace itself does not have a unity catalog metastore. The metastore must be created within a workspace.
Configuration
The root file creates the account level groups and users in the root module, the databricks.mws provider is used exclusively there. It also used exclusively in the staging and production workspaces. The staging workspace already exists, so the groups exist and identity federation for that workspace exists.
Module root
outputs.tf
This is the file in
./modules/aws_workspace
that is referenced above.Expected Behavior
The account level groups (and their users) are added to the workspace like they were when added with just the staging module enabled.
Actual Behavior
Enabling the production module does not allow for the groups to be assigned to the workspace. Failing with the message:
That output comes for each of the
databricks_mws_permission_assignment resources
for the production module. The staging module already successfully created. It seems to only occur once enabling a second module.Steps to Reproduce
terraform apply
The plan (only showing the first)
Terraform and provider versions
Debug Output
Important Factoids
No, but happy to chat/talk through any questions are aren't captured here.