Iterrate over keys from vault

Hey, im trying to create a dynamic security policy in gcp using values I get from vault.
Ive wrote the following, the each.value and each.key will be in the expression once ill get it working, im just putting it in the description for now so ill see if it work.

data "vault_generic_secret" "whitelist" {
path = "devops/cloudcore-${terraform.workspace}/test"
}
resource "google_compute_security_policy" "public" {
name = "public"
project = "${var.project}-${terraform.workspace}"
dynamic "rule" {
for_each = data.vault_generic_secret.whitelist.data
content {
action = "deny"
priority = "5${index(each.key, each.value)}"
match {
expr {
expression = "!inIpRange(origin.ip, '1.1.1.1') && request.headers['host'].lower().contains('hello.site.com')"
}
}
description = "${each.value} ${each.key}"
}
}

So currently, i have only 1 key in this vault. key- hello value-world. It works fine if i do that:
data.vault_generic_secret.whitelist.data["hello"]

without any looping and such. but what I want to do is create this rule X amount of time depending on the amount of keys I have.

Currently im getting this error:

│ Cannot use a map of string value in for_each. An iterable collection is required.

I could use some help. i tried to use tomap
for_each = tomap(data.vault_generic_secret.whitelist.data)
or for_each = jsondecode(data.vault_generic_secret.whitelist.data)

no success.