I am trying to assign User Assigned Managed identity to Azure Synapse
I have the following Terraform Code
// Create synapse User Assigned Identity
resource "azurerm_user_assigned_identity" "uai_synapse" {
resource_group_name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
name = var.uai_synapse
}
// Create Synapse Workspace
resource "azurerm_synapse_workspace" "synapsews" {
name = var.dat_synapse_ws
resource_group_name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
storage_data_lake_gen2_filesystem_id = azurerm_storage_data_lake_gen2_filesystem.datalake-config.id
sql_identity_control_enabled = true
sql_administrator_login = var.synapse_sql_administrator_login
sql_administrator_login_password = var.synapse_sql_administrator_login_password
managed_virtual_network_enabled = true
aad_admin {
login = data.azuread_user.user.mail
object_id = data.azuread_user.user.object_id
tenant_id = data.azurerm_client_config.current.tenant_id
}
identity {
type = "SystemAssigned"
}
depends_on = [ azurerm_storage_account.datalake ]
}
But I don't see any option to Assign the User Assigned Identity to Azure Synapse Workspace, please suggest.
Note: Please leave a comment before voting down.. so that I will know why exactly this is marked down..!
CodePudding user response:
According to the documentation, you cannot do it:
Source: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/synapse_workspace#principal_id