# Terraform: Error: No value for required variable — The root module input variable "region" is not set, and has no default value

**Code:** `No value for required variable` · **Category:** Terraform · **Seen on:** Terraform

A variable without a default wasn't supplied.

## Meaning

Provide it: `-var region=eu-west-1`, a `terraform.tfvars`/`*.auto.tfvars` file, `-var-file`, or `TF_VAR_region`. In CI (non-interactive) Terraform can't prompt (`-input=false`) so the run fails. Add defaults for optional values.

## Common causes

- Variable has no default and isn't passed
- tfvars filename not auto-loaded
- CI run with `-input=false`
- Environment variable name case wrong (`TF_VAR_Region`)
- Module call missing the argument

## Quick fix

1. Pass `-var`/`-var-file` or set `TF_VAR_name`
2. Name the file `terraform.tfvars` or `*.auto.tfvars`
3. Add `default = ...` where sensible

## Detailed fix by platform

### Terraform

1. `TF_VAR_region=eu-west-1 terraform plan -input=false`

## How to diagnose

1. **Variable** — Default?
2. **File** — Auto-loaded?
3. **CI** — input=false?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/no-value-for-required-variable)
