terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[ISSUE] Issue with `databricks_storage_credential` resource on group ownership

Open afreyermuth98 opened this issue 1 year ago • 1 comments

Configuration

data "databricks_group" "mygroup" {
  display_name = "mygroup"
}
resource "databricks_storage_credential" "my_storage_credential" {
  name = "my-storage-credential"
  aws_iam_role {
    role_arn = "<MY_ROLE_ARN"
  }
  owner = data.databricks_group.mygroup.id
}

Expected Behavior

The storage credential is created and the owner is the group "mygroup"

Actual Behavior

│ Error: cannot update storage credential: Could not find principal with name <GROUP_ID>

Steps to Reproduce

  1. terraform apply

Terraform and provider versions

TF Version : 1.5.7 Databricks provider version : 1.35.0

Is it a regression?

Debug Output

Important Factoids

Would you like to implement a fix?

afreyermuth98 avatar Feb 06 '24 10:02 afreyermuth98

As owner for databricks_metastore, I needed to provide data.databricks_group.mygroup.display_name instead of .id. This is not what I would expect reading the docs. Both resources used account-level provider.

w0ut0 avatar Feb 14 '24 10:02 w0ut0

it is quite clear in the doc

  • owner - (Optional) Username/groupname/sp application_id of the storage credential owner.

nkvuong avatar Apr 05 '24 11:04 nkvuong