Terraform create new firewall rule

Hi All,
I am trying to create firewall rule in google VPC, however getting this error

Can’t access attributes on a list of objects. Did you mean to access attribute “ip_cidr_range” for a specific element of the list, or across all elements of the list?

data “google_compute_network” “vpc” {
name = “my-vpc”
project = “my-project”

data “google_compute_subnetwork” “subnetwork” {
for_each = toset(data.google_compute_network.vpc.subnetworks_self_links)
self_link = each.value

resource “google_compute_firewall” “composer-firewall-rule” {
name = “allow-egress-from-composer-control-plane”
description = “Allow Egress traffic from k8 nodes to Control Plane”
network = data.google_compute_network.vpc
project = var.DEPLOY_PROJECT
priority = 980
allow { protocol = “all” }
direction = “EGRESS”
disabled = false
source_ranges = data.google_compute_subnetwork.subnetwork.secondary_ip_range.ip_cidr_range

Any idea how can I fetch secondary ip range from existing subnets & push them to new fire wall rules ?