How to produce a map from the cartesian product of two lists to use with for_each on a resource with Terraform
In 2 steps, you can first create your cartesian product in a variable:
locals {
  datadog_gke_clusters_by_pov = flatten([
    for cluster in var.datadog_gke_clusters : [
      for pov in var.gke_slo_ : {
        cluster    = cluster
        pov        = pov
      }
    ]
  ])
}

And then use this new variable in your resource block:
resource &quot;datadog_synthetics_test&quot; &quot;gke-monitoring&quot; {
  for_each = {
    for valuue in local.datadog_gke_clusters_by_pov : &quot;${valuue.cluster.name}-${valuue.pov.zone_name}&quot; =&gt; valuue
  }
...
# here you can use each.value.cluster.* and each.value.pov.*
}

Have a good day!