" Please migrate to `databricks_group_role` "

Andrei_Radulesc
Contributor III

With Databricks Terraform connector version 1.2.0, I use the following to make the AWS instance profile available to all users in the workspace:

// Create AWS instance profile

resource "aws_iam_instance_profile" "this" {

 name = "${var.prefix}_instance_profile"

 role = aws_iam_role.instance_profile.name

 tags = var.tags

}

// Create instance profile

resource "databricks_instance_profile" "this" {

 provider               = databricks.workspace

 instance_profile_arn   = aws_iam_instance_profile.this.arn

}

// Make instance profile available to all users

data "databricks_group" "workspace_users" {

 provider               = databricks.workspace

 display_name           = "users"

}

resource "databricks_group_instance_profile" "all" {

 provider               = databricks.workspace

 group_id               = data.databricks_group.workspace_users.id

 instance_profile_id    = databricks_instance_profile.this.id

}

When upgrading from connector version 1.2.0 to 1.9.2, and am getting this:

Warning: Deprecated Resource

│  with module.test1_workspace_config.databricks_group_instance_profile.all,

│  on ../../modules/databricks/workspace_config/main.tf line 148, in resource "databricks_group_instance_profile" "all":

│ 148: resource "databricks_group_instance_profile" "all" {

│ Please migrate to `databricks_group_role`

The 1.9.2 Databricks Terraform docs are at https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/group_role

But the docs still say to use databricks_group_instance_profile, and do not explain how the upgrade could be made.

Does anyone know how I'm supposed to use databricks_group_role?

Digging through release notes, databricks_group_instance_profile got deprecated in 1.8.0