title: Dependencies on another module variable? Getting Error "is a list of string, known only after apply │"
body: <p>I am getting error on &quot;This value does not have any attributes.&quot;. How do I setup dependencies that module vpc must runs prior?</p>
  <p>From the main file I call the following modules</p>
  <pre><code>module &quot;vpc&quot; {
    source      = &quot;../../modules/vpc&quot;
    environment = &quot;demo&quot;
  
  }
  
  module &quot;eks-cluster&quot; {
    source      = &quot;../../modules/eks-cluster&quot;
    environment = &quot;demo&quot;
    vpc_id      = module.vpc.my_vpc_id
    my_public_subnets = module.vpc.my_public_subnets_id
  }
  </code></pre>
  <p>main.tf within ../../modules/eks-cluster</p>
  <pre><code>resource &quot;aws_eks_cluster&quot; &quot;research-cluster&quot; {
    name     = var.my_cluster_name
    role_arn = aws_iam_role.research-cluster.arn
  
    vpc_config {
      security_group_ids = [aws_security_group.research-cluster.id]
      subnet_ids         = var.my_public_subnets.id
    }
  </code></pre>
  <p>Error I am getting</p>
  <pre><code>╷
  │ Error: Unsupported attribute
  │
  │   on ../../modules/eks-cluster/main.tf line 79, in resource &quot;aws_eks_cluster&quot; &quot;demo-cluster&quot;:
  │   79:     subnet_ids         = var.my_public_subnets.id
  │     ├────────────────
  │     │ var.my_public_subnets is a list of string, known only after apply
  │
  │ This value does not have any attributes.
  </code></pre>