Terraform: Error: Unsupported argument — An argument named "enable_foo" is not expected here
A resource/module block uses an argument the provider/module schema doesn't have.
Error: Unsupported argumentAn argument named "enable_foo" is not expected hereError: Unsupported argument: An argument named "acl" is not expected hereError: Unsupported argument ... is not expected here. Did you meanError: Unsupported argument An argument named "versioning" is not expected here 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
- Check provider docs for your pinned version
- Move to the new resource/nested block
- Add the variable to the module or fix the name
Detailed fix by platform
Terraform
terraform version; terraform providers schema -json | jq '.provider_schemas'
How to diagnose
- Version — Provider version?
- Docs — Matching version?
- Module — Variable exists?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Duplicate resource configuration / variable declaration Terraform: Error: Duplicate resource "aws_s3_bucket" configuration — A aws_s3_bucket resource named "logs" was already declared at main.tf:1
- Invalid AWS Region Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity
- Invalid character / Argument or block definition required Terraform: Error: Invalid character — This character is not used within the language / Error: Argument or block definition required
Most viewed in Terraform
- Error acquiring the state lock Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked
- Inconsistent dependency lock file Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected
- Reference to undeclared resource Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026