Terraform Error: Invalid reference

Error: Invalid reference

  on github_resources.tf line 20, in resource "github_repository" "web":
  20:   name        = "${reponame}"

A reference to a resource type must be followed by at least one attribute
access, specifying the resource name.

Solution:

Declare variable with var. such as name = “${var.reponame}” instead of name = “${reponame}”

Rajesh Kumar
Follow me