Skip to content

Commit 49b3f4f

Browse files
authored
Exporter: use databricks_group_role instead of deprecated databricks_group_instance_profile (#1905)
* Exporter: use `databricks_group_role` instead of deprecated `databricks_group_instance_profile` * explicitly refer to ARN attribute
1 parent fcf6910 commit 49b3f4f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

exporter/importables.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ var resourcesMap map[string]importable = map[string]importable{
190190
return splits[len(splits)-1]
191191
},
192192
},
193-
"databricks_group_instance_profile": {
193+
"databricks_group_role": {
194194
Service: "access",
195195
Depends: []reference{
196196
{Path: "group_id", Resource: "databricks_group"},
197-
{Path: "instance_profile_id", Resource: "databricks_instance_profile"},
197+
{Path: "role", Resource: "databricks_instance_profile", Match: "instance_profile_arn"},
198198
},
199199
},
200200
"databricks_cluster": {
@@ -572,7 +572,7 @@ var resourcesMap map[string]importable = map[string]importable{
572572
ID: instanceProfile.Value,
573573
})
574574
ic.Emit(&resource{
575-
Resource: "databricks_group_instance_profile",
575+
Resource: "databricks_group_role",
576576
ID: fmt.Sprintf("%s|%s", g.ID, instanceProfile.Value),
577577
})
578578
}

exporter/importables_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func TestGroup(t *testing.T) {
149149
err = ic.Importables["databricks_group"].Import(ic, r)
150150
assert.NoError(t, err)
151151
assert.Len(t, ic.testEmits, 4)
152-
assert.True(t, ic.testEmits["databricks_group_instance_profile[<unknown>] (id: 123|abc)"])
152+
assert.True(t, ic.testEmits["databricks_group_role[<unknown>] (id: 123|abc)"])
153153
assert.True(t, ic.testEmits["databricks_instance_profile[<unknown>] (id: abc)"])
154154
assert.True(t, ic.testEmits["databricks_group[<unknown>] (id: parent-group)"])
155155
assert.True(t, ic.testEmits["databricks_group_member[_parent-group_foo] (id: parent-group|123)"])

0 commit comments

Comments
 (0)