Cannot destory terraform workspace, for_each map keys depend on data

I am trying to destroy the existing terraform application. The terraform version is 1.3.3.

It’s using GitHub - terraform-aws-modules/terraform-aws-eks: Terraform module to create an Elastic Kubernetes (EKS) cluster and associated resources πŸ‡ΊπŸ‡¦ module.

When running terraform destroy I have the following error:

β”‚ Error: Invalid for_each argument
β”‚   on ../terraform-aws-eks/ line 71, in resource "aws_ec2_tag" "cluster_primary_security_group":
β”‚   71:   for_each = { for k, v in merge(var.tags, var.cluster_tags, data.aws_default_tags.current.tags) :
β”‚   72:     k => v if local.create && k != "Name" && var.create_cluster_primary_security_group_tags
β”‚   73:   }
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     β”‚ data.aws_default_tags.current.tags is a map of string, known only after apply
β”‚     β”‚ local.create is true
β”‚     β”‚ var.cluster_tags is map of string with 1 element
β”‚     β”‚ var.create_cluster_primary_security_group_tags is true
β”‚     β”‚ var.tags is map of string with 2 elements
β”‚ The "for_each" map includes keys derived from resource attributes that cannot be determined until apply, and so Terraform cannot determine the full set of keys that will identify the instances of this resource.
β”‚ When working with unknown values in for_each, it's better to define the map keys statically in your configuration and place apply-time results only in the map values.
β”‚ Alternatively, you could use the -target planning option to first apply only the resources that the for_each value depends on, and then apply a second time to fully converge.

As can be seen, the map keys depend on the data field, which is causing issues when trying to destroy the terraform config. The creation path works fine

Seems this is due -refresh=true flag; since it runs equivalent of terraform refresh which has the same error when just running that.