It looks like the problem was that I didn't add this section in my aks terraform template:
monitor_metrics {
annotations_allowed = var.metric_annotations_allowlist
labels_allowed = var.metric_labels_allowlist
}
Now I can see the aks cluster in the azure monitor workspace.