Skip to content
Latchkey

Terraform "Unsupported argument" in CI

A block contains an argument the schema does not recognize. The argument is misspelled, belongs to a nested block, or was renamed/removed in a newer provider or module version.

What this error means

validate/plan fails with "Unsupported argument", saying an argument "is not expected here". It frequently follows a provider or module upgrade that renamed, moved, or dropped the argument.

terraform output
Error: Unsupported argument

  on main.tf line 14, in resource "aws_instance" "web":
  14:   name = "web-server"

An argument named "name" is not expected here.

Common causes

Argument renamed or removed by an upgrade

A newer provider or module version renamed (e.g. nametags.Name) or removed the argument, so the old name is no longer accepted.

Wrong place or typo

A typo, or putting a nested-block argument at the top level (or vice versa), makes the schema reject it as unexpected.

How to fix it

Use the argument the current schema expects

Check the provider/module docs for the version you run and use the correct argument name and placement.

main.tf
resource "aws_instance" "web" {
  ami           = var.ami
  instance_type = "t3.micro"
  tags = { Name = "web-server" }   # not a top-level "name"
}

Reconcile after upgrades

  1. Read the provider/module changelog for renamed or removed arguments.
  2. Update the config to the new argument names and nesting.
  3. Run terraform validate to confirm no other arguments are unsupported.

How to prevent it

  • Review provider/module upgrade notes for argument changes.
  • Pin provider and module versions so schemas don’t shift unexpectedly.
  • Run terraform validate in CI to catch unsupported arguments before apply.

Frequently asked questions

What causes ""Unsupported argument""?
A newer provider or module version renamed (e.g. name → tags.Name) or removed the argument, so the old name is no longer accepted.
How do I fix "Unsupported argument"?
Check the provider/module docs for the version you run and use the correct argument name and placement.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card