diff --git a/internal/services/databricks/databricks_access_connector_resource.go b/internal/services/databricks/databricks_access_connector_resource.go index 9789778cb558..30bb91eb2427 100644 --- a/internal/services/databricks/databricks_access_connector_resource.go +++ b/internal/services/databricks/databricks_access_connector_resource.go @@ -43,7 +43,7 @@ func (r AccessConnectorResource) Arguments() map[string]*pluginsdk.Schema { "resource_group_name": commonschema.ResourceGroupName(), - "identity": commonschema.SystemOrUserAssignedIdentityOptional(), + "identity": commonschema.SystemAssignedUserAssignedIdentityOptional(), "tags": commonschema.Tags(), } diff --git a/internal/services/databricks/databricks_access_connector_resource_test.go b/internal/services/databricks/databricks_access_connector_resource_test.go index ebc61df8f4e7..f8abc9943ddb 100644 --- a/internal/services/databricks/databricks_access_connector_resource_test.go +++ b/internal/services/databricks/databricks_access_connector_resource_test.go @@ -82,6 +82,13 @@ func TestAccDatabricksAccessConnector_identityComplete(t *testing.T) { ), }, data.ImportStep(), + { + Config: r.identitySystemAssignedUserAssigned(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep(), { Config: r.basic(data), Check: acceptance.ComposeTestCheckFunc( @@ -185,6 +192,35 @@ resource "azurerm_databricks_access_connector" "test" { `, template, data.RandomInteger) } +func (r DatabricksAccessConnectorResource) identitySystemAssignedUserAssigned(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +provider "azurerm" { + features {} +} + +%s + +resource "azurerm_user_assigned_identity" "test" { + name = "acctestDBUAI-%[2]d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name +} + +resource "azurerm_databricks_access_connector" "test" { + name = "acctestDBAC%[2]d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + identity { + type = "SystemAssigned, UserAssigned" + identity_ids = [ + azurerm_user_assigned_identity.test.id, + ] + } +} +`, template, data.RandomInteger) +} + func (r DatabricksAccessConnectorResource) basic(data acceptance.TestData) string { template := r.template(data) return fmt.Sprintf(` diff --git a/website/docs/r/databricks_access_connector.html.markdown b/website/docs/r/databricks_access_connector.html.markdown index 5d80ca719e81..bb31360212ef 100644 --- a/website/docs/r/databricks_access_connector.html.markdown +++ b/website/docs/r/databricks_access_connector.html.markdown @@ -51,7 +51,7 @@ In addition to the Arguments listed above - the following Attributes are exporte An `identity` block supports the following: -* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values include `SystemAssigned` or `UserAssigned`. +* `type` - (Required) Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`. * `identity_ids` - (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to the Databricks Access Connector. Only one User Assigned Managed Identity ID is supported per Databricks Access Connector resource.