cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Terraform databricks_grants errors on external_location

Conlyn
New Contributor III

We are using terraform to setup Unity Catalog external locations and when using databricks_grants to set permissions on the external locations it throws the following error:

 

 

Error: cannot create grants: permissions for external_location-test_location are &{[{TEST_ROLE [ALL_PRIVILEGES] [Principal]}]}, but have to be {[{TEST_ROLE [ALL_PRIVILEGES] []}]}

 

 

Here is the plan output:

 

 

# databricks_grants.external_locations["test_location"] will be created
  + resource "databricks_grants" "external_locations" {
      + external_location = "test_location"
      + id                = (known after apply)

      + grant {
          + principal  = "TEST_ROLE"
          + privileges = [
              + "ALL_PRIVILEGES",
            ]
        }
    }

 

 

 

We have tried multiple TF and Databricks provider versions including latest and all throw the same error.

Thanks,

-Conlyn

1 ACCEPTED SOLUTION

Accepted Solutions

Conlyn
New Contributor III

I figured out my issue... The principal name is case sensitive and if the input value doesn't match the case of the email address or Group Name in the workspace/account it throws that ambiguous error.  

View solution in original post

2 REPLIES 2

Conlyn
New Contributor III

I should mention that the apply actually succeeds setting the permission, but the error is output and the state file only lists the workspace and external_location data elements.

Conlyn
New Contributor III

I figured out my issue... The principal name is case sensitive and if the input value doesn't match the case of the email address or Group Name in the workspace/account it throws that ambiguous error.  

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group