Skip to content
Latchkey

Terraform "Unsupported argument" in a resource or block in CI

Terraform validates every argument against the resource or provider schema. "Unsupported argument" means the name you set is not part of that schema, usually a typo or an argument removed or renamed in a newer provider version.

What this error means

validate or plan fails with "Error: Unsupported argument" and "An argument named ... is not expected here." at the line that sets it.

Terraform
Error: Unsupported argument

  on main.tf line 8, in resource "aws_instance" "web":
   8:   instance_typ = "t3.micro"

An argument named "instance_typ" is not expected here.

Common causes

A typo or wrong argument name

The argument is misspelled or does not belong to this resource type, so the schema rejects it.

A provider upgrade removed or renamed the argument

CI resolved a newer provider where the argument was renamed, deprecated out, or moved into a nested block.

How to fix it

Match the argument to the provider schema

  1. Open the resource docs for the provider version CI resolved.
  2. Rename or remove the argument to match the current schema.
  3. Pin the provider version if you need the older argument shape.
main.tf
resource "aws_instance" "web" {
  instance_type = "t3.micro"
}

Pin the provider that defines the argument

If an upgrade removed the argument, pin the provider to a version that still supports it while you migrate.

versions.tf
required_providers {
  aws = {
    source  = "hashicorp/aws"
    version = "~> 5.30"
  }
}

How to prevent it

  • Pin provider versions so schemas do not shift under CI.
  • Read the provider upgrade guide before bumping major versions.
  • Run validate in CI to catch schema mismatches early.

Frequently asked questions

What causes ""Unsupported argument""?
The argument is misspelled or does not belong to this resource type, so the schema rejects it.
How do I fix "Unsupported argument"?
Match the argument to the provider schema

Related guides

References

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