title: Inappropriate value for attribute "vpc_id": string required
body: <p>I am setting my first terraform target groups and currently stuck in the middle.</p>
  <blockquote>
  <p>This is my resource code</p>
  </blockquote>
  <pre><code>resource &quot;aws_lb_target_group&quot; &quot;ami_tg&quot; {
    name     = &quot;ami-lb-tg-${substr(uuid(), 0, 3)}&quot;
    port     = var.tg_port
    protocol = var.tg_protocol
    vpc_id   = var.vpc_id
    health_check {
      healthy_threshold   = var.elb_healthy_threshold
      unhealthy_threshold = var.elb_unhealthy_threshold
      timeout             = var.elb_timeout
      interval            = var.elb_interval
    }
  }
  </code></pre>
  <p>Obviously I passed over to my variable.tf file</p>
  <pre><code>variable &quot;tg_port&quot; {}
  variable &quot;tg_protocol&quot; {}
  variable &quot;elb_healthy_threshold&quot; {}
  variable &quot;elb_unhealthy_threshold&quot; {}
  variable &quot;elb_timeout&quot; {}
  variable &quot;elb_interval&quot; {}
  variable &quot;vpc_id&quot; {}
  </code></pre>
  <p>Then added to my root/main.tf module file</p>
  <pre><code>   module &quot;alb&quot; {
    source                  = &quot;./alb&quot;
    tg_port                 = 80
    tg_protocol             = &quot;HTTP&quot;
    vpc_id                  = module.networking.vpc_id
    elb_healthy_threshold   = 2
    elb_unhealthy_threshold = 2
    elb_timeout             = 3
    elb_interval            = 30
  }
  </code></pre>
  <p>But I keep getting the below error whenever I run terraform plan ;</p>
  <pre><code>Error: Incorrect attribute value type
  
    on alb/main.tf line 16, in resource &quot;aws_lb_target_group&quot; &quot;ami_tg&quot;:
    16:   vpc_id   = var.vpc_id
      |----------------
      | var.vpc_id is object with 19 attributes
  
  Inappropriate value for attribute &quot;vpc_id&quot;: string required.
  </code></pre>
  <p>Any suggestions here will be appreciated</p>