title: Inappropriate value for the attribute cidr_block string is required
body: <p>Hi my terraform code is here</p>
  <p><strong>main.tf</strong></p>
  <pre><code>terraform {
    required_providers {
      aws = {
        source  = &quot;hashicorp/aws&quot;
        version = &quot;~&gt; 3.0&quot;
      }
    }
  }
  # Configure the AWS Provider
  provider &quot;aws&quot; {
    region = var.region
  }
  
  # DATA
  
  data &quot;aws_availability_zones&quot; &quot;available&quot; {}
  
  data &quot;template_file&quot; &quot;public_cidrsubnet&quot; {
    count    = var.subnet_count
    template = &quot;$${cidrsubnet(vpc_cidr,8,current_count)}&quot;
    vars = {
      vpc_cidr      = var.network_address_space
      current_count = count.index
    }
  }
  
  resource &quot;aws_vpc&quot; &quot;tf-aws-vn&quot; {
    cidr_block = var.network_address_space
    tags       = local.common_tags
    #name       = var.name
  }
  resource &quot;aws_subnet&quot; &quot;tf-aws-sn&quot; {
    count             = length(data.aws_availability_zones.available.names)
    vpc_id            = aws_vpc.tf-aws-vn.id
    cidr_block        = [data.template_file.public_cidrsubnet[*].rendered]
    availability_zone = slice(data.aws_availability_zones.available.names, 0, var.subnet_count)
    tags              = local.common_tags
  }
  </code></pre>
  <p><strong>variables.tf</strong></p>
  <pre><code>variable &quot;region&quot; {
    default = &quot;us-east-1&quot;
  }
  variable network_address_space {}
  
  variable name {
    type = string
  }
  variable &quot;subnet_count&quot; {
    type = number
  }
  </code></pre>
  <p>And finally!
  <strong>terraform.tfvars</strong></p>
  <pre><code>network_address_space = &quot;10.0.0.0/16&quot;
  subnet_count          = 2
  </code></pre>
  <p>I'm getting error like below:</p>
  <pre><code>Error: Incorrect attribute value type
  
    on main.tf line 36, in resource &quot;aws_subnet&quot; &quot;tf-aws-sn&quot;:
    36:   cidr_block        = [data.template_file.public_cidrsubnet[*].rendered]
  
  Inappropriate value for attribute &quot;cidr_block&quot;: string required.
  </code></pre>
  <p>What is the issue?</p>
  <p>I want to create n subnets for any address range I provide</p>
  <p><strong>My terraform version is 0.13.5</strong></p>