How to call a resource from different subscription?

We need to send diagnostics to a log analytics workspace in a different subscription, however the data block doesnt let us specify the subscrition ID. If anyone has ever done this and can share the solution, it will be much appreciated.

hi,

example in our main.tf :

subscription 1

provider “azurerm” {
version = “~> 2.11.0”
features {}
subscription_id = SUB_ID
}

transversal subscription

provider “azurerm” {
version = “~> 2.11.0”
alias = transversal
features {}
subscription_id = TRANSVERSAL_SUB_ID
}

AND in your ressource (example) :

data “azurerm_key_vault” “mgmt” {
provider = azurerm.transversal
name = “{var.mgmt_key_vault_name}" resource_group_name = "{var.mgmt_resource_group_name}”
}