Open mike-decaro opened 3 months ago
It looks like this resulted from an account-level issue we had. A service principal created in the account was not correctly propagated to all of our workspaces; in the ones that it did, we were able to assign admin permissions to the service principal and the terraform was successfully applied. In the others, the error remains.
The message buried in the error that "Groups is only accessible by admins." is correct here, because the service principal is not admin (as it is not found at all in the workspace), but I do feel it is a bit hidden in the response, and a message that "service principal could not be found in workspace XXXX" would have been more clear.
Hi @mike-decaro Even I am facing this issue with databricks_entitlement resource in TF. The SP used has admin level access for said DBX workspace. Anything specific I need to check?
@dhawal25 here are the things I have added for the SP
Account
Service Principal: Manager
& Service Principal: User
Workspace
Service Principal: Manager
& Service Principal: User
on the SP's permission page for the account principal.Caveat: Ran into this the same time I was converting to use OAuth instead of basic auth. In order to get the token updated in it's storage for the workspace to use (our account and workspace terraform are split into multiple backends), I had to hand-assign the SP's permissions in the workspace to apply the account Terraform, or the client ID & Secret being used by the account had no permissions to apply the workspace. It felt very circular, but that may well be just how our set up took. It was a previous issue we faced prior to this "group requires admin" though so I'm hoping you don't have to deal with this.
Hey @mike-decaro Thanks for the details. Granting admin rights to SP as mentioned worked. Thank you again.
Description Attempting to create a workspace group through terraform; intent of the group is to manage workspace permissions for any service principal associated to the account
Provider access key being used is that of an account-level admin.
Apply works successfully without below
databricks_group
resourceReproduction
Provider:
Resource:
Expected behavior Group is created in workspace
Is it a regression? No
Debug Logs Request log:
Other Information
Additional context
Group is being created after change from basic auth to OAuth so that account level service principal's token can be used to apply workspace infrastructure.