How to fix Error: Override values provided for resource without matching configuration in Terraform

TerraformINTERMEDIATEMEDIUMUpdated Dec 31, 2025· 137 views

This error occurs when you define overrides for resources that don't exist in your base Terraform configuration. Override files are meant to modify existing resources, not create new ones. This validation error prevents invalid configurations from being applied.

Quick fix

Fixes Error: Override values provided for resource without matching configuration

# Example _override.tf file that causes the error
resource "aws_instance" "web_server" {
  instance_type = "t2.large"  # Override value
}

# This would fail if aws_instance.web_server doesn't exist in base config
  1. Identify which resource the override references
  2. Check if the resource exists in base configuration
  3. Add the missing resource to base configuration
  4. Verify resource names match exactly
terraform — error
# Example _override.tf file that causes the error
resource "aws_instance" "web_server" {
instance_type = "t2.large" # Override value
}
# This would fail if aws_instance.web_server doesn't exist in base config
Error: Override values provided for resource without matching configuration

What this error means

Terraform has special handling for override files (ending in _override.tf or _override.tf.json) that allow you to selectively override portions of your configuration. However, these overrides must reference resources that already exist in your base configuration files. When Terraform detects an override block for a resource address that doesn't have a matching resource definition in your regular configuration files, it raises this error. The override system is designed to merge with existing blocks, not to define new resources from scratch.

Typical symptoms

  • Error message explicitly states 'Override values provided for resource without matching configuration'
  • Error occurs when running terraform plan or terraform apply
  • You have an _override.tf or override.tf file in your configuration directory
  • The resource referenced in the override file doesn't exist in your base .tf files
  • Error disappears when you remove the override file

Common causes

  1. Override file references a resource that was deleted from the base configuration but not removed from the override
  2. Typo or mismatch in the resource type or name between override and base configuration
  3. Override file exists but the corresponding resource block is missing from the base configuration
  4. Attempting to use override files as a way to create new resources instead of modifying existing ones
  5. Copy-paste error where an override block was created for a resource that was never defined

How to fix "Error: Override values provided for resource without matching configuration"

1Identify which resource the override references

Open your override file (_override.tf or override.tf) and note the exact resource address being overridden. The error message should tell you which resource is problematic.

hcl
# Example _override.tf file that causes the error
resource "aws_instance" "web_server" {
  instance_type = "t2.large"  # Override value
}

# This would fail if aws_instance.web_server doesn't exist in base config

Document the resource type and name exactly as it appears in the override block.

2Check if the resource exists in base configuration

Search your base configuration files (.tf files excluding override files) to verify the resource is actually defined. Use grep to find the resource:

bash
# Search for the resource in base config (non-override files)
grep -r "resource \"aws_instance\" \"web_server\"" . --include="*.tf" | grep -v override

# Or search more broadly
grep -r "aws_instance" . --include="*.tf" | grep -v override

The resource must exist in a file that does NOT end in _override.tf or override.tf.

3Add the missing resource to base configuration

If the resource doesn't exist in your base config, add it. The override file cannot create resources—it can only modify existing ones. Create the base resource definition first:

hcl
# main.tf - Add the missing resource
resource "aws_instance" "web_server" {
  ami           = "ami-12345678"
  instance_type = "t2.micro"  # Base value
  tags = {
    Name = "web-server"
  }
}

# _override.tf - Now you can override it
resource "aws_instance" "web_server" {
  instance_type = "t2.large"  # Override replaces this
}

The base resource must include at minimum the required arguments for the resource type.

4Verify resource names match exactly

Ensure the resource type and name in the override block exactly match the base configuration. Terraform resource addresses are case-sensitive and must be precise:

hcl
# INCORRECT - Names don't match
# main.tf
resource "aws_instance" "web_server" { ... }

# _override.tf (WRONG)
resource "aws_instance" "webserver" { ... }  # Missing underscore

# CORRECT - Exact match
# main.tf
resource "aws_instance" "web_server" { ... }

# _override.tf (RIGHT)
resource "aws_instance" "web_server" { ... }  # Exact match

Double-check for typos, missing underscores, or differences in capitalization between the two blocks.

5Remove orphaned override blocks

If a resource no longer exists in your configuration and you no longer need the override, remove the override block entirely:

hcl
# _override.tf - DELETE EVERYTHING IN THIS BLOCK
resource "aws_instance" "old_server" {
  instance_type = "t2.small"
}

# If you don't need this override anymore, remove it completely

If the override file becomes empty, you can delete the file entirely. Terraform will warn if you have only override files and no base configuration.

6Run terraform validate and plan

After making corrections, validate your configuration and run a plan to confirm the error is resolved:

bash
# Validate syntax and semantics
terraform validate

# Run plan to ensure no errors
terraform plan

The plan output should show no override-related errors. Review the changes Terraform intends to make to verify they match your expectations.

Advanced notes

Override files are most useful in specific scenarios like Terraform Cloud/Enterprise where programmatically-generated JSON overrides need to coexist with human-edited HCL configuration. However, for most use cases, it's cleaner to use variables and conditional logic instead of override files.

If you're encountering this error frequently, consider whether you're using override files correctly. A resource definition should never exist ONLY in an override file—it violates Terraform's design principle that override files merge with (not replace) base configuration.

When working in teams, make sure all team members understand override file naming conventions and keep override changes well-documented, as they can make configuration harder to understand.

Frequently asked questions

What does "Error: Override values provided for resource without matching configur" mean?
json) that allow you to selectively override portions of your configuration. However, these overrides must reference resources that already exist in your base configuration files. When Terraform detects an override block for a resource address that doesn't have a matching resource definition in your regular configuration files, it raises this error.
How do I fix "Error: Override values provided for resource without matching configur"?
This error occurs when you define overrides for resources that don't exist in your base Terraform configuration. Override files are meant to modify existing resources, not create new ones. This validation error prevents invalid configurations from being applied.
What causes "Error: Override values provided for resource without matching configur"?
Override file references a resource that was deleted from the base configuration but not removed from the override Typo or mismatch in the resource type or name between override and base configuration Override file exists but the corresponding resource block is missing from the base configuration
Is the "Error: Override values provided for resource without matching configur" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading