I am a bit confused using datasource. I am new comer for TF, it is tall task for me

We have naming standard for creating Resource Group and it is created by different via ticketing system. For that we if I request a resource group for dns. The system will create rg-dns-region for all the regions.
I want use the region created above using data source.

data "azurerm_resource_group" "rg" {
  for_each = toset(["eastus", "westus", "westus2", "westus3", "southcentralus", "westcentralus", "northcentralus"])
  name     = "${"rg-dns"}-${each.value}"
output "rg_name" {
  value = [for g in data.azurerm_resource_group.rg : g.name]

The above command yield the following output.

rg_name = [

The above script works for the output but not able to tie the storage account creation.

#Storage Block
resource "azurerm_storage_account" "storage" {
  for_each = toset(["eastus", "westus", "westus2", "westus3", "southcentralus", "westcentralus", "northcentralus"])
  name = lower("sadns00${each.value}")
  resource_group_name       = [for g in data.azurerm_resource_group.rg : g.name]
  location                  = each.key
  tags                      = var.resource_tags
  account_kind              = "StorageV2"
  account_tier              = "Standard"
  account_replication_type  = var.replicationType
  enable_https_traffic_only = true
  min_tls_version           = "TLS1_2"

│ Error: Incorrect attribute value type

│ on storage.tf line 19, in resource “azurerm_storage_account” “storage”:
│ 19: resource_group_name = [for g in data.azurerm_resource_group.rg : g.name]
│ ├────────────────
│ │ data.azurerm_resource_group.rg is object with 7 attributes

│ Inappropriate value for attribute “resource_group_name”: string required.

Can someone please assist me what I am missing. I feel like I am close but I could not figure out how to create storage account using for loops.