Cloudsql sql server with read replica

cloudsql sql server with read replica by terraform workspace
module “mysql” {
source = “.//modules/cloudsql-mysql”
count = length(var.database_names[terraform.workspace])
name = var.database_names[terraform.workspace][count.index]
project_id = var.project_id[terraform.workspace]
database_version = “MYSQL_5_7”
region = var.region[terraform.workspace]

// Master configurations
tier = var.tier[terraform.workspace]
zone = var.zone[terraform.workspace]
availability_type = var.availability_type[terraform.workspace]
maintenance_window_day = 5
maintenance_window_hour = 19
maintenance_window_update_track = “stable”

database_flags = var.database_flags[terraform.workspace]
user_labels = var.user_labels[terraform.workspace]
ip_configuration = {
ipv4_enabled = true
require_ssl = false
private_network = “projects/{var.project_id[terraform.workspace]}/global/networks/{var.vpc_network[terraform.workspace]}”
authorized_networks =
}
disk_size = var.disk_size[terraform.workspace]
user_name = “searce”
user_password = “searce123”
depends_on = [module.vpc]
/*
{
if [ “test” = “true” ]
then
echo “PROD build is used, the PROD AWS tokens will be used”
else
echo “DEV build is used, the DEV AWS tokens will be used”
fi
}
*/

backup_configuration = {

enabled = false

binary_log_enabled = false

start_time = “00:00”

location = null

}

// Read replica configurations
/*
if [[ ${TF_WORKSPACE} == “production” ]]
then
read_replica_name_suffix = “”
read_replicas = [
{
name = “-”
zone = var.zone[terraform.workspace]
tier = var.tier[terraform.workspace]
ip_configuration = local.read_replica_ip_configuration
database_flags = var.replica_database_flags[terraform.workspace]
disk_autoresize = true
disk_size = var.disk_size[terraform.workspace]
disk_type = “PD_SSD”
user_labels = var.user_labels[terraform.workspace]
},
]
else
echo “DEV build is used”
fi
*/
}

I have to execute read replica block code when terraform.workspace == production only.
how can we achieve this?
Please anyone can help me that