Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Issue with databricks_grant resource #4151

Open
bRameshShivakumar opened this issue Oct 24, 2024 · 0 comments
Open

[ISSUE] Issue with databricks_grant resource #4151

bRameshShivakumar opened this issue Oct 24, 2024 · 0 comments

Comments

@bRameshShivakumar
Copy link

bRameshShivakumar commented Oct 24, 2024

Hello
trying to add grant the permission to schema
Note: already checked [Issue with databricks_grants resource
#3630](#3630)
this issue is with respect to access in system schema.

Configuration

 resource "databricks_schema" "databricks_service_schema" {
  provider = databricks.test
  catalog_name = "test_sandbox_we" # Replace with your catalog name
  name         = "sampletest"  # Replace with your schema name  
  comment      = "data bricks Schema for test"
}

resource "databricks_grants" "service_schema_permissions" {
  provider    = databricks.test
  schema        = "test_sandbox_we.${databricks_schema.databricks_service_schema.name}"
   grant {
    principal  = "testgroup"
    privileges = ["USE_SCHEMA", "MODIFY"]
  }

Expected Behavior

create new schema and assign permission to the griven principal

Actual Behavior

Error: cannot read grants: GetPermissions invalid schema name: 'sampletest'

Steps to Reproduce

Terraform and provider versions

terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.49, <4.0"
}
databricks = {
source = "databricks/databricks"
version = "1.48.3"
}
}
}

provider "azurerm" {
features {}
}

provider "databricks" {
host = "sandbox.databricks.net"
alias = "test"
}

Is it a regression?

tried with latest version version = ">=1.5.0","1.38

Debug Output

databricks_grants.service_schema_permissions: Refreshing state... [id=schema/sampletest]
2024-10-24T18:09:21.964+0530 [DEBUG] provider.terraform-provider-databricks_v1.48.3.exe:
GET /api/2.1/unity-catalog/permissions/schema/sampletest
< HTTP/2.0 400 Bad Request
< {
< "details": [
< {
< "@type": "type.googleapis.com/google.rpc.RequestInfo",
< "request_id": "94a6c62f-4d79-4d65-a833-ea77c4614c63",
< "serving_data": ""
< }
< ],
< "error_code": "INVALID_PARAMETER_VALUE",
< "message": "GetPermissions invalid schema name: 'sampletest'"

Important Factoids

it is suppose to hit GET /api/2.1/unity-catalog/permissions/schema/test_sandbox_we.sampletest
but it is refering only to /sampletest

Would you like to implement a fix?

currently no . but its a small bug

now it has become blocker even if i comment full come and apply still it is trying to read the permission.
Regards
Ramesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant