No output from ARM template

I have got a script which uses a ‘azurerm_template_deployment’ resource called ‘dataDiskId’.
This ‘azurerm_template_deployment’ gets the ARM template via ‘template_body’.

The ARM templates use the following code in the ‘outputs’ section:
“outputs”: {
“dataDiskId”: {
“type”: “string”,
“value”: “[resourceId(‘Microsoft.Compute/disks’,parameters(‘dataDiskName’))]”
}
}

Was trying to get the value ‘dataDiskId’ and use it in the rest of my TF script by using the following code below the ‘azurerm_template_deployment’ resource.
output “dataDiskId” {
value = azurerm_template_deployment.shareddisk.outputs[“dataDiskId”]
}

(also tried ’ value = “${lookup(azurerm_template_deployment.shareddisk.outputs, “dataDiskId”)}”’)

I never get a value out of the script. It always returns:
azurerm_template_deployment.shareddisk.outputs is empty map of string

Using AZURERM v. 2.29.0
Anyone any idea?