How to grant Owner on Resource Group to service principal?

Hello everyone!!

Is it possible somehow to grant Owner on Resource Group to service principal?? I have a >

resource "azurerm_role_assignment" "role_assignment" {
    scope              = module.rg.id
    role_definition_id = "Owner"
    principal_id       = var.client_id
    depends_on = [module.rg]
}

But it ignores ID in scope…