<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating Group in Terraform using external_id in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/creating-group-in-terraform-using-external-id/m-p/117732#M3324</link>
    <description>&lt;P&gt;Greetings from the future! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now it is clear that external_id, which IS Azure's ObjectID, comes from the internal sync mechanism, that can be enabled in your account under previews:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiPa_0-1746459120358.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16486i80F6B8CA326D186A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiPa_0-1746459120358.png" alt="MiPa_0-1746459120358.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was able to reference my security group in Terraform and create that group in an account, with this code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Reference to existing Microsoft Entra ID (Azure AD) group
data "azuread_group" "databricks_group1" {
  display_name     = "Databricks_Group1"
  security_enabled = true
}

# Output the object ID of the group
output "databricks_group1_object_id" {
  value       = data.azuread_group.databricks_group1.object_id
  description = "Object ID of the Databricks_Group1 Entra ID group"
}

// ...existing code...

# Create Databricks account external group linked to Entra ID group
resource "databricks_group" "databricks_group1_external" {
  provider     = databricks.account
  display_name = data.azuread_group.databricks_group1.display_name
  external_id  = data.azuread_group.databricks_group1.object_id
}

# Output the Databricks external group ID
output "databricks_group1_external_id" {
  value       = databricks_group.databricks_group1_external.id
  description = "ID of the Databricks external group linked to Entra ID group"
}&lt;/LI-CODE&gt;&lt;P&gt;This updated my Terraform plan and I was able to deploy it:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + databricks_group1_external_id = (known after apply)
  + databricks_group1_object_id   = "f1b22903-2c5c-4f60-a673-4c52b8cd1e24"

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

databricks_group.databricks_group1_external: Creating...
databricks_group.databricks_group1_external: Creation complete after 5s [id=597986374716779]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

databricks_group1_external_id = "597986374716779"
databricks_group1_object_id = "f1b22903-2c5c-4f60-a673-4c52b8cd1e24"
test2_group_id = "848008903310313"
workspace_group_id = "236839776286494"&lt;/LI-CODE&gt;&lt;P&gt;which ends with a brand new group created in the account, with all existing members of that group! What a nice feature, and all without any SCIM integration!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiPa_1-1746459398512.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16487i23A954197303A993/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiPa_1-1746459398512.png" alt="MiPa_1-1746459398512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 May 2025 15:39:52 GMT</pubDate>
    <dc:creator>MiPa</dc:creator>
    <dc:date>2025-05-05T15:39:52Z</dc:date>
    <item>
      <title>Creating Group in Terraform using external_id</title>
      <link>https://community.databricks.com/t5/administration-architecture/creating-group-in-terraform-using-external-id/m-p/92700#M1970</link>
      <description>&lt;P&gt;The documentation &lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/group" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;doesn't give much information about how to use `external_id` when creating a new group. If I reference the object_id for an Azure AD Group, the databricks group gets created but the members from the AD group are not added, nor is the AD group a member group of the databricks group. I looked at the tf code and it seems to just pass along the id to the scim databricks api.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 21:59:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/creating-group-in-terraform-using-external-id/m-p/92700#M1970</guid>
      <dc:creator>cgrass</dc:creator>
      <dc:date>2024-10-03T21:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Group in Terraform using external_id</title>
      <link>https://community.databricks.com/t5/administration-architecture/creating-group-in-terraform-using-external-id/m-p/117732#M3324</link>
      <description>&lt;P&gt;Greetings from the future! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now it is clear that external_id, which IS Azure's ObjectID, comes from the internal sync mechanism, that can be enabled in your account under previews:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiPa_0-1746459120358.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16486i80F6B8CA326D186A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiPa_0-1746459120358.png" alt="MiPa_0-1746459120358.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was able to reference my security group in Terraform and create that group in an account, with this code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Reference to existing Microsoft Entra ID (Azure AD) group
data "azuread_group" "databricks_group1" {
  display_name     = "Databricks_Group1"
  security_enabled = true
}

# Output the object ID of the group
output "databricks_group1_object_id" {
  value       = data.azuread_group.databricks_group1.object_id
  description = "Object ID of the Databricks_Group1 Entra ID group"
}

// ...existing code...

# Create Databricks account external group linked to Entra ID group
resource "databricks_group" "databricks_group1_external" {
  provider     = databricks.account
  display_name = data.azuread_group.databricks_group1.display_name
  external_id  = data.azuread_group.databricks_group1.object_id
}

# Output the Databricks external group ID
output "databricks_group1_external_id" {
  value       = databricks_group.databricks_group1_external.id
  description = "ID of the Databricks external group linked to Entra ID group"
}&lt;/LI-CODE&gt;&lt;P&gt;This updated my Terraform plan and I was able to deploy it:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + databricks_group1_external_id = (known after apply)
  + databricks_group1_object_id   = "f1b22903-2c5c-4f60-a673-4c52b8cd1e24"

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

databricks_group.databricks_group1_external: Creating...
databricks_group.databricks_group1_external: Creation complete after 5s [id=597986374716779]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

databricks_group1_external_id = "597986374716779"
databricks_group1_object_id = "f1b22903-2c5c-4f60-a673-4c52b8cd1e24"
test2_group_id = "848008903310313"
workspace_group_id = "236839776286494"&lt;/LI-CODE&gt;&lt;P&gt;which ends with a brand new group created in the account, with all existing members of that group! What a nice feature, and all without any SCIM integration!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MiPa_1-1746459398512.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16487i23A954197303A993/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MiPa_1-1746459398512.png" alt="MiPa_1-1746459398512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 15:39:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/creating-group-in-terraform-using-external-id/m-p/117732#M3324</guid>
      <dc:creator>MiPa</dc:creator>
      <dc:date>2025-05-05T15:39:52Z</dc:date>
    </item>
  </channel>
</rss>

