# Terraform plan showing error even variable is declared and passed value

**URL:** <https://discuss.hashicorp.com/t/terraform-plan-showing-error-even-variable-is-declared-and-passed-value/55833>\
**Category:** Terraform\
**Created:** [July 7, 2023, 10:06pm UTC](https://discuss.hashicorp.com/t/terraform-plan-showing-error-even-variable-is-declared-and-passed-value/55833 "2023-07-07T22:06:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachanasinghr4](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rachanasinghr4](https://discuss.hashicorp.com/u/rachanasinghr4)\
**Post date:** [July 7, 2023, 10:06pm UTC](https://discuss.hashicorp.com/t/terraform-plan-showing-error-even-variable-is-declared-and-passed-value/55833/1 "2023-07-07T22:06:26Z")

</div>

Hi

My terraform plan showing below error, variable is declared and being passed still getting error

var.iexams\_vpcpeers  
Map of vpc peerings used for indirect reference by iexams\_networks.

Enter a value:

Error: Invalid expression

on line 1:  
(source code not available)

Expected the start of an expression, but found an invalid expression token.

Error: No value for required variable

on variables.tf line 121:  
121: variable “iexams\_vpcpeers” {

The root module input variable “iexams\_vpcpeers” is not set, and has no  
default value. Use a -var or -var-file command line argument to provide a  
value for this variable.

Below is my .tfvar

iexams\_vpcpeers = {

# mgmt\_idmz = “pcx-030541d86633eb85a”

eapp\_iegress = “pcx-088b39c21a265f858”  
iegressnp\_eapp = “pcx-0a40e06e33abc5499”  
iegressnp\_mgmt = “pcx-08872d1da3dfdff87”  
eapp\_aapp = “pcx-04c0d31d6c020f030”  
aapp\_mgmt = “pcx-00c78866a58c47b52”  
mgmt\_eapp = “pcx-01a2855519c73a6ac”  
mgmt\_mgmt2 = “pcx-0344a8b2ceb04e258”

# mgmt\_bastion = “pcx-0b2cf3985e9734f60”

# bastion\_idmz = “pcx-06aedb3a022827e8c”

# bastion\_aapp = “pcx-04c57ce99d29f6ec2”

# bastion\_eapp = “pcx-08bd50934c787ef37”

iexams\_uat\_mims = “pcx-09a55804da32c757c”  
}

Var.tf

variable “iexams\_vpcpeers” {  
type = map(any)  
description = “Map of vpc peerings used for indirect reference by iexams\_networks.”  
}

Can help what could be the issue
