# Terraform: Error: Unsupported argument — An argument named "enable_foo" is not expected here

**Code:** `Unsupported argument: An argument named "x" is not expected here` · **Category:** Terraform · **Seen on:** Terraform

A resource/module block uses an argument the provider/module schema doesn't have.

## Meaning

Typos, an argument renamed/removed in a newer provider version (e.g. AWS provider v4/v5 split S3 bucket settings into separate resources), or placed in the wrong block. Check the provider docs for your version, `terraform providers schema -json`, and the module's variables (for modules use only declared input variables).

## Common causes

- Typo in the argument name
- Provider upgrade moved/removed the argument
- Argument belongs to a nested block
- Module doesn't declare that variable
- Using docs for another provider version

## Quick fix

1. Check provider docs for your pinned version
2. Move to the new resource/nested block
3. Add the variable to the module or fix the name

## Detailed fix by platform

### Terraform

1. `terraform version; terraform providers schema -json | jq '.provider_schemas'`

## How to diagnose

1. **Version** — Provider version?
2. **Docs** — Matching version?
3. **Module** — Variable exists?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/unsupported-argument-not-expected-here)
