Creating aws global cluster ; identifier not working

Hey everyone,

I’m trying to get this tutorial to work https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_global_cluster#attributes-reference

Currently the configuration I’m using looks like this, which is failing when I use terraform plan to see how it will work.

resource "aws_rds_global_cluster" "example" {
  global_cluster_identifier = "global-test"

  database_name             = "example"
  engine                    = "aurora-postgresql"
  engine_version            = "12.6"
 
  
}

resource "aws_rds_cluster" "primary" {
  # provider           = aws.primary
  count = "${local.resourceCount == "2" ? "1" : "0"}"
  identifier             = "kepler-example-global-cluster-${lookup(var.kepler-env-name, var.env)}-${count.index}"
  database_name             = "example"
  engine                    = "aurora-postgresql"
  engine_version            = "12.6"
  vpc_security_group_ids = ["${var.rds_security_group_survey_id}"]

  # cluster_identifier        = aws_rds_global_cluster.example_global_cluster.id
  master_username           = "root"
  master_password           = "somepass123"

  # master_password           = var.credential
  global_cluster_identifier = aws_rds_global_cluster.example.id
  db_subnet_group_name      = var.db_subnet_group_id

}

At the moment I’m getting this error currently,

Error: Error loading modules: module openworld: Error parsing .terraform/modules/d375d2d1997599063f4fb9e7587fec26/main.tf: At 63:31: Unknown token: 63:31 IDENT aws_rds_global_cluster.example.id

I’m confused why this error would come up