MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Terraform Error: Warning: Value for undeclared variable

Uncategorized

Error

C:\Users\Rajesh Kumar\Desktop\Terarform\ws>terraform plan
╷
│ Warning: Value for undeclared variable
│
│ The root module does not declare a variable named "mytags" but a value was found in file "terraform.tfvars". If you
│ meant to use this value, add a "variable" block to the configuration.
│
│ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all
│ configurations in your organization. To reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Error: Reference to undeclared input variable
│
│   on main.tf line 7, in resource "aws_instance" "dbserver":
│    7:     Name = var.mytags
│
│ An input variable with the name "mytags" has not been declared. This variable can be declared with a variable
│ "mytags" {} block.
╵

Solution

Make sure you declare variable

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x