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 on external_location introduced on 1.48.0 #3705

Closed
krknopp opened this issue Jun 25, 2024 · 1 comment · Fixed by #3708
Closed
Labels
regression Issues that are regressions compared to previous versions

Comments

@krknopp
Copy link

krknopp commented Jun 25, 2024

Configuration

We're trying to apply grants to an external location

resource "databricks_grants" "main" {
  external_location = "external1"
  id                = (known after apply)

  grant {
      principal  = "GROUP-NAME"
      privileges = [
          "ALL_PRIVILEGES",
        ]
    }
}

Expected Behavior

Grants should be applied

Actual Behavior

Grants aren't applied with it saying it can't find the group by name. It doesn't matter if the group name is specified as lower or upper case, the error always shows lower case. We were wondering if it had anything to do with the case sensitivity being removed in 1.48.0.

module.external_location_quality.databricks_grants.main: Creating...
2024-06-25T14:17:23.215-0500 [ERROR] provider.terraform-provider-databricks_v1.48.0: Response contains error diagnostic: @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag/diagnostics.go:58 tf_provider_addr=registry.terraform.io/databricks/databricks diagnostic_detail="" diagnostic_severity=ERROR diagnostic_summary="cannot create grants: Could not find principal with name group-name" tf_proto_version=5.6 tf_req_id=37a13376-0db4-4936-971b-eeffbb094e31 tf_resource_type=databricks_grants @module=sdk.proto tf_rpc=ApplyResourceChange timestamp=2024-06-25T14:17:23.215-0500
2024-06-25T14:17:23.215-0500 [ERROR] vertex "module.external_location_quality.databricks_grants.main" error: cannot create grants: Could not find principal with name group-name
╷
│ Error: cannot create grants: Could not find principal with name group-name
│
│   with module.external_location_quality.databricks_grants.main,
│   on ../../modules/databricks-external-location/main.tf line 21, in resource "databricks_grants" "main":
│   21: resource "databricks_grants" "main" {
│

Steps to Reproduce

  1. terraform apply the above code with provider version 1.48.0.

Is it a regression?

yes, 1.47.0 and 1.46.0 both work properly.

@chris-kolik-8451
Copy link

We are also experiencing the exact same issue with 1.48.0, though ours are with catalog/schema grants (almost the same code) rather than external locations, and have confirmed that reverting to 1.47.0 works for us.

@nkvuong nkvuong added the regression Issues that are regressions compared to previous versions label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issues that are regressions compared to previous versions
Projects
None yet
3 participants