OpenTofu Error: 'Provider does not support resource type' — Cause, Fix, and Troubleshooting Guide
Fix OpenTofu 'Error: ... provider does not support resource type' from typos, missing/old providers, or wrong provider source addresses.
- #opentofu
- #iac
- #troubleshooting
- #errors
Fixing errors like this? Get 500 free DevOps AI prompts
500 copy-paste AI prompts for the stack you actually run — one PDF, free.
Overview
Each resource type belongs to a provider that must expose it in its schema. If you declare a resource type the resolved provider does not offer — a typo, a type added in a newer provider release, or a wrong provider mapping — OpenTofu cannot find it and stops during validation:
Error: Invalid resource type
on main.tf line 10, in resource "aws_s3_buckett" "logs":
10: resource "aws_s3_buckett" "logs" {
The provider registry.opentofu.org/hashicorp/aws does not support resource
type "aws_s3_buckett". Did you mean "aws_s3_bucket"?
Symptoms
tofu validate/planfails withdoes not support resource type(orInvalid resource type).- The message often suggests a near-match (“Did you mean …”).
- Appears after a typo, or when using a resource type newer than the pinned provider.
- Also occurs when the type maps to a provider you did not declare.
Common Root Causes
- Typo in the resource type —
aws_s3_buckett,google_compute_instnace. - Provider too old — the resource type exists only in a newer provider version.
- Provider not declared — the type’s prefix maps to a provider missing from
required_providers. - Wrong provider source — a fork/mirror lacking the resource type.
- Renamed/removed type across a provider major version.
How to diagnose
Read the suggested near-match, then confirm the correct type name:
tofu validate
tofu providers schema -json \
| jq '.provider_schemas["registry.opentofu.org/hashicorp/aws"].resource_schemas | keys' \
| grep -i bucket
Check the provider version you have versus what the type needs:
tofu version
grep -nA6 'required_providers' *.tf
Fixes
Fix the typo to the exact schema type name:
resource "aws_s3_bucket" "logs" { # was aws_s3_buckett
bucket = "example-logs"
}
Upgrade the provider if the resource type was added in a newer release:
terraform {
required_providers {
aws = { source = "hashicorp/aws", version = "~> 5.60" }
}
}
tofu init -upgrade
Declare the missing provider whose prefix the type uses:
terraform {
required_providers {
random = { source = "hashicorp/random" }
}
}
Re-validate:
tofu validate
What to watch out for
- The “Did you mean” hint is usually correct — trust it for typos.
- New resource types require a provider new enough to include them; check the provider changelog.
- The resource type prefix (
aws_,google_,azurerm_) must map to a declared provider source. - Pin providers so a resource type does not silently disappear on a downgrade.
Related
- OpenTofu Error: ‘Unsupported argument’ — Cause, Fix, and Troubleshooting Guide
- OpenTofu Error: ‘Provider produced inconsistent final plan’ — Cause, Fix, and Troubleshooting Guide
- OpenTofu Error: ‘Failed to query available provider packages’ — Cause, Fix, and Troubleshooting Guide
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.