<?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: Terraform: Grant account-level group access to instance profile in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5264#M93</link>
    <description>&lt;P&gt;@Mark Miller​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you are facing suggests that the group you are trying to manage can only be managed at the account level, which means you cannot manage it at the workspace level. This error typically occurs when you attempt to assign a group to an instance profile or role that is outside the scope of the workspace.&lt;/P&gt;&lt;P&gt;To resolve this issue, you can try the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Ensure that the group you are trying to manage is at the account level, and not at the workspace level.&lt;/LI&gt;&lt;LI&gt;Update the provider version to the latest version to ensure you have access to any new fixes or updates that may address this issue.&lt;/LI&gt;&lt;LI&gt;Try using the databricks_group resource instead of the databricks_group_instance_profile or  databricks_group_role resources. This resource allows you to create and manage groups at the account level, and it can be used to grant access to instance profiles and roles.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's an example of how you could create a group and grant it access to an instance profile:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resource "databricks_instance_profile" "example" {
  name = "example-instance-profile"
}
&amp;nbsp;
resource "databricks_group" "example" {
  display_name = "example-group"
  provider = databricks.accounts
}
&amp;nbsp;
resource "databricks_group_instance_profile" "example" {
  group_id = databricks_group.example.id
  instance_profile_arn = databricks_instance_profile.example.arn
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This creates a new instance profile and group at the account level, and then grants the group access to the instance profile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2023 04:55:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-27T04:55:56Z</dc:date>
    <item>
      <title>Terraform: Grant account-level group access to instance profile</title>
      <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5263#M92</link>
      <description>&lt;P&gt;We have setup SCIM with Okta at the account-level and setup Unity Catalog and are in the process of migrating groups from workspace-local to account-level. I have an instance profile that was assigned to a workspace-local group. using `databricks_group_instance_profile`. I'm trying to grant the account-level group access to the instance profile (the profile grants access to resources other than S3) and both `databricks_group_instance_profile` and `databricks_group_role` return the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cannot create group instance profile: invalidSyntax Groups attribute cannot be updated as group [name] can only be managed in account.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cannot create group role: invalidSyntax Groups attribute cannot be updated as group [name] can only be managed in account.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I set the provider to point to &lt;A href="https://accounts.cloud.databricks.com" alt="https://accounts.cloud.databricks.com" target="_blank"&gt;accounts.cloud.databricks.com&lt;/A&gt; then I get:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cannot create group role: invalidValue Invalid role value [arn]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cannot create group instance profile: invalidValue Invalid role value [arn]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Finally, on a lark I tried to create the `databricks_instance_profile` using the &lt;A href="https://accounts.cloud.databricks.com" alt="https://accounts.cloud.databricks.com" target="_blank"&gt;accounts.cloud.databricks.com&lt;/A&gt; host and that didn't work either (as expected): &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cannot create instance profile: HTTP method POST is not supported by this URL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using `databricks_group_instance_profile` using the workspace host will actually set the permission successfully even though it throws an error. However, because of the error the resource is never added to Terraform state and `terraform apply` fails anyway so it wouldn't matter anyhow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Granting permission to the group on the instance profile works fine manually if I use the workspace UI, but that is only a temporary fix since we manage our entire workspace in terraform. How am I supposed to get this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Terraform&lt;/B&gt;: v1.4.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Databricks provider(s)&lt;/B&gt;: v1.13.0, v1.14.3&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 20:13:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5263#M92</guid>
      <dc:creator>dvmentalmadess</dc:creator>
      <dc:date>2023-04-25T20:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform: Grant account-level group access to instance profile</title>
      <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5264#M93</link>
      <description>&lt;P&gt;@Mark Miller​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you are facing suggests that the group you are trying to manage can only be managed at the account level, which means you cannot manage it at the workspace level. This error typically occurs when you attempt to assign a group to an instance profile or role that is outside the scope of the workspace.&lt;/P&gt;&lt;P&gt;To resolve this issue, you can try the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Ensure that the group you are trying to manage is at the account level, and not at the workspace level.&lt;/LI&gt;&lt;LI&gt;Update the provider version to the latest version to ensure you have access to any new fixes or updates that may address this issue.&lt;/LI&gt;&lt;LI&gt;Try using the databricks_group resource instead of the databricks_group_instance_profile or  databricks_group_role resources. This resource allows you to create and manage groups at the account level, and it can be used to grant access to instance profiles and roles.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's an example of how you could create a group and grant it access to an instance profile:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resource "databricks_instance_profile" "example" {
  name = "example-instance-profile"
}
&amp;nbsp;
resource "databricks_group" "example" {
  display_name = "example-group"
  provider = databricks.accounts
}
&amp;nbsp;
resource "databricks_group_instance_profile" "example" {
  group_id = databricks_group.example.id
  instance_profile_arn = databricks_instance_profile.example.arn
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This creates a new instance profile and group at the account level, and then grants the group access to the instance profile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 04:55:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5264#M93</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-27T04:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform: Grant account-level group access to instance profile</title>
      <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5265#M94</link>
      <description>&lt;P&gt;Hi @Mark Miller​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 06:47:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5265#M94</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-02T06:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform: Grant account-level group access to instance profile</title>
      <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5266#M95</link>
      <description>&lt;OL&gt;&lt;LI&gt;All of our groups are account-level groups (see opening paragraph)&lt;/LI&gt;&lt;LI&gt;Provider version was latest at the time of writing&lt;/LI&gt;&lt;LI&gt;I don't understand what this is trying to say. You can't use databricks_group in place of databricks_group_instance_profile or databricks_group_role. They can only be used together as shown in your example. This is exactly the first thing I tried and I get the first error I listed in my post.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 09 May 2023 23:12:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/5266#M95</guid>
      <dc:creator>dvmentalmadess</dc:creator>
      <dc:date>2023-05-09T23:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform: Grant account-level group access to instance profile</title>
      <link>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/38054#M1106</link>
      <description>&lt;P&gt;Retried this using `databricks_group_role` after the `1.210` release of the `databricks/databricks` provider. This worked with an account-level group using the workspace provider and credentials.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 18:36:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/terraform-grant-account-level-group-access-to-instance-profile/m-p/38054#M1106</guid>
      <dc:creator>dvmentalmadess</dc:creator>
      <dc:date>2023-07-20T18:36:30Z</dc:date>
    </item>
  </channel>
</rss>

