databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
442 stars 379 forks source link

duplicate resource block when using includeUserDomain CLI option #1726

Open rohitnijhawan opened 1 year ago

rohitnijhawan commented 1 year ago

When a username appears twice on 2 different domains, the group membership for it should be distinct.

Configuration Generated from Exporter

resource "databricks_group_member" "account_users_4416491746410718_sandeep_thomson" {
  member_id = databricks_user.sandeep_thomson_databricks_com.id
  group_id  = databricks_group.account_users_4416491746410718.id
}
resource "databricks_group_member" "account_users_4416491746410718_sandeep_thomson" {
  member_id = databricks_user.sandeep_thomson_unitycatalog_com.id
  group_id  = databricks_group.account_users_4416491746410718.id
}

Expected Behavior

No two resource blocks should have the same identifier name

Actual Behavior

Note that the resource name (above) is exactly the same for the databricks_group_member block

Steps to Reproduce

Add two users into a workspace with same user name but 2 different domains Add both users to some group that is not users Run exporter with -services "groups, users" and -listing "groups,users"

Terraform and provider versions

Any Terraform Version Databricks provider version 1.6.2 or lower

rohitnijhawan commented 1 year ago

This feature and CLI option may not be in master as of this comment but it's WIP

alexott commented 1 year ago

@rohitnijhawan is issue still relevant?