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.  

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!