Error map

Resource is tainted and must be replaced Terraform: # aws_instance.web is tainted, so must be replaced — -/+ destroy and then create replacement

Terraform · layer 6, Platform & cloud

Open the full error page →

Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Resource is tainted and must be replaced — Terraform: # aws_instance.web is tainted, so must be replaced — -/+ destroy and then create replacement (Terraform)Resource is…Error creating resource: already exists (needs import) — Terraform: Error: creating S3 Bucket (my-bucket): BucketAlreadyOwnedByYou / EntityAlreadyExists: Role with name x already exists (Terraform)Error creating reso…timeout while waiting for state to become 'available' — Terraform: Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s) (Terraform)timeout while waiti…Error running command: exit status 1 (local-exec/remote-exec) — Terraform: Error: local-exec provisioner error — Error running command './deploy.sh': exit status 1. Output: ... (Terraform)Error running comma…Backend configuration changed (migrate or reconfigure) — Terraform: Error: Backend configuration changed — A change in the backend configuration has been detected, which may require migrating existing state (Terraform)Backend configurati…Cannot import non-existent remote object — Terraform: Error: Cannot import non-existent remote object — While attempting to import an existing object to "aws_s3_bucket.logs", the provider detected that no object exists with the given id (Terraform)Cannot import non-e…Provider produced inconsistent result after apply — Terraform: Error: Provider produced inconsistent result after apply — When applying changes to aws_x.y, provider produced an unexpected new value: Root resource was present, but now absent (Terraform)Provider produced i…Instance cannot be destroyed (lifecycle.prevent_destroy) — Terraform: Error: Instance cannot be destroyed — Resource aws_db_instance.prod has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed (Terraform)Instance cannot be …Provider configuration not present (removed resource) — Terraform: Error: Provider configuration not present — its original provider configuration is required, but it has been removed (Terraform)Provider configurat…Invalid target address / No matching objects found (state commands) — Terraform: Error: Invalid target address — No matching objects found. To view the available instances, use "terraform state list" (Terraform)Invalid target addr…AlreadyExists — Error from server (AlreadyExists): ... already exists (Kubernetes)AlreadyExistsfield is immutable — The Deployment is invalid: spec.selector: Invalid value: field is immutable (Kubernetes)field is immutableunknown field — strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl" (Kubernetes)unknown fieldTask timed out — AWS Lambda: Task timed out after X seconds (AWS)Task timed outEndpoint request timed out — API Gateway: {"message": "Endpoint request timed out"} (504 after 29 seconds) (AWS)Endpoint request ti…exceeded the maximum execution time — GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes (CI/CD)exceeded the maximu…No valid credential sources found (AWS provider) — Terraform: Error: No valid credential sources found — failed to refresh cached credentials, no EC2 IMDS role found / Error: configuring Terraform AWS Provider: no valid credential sources (Terraform)No valid credential…UnauthorizedOperation / AccessDenied during Terraform apply — Terraform: Error: creating EC2 Instance: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::123:user/ci is not authorized to perform: ec2:RunInstances (Terraform)UnauthorizedOperati…Invalid AWS Region — Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity (Terraform)Invalid AWS RegionError acquiring the state lock — Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked (Terraform)Error acquiring the…state snapshot was created by a newer Terraform version — Terraform: Error: state snapshot was created by Terraform v1.9.0, which is newer than current v1.6.6; upgrade to Terraform v1.9.0 or greater to work with this state (Terraform)state snapshot was …Backend initialization required — Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3" (Terraform)Backend initializat…Error reading resource: not found (deleted outside Terraform) — Terraform: Error: reading EC2 Instance (i-0abc): couldn't find resource / 404 ResourceNotFound during refresh (Terraform)Error reading resou…Moved object still exists — Terraform: Error: Moved object still exists — This statement declares a move from aws_x.old, but that resource instance is still declared at main.tf (Terraform)Moved object still …Provider produced invalid plan / inconsistent final plan — Terraform: Error: Provider produced invalid plan — provider produced an invalid plan for aws_x.y, but we are tolerating it because it is using the legacy plugin SDK (Terraform)Provider produced i…DependencyViolation: resource has dependent objects (destroy) — Terraform: Error: deleting EC2 VPC (vpc-0abc): DependencyViolation: The vpc 'vpc-0abc' has dependencies and cannot be deleted (Terraform)DependencyViolation…BucketNotEmpty: bucket you tried to delete is not empty — Terraform: Error: deleting S3 Bucket (my-bucket): BucketNotEmpty: The bucket you tried to delete is not empty (Terraform)BucketNotEmpty: buc…Inconsistent dependency lock file — Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected (Terraform)Inconsistent depend…Reference to undeclared resource — Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable (Terraform)Reference to undecl…Failed to query available provider packages — Terraform: Error: Failed to query available provider packages — Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints (Terraform)Failed to query ava…invalid reference format — docker: invalid reference format (repository name must be lowercase) (Docker)invalid reference f…No such container — Error response from daemon: No such container (Docker)No such containeris not running — Error response from daemon: Container X is not running (Docker)is not running

Directly related (9)

Error creating resource: already exists (needs import)Terraform

Terraform: Error: creating S3 Bucket (my-bucket): BucketAlreadyOwnedByYou / EntityAlreadyExists: Role with name x already exists

The resource exists outside Terraform's state (created manually or by another stack), so create fails.

timeout while waiting for state to become 'available'Terraform

Terraform: Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s)

The resource didn't reach the target state before the provider's timeout.

Error running command: exit status 1 (local-exec/remote-exec)Terraform

Terraform: Error: local-exec provisioner error — Error running command './deploy.sh': exit status 1. Output: ...

A `local-exec`/`remote-exec` provisioner command failed, so the resource is marked tainted.

Backend configuration changed (migrate or reconfigure)Terraform

Terraform: Error: Backend configuration changed — A change in the backend configuration has been detected, which may require migrating existing state

The saved backend settings in `.terraform` differ from the current configuration.

Cannot import non-existent remote objectTerraform

Terraform: Error: Cannot import non-existent remote object — While attempting to import an existing object to "aws_s3_bucket.logs", the provider detected that no object exists with the given id

`terraform import` (or an import block) used an ID that the provider can't find.

Provider produced inconsistent result after applyTerraform

Terraform: Error: Provider produced inconsistent result after apply — When applying changes to aws_x.y, provider produced an unexpected new value: Root resource was present, but now absent

After creating/updating a resource, the provider returned values that don't match what Terraform planned — usually a provider bug…

Instance cannot be destroyed (lifecycle.prevent_destroy)Terraform

Terraform: Error: Instance cannot be destroyed — Resource aws_db_instance.prod has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed

The plan would destroy a resource protected with `lifecycle { prevent_destroy = true }`.

Provider configuration not present (removed resource)Terraform

Terraform: Error: Provider configuration not present — its original provider configuration is required, but it has been removed

A resource in state needs a provider configuration (alias) that no longer exists in the code.

Invalid target address / No matching objects found (state commands)Terraform

Terraform: Error: Invalid target address — No matching objects found. To view the available instances, use "terraform state list"

A state/target command referenced an address that doesn't exist in state.

Two steps away (23)

AlreadyExistsKubernetes

Error from server (AlreadyExists): ... already exists

kubectl create tried to make an object whose name is already taken in that namespace.

field is immutableKubernetes

The Deployment is invalid: spec.selector: Invalid value: field is immutable

You tried to change a field Kubernetes doesn’t allow to change after creation — Deployment selectors, Job templates, Service clus…

unknown fieldKubernetes

strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl"

The manifest contains a field the API schema doesn’t know — a typo, wrong indentation, or a field from another API version.

Task timed outAWS

AWS Lambda: Task timed out after X seconds

The function ran longer than its configured timeout (default 3 seconds) and Lambda stopped it.

Endpoint request timed outAWS

API Gateway: {"message": "Endpoint request timed out"} (504 after 29 seconds)

The backend (usually Lambda) didn’t respond within API Gateway’s integration timeout (29 seconds by default for REST APIs).

exceeded the maximum execution timeCI/CD

GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes

A job ran longer than its time limit — your `timeout-minutes`, or the 6-hour (360 minute) platform limit — and was cancelled.

No valid credential sources found (AWS provider)Terraform

Terraform: Error: No valid credential sources found — failed to refresh cached credentials, no EC2 IMDS role found / Error: configuring Terraform AWS Provider: no valid credential sources

The AWS provider found no credentials (env vars, shared config, SSO, role, instance profile).

UnauthorizedOperation / AccessDenied during Terraform applyTerraform

Terraform: Error: creating EC2 Instance: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::123:user/ci is not authorized to perform: ec2:RunInstances

The IAM identity used by Terraform lacks a permission needed for that resource.

Invalid AWS RegionTerraform

Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity

The `region` is invalid/unavailable, or the provider can't reach AWS endpoints to validate credentials.

Error acquiring the state lockTerraform

Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked

Another Terraform run holds the state lock, or a previous run crashed and left the lock behind.

state snapshot was created by a newer Terraform versionTerraform

Terraform: Error: state snapshot was created by Terraform v1.9.0, which is newer than current v1.6.6; upgrade to Terraform v1.9.0 or greater to work with this state

The remote/local state was last written by a newer Terraform CLI than the one you're running.

Backend initialization requiredTerraform

Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3"

Terraform needs `terraform init` to set up the backend (new directory, changed backend config, missing `.terraform`).

Error reading resource: not found (deleted outside Terraform)Terraform

Terraform: Error: reading EC2 Instance (i-0abc): couldn't find resource / 404 ResourceNotFound during refresh

A resource tracked in state no longer exists in the cloud (deleted manually) or can't be read with current credentials.

Moved object still existsTerraform

Terraform: Error: Moved object still exists — This statement declares a move from aws_x.old, but that resource instance is still declared at main.tf

A `moved` block points at an address that is still present in the configuration.

Provider produced invalid plan / inconsistent final planTerraform

Terraform: Error: Provider produced invalid plan — provider produced an invalid plan for aws_x.y, but we are tolerating it because it is using the legacy plugin SDK

The provider changed planned values between plan and apply (a provider bug), so Terraform aborts.

DependencyViolation: resource has dependent objects (destroy)Terraform

Terraform: Error: deleting EC2 VPC (vpc-0abc): DependencyViolation: The vpc 'vpc-0abc' has dependencies and cannot be deleted

Destroy failed because something else still uses the resource (ENIs, subnets, gateways, security group rules).

BucketNotEmpty: bucket you tried to delete is not emptyTerraform

Terraform: Error: deleting S3 Bucket (my-bucket): BucketNotEmpty: The bucket you tried to delete is not empty

Terraform can't delete an S3 bucket that still holds objects (or versions).

Inconsistent dependency lock fileTerraform

Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected

The .terraform.lock.hcl file doesn’t match the providers/versions your configuration now requires, or init wasn’t run.

Reference to undeclared resourceTerraform

Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable

The configuration refers to a resource, data source, variable or module output that isn’t declared in this module.

Failed to query available provider packagesTerraform

Terraform: Error: Failed to query available provider packages — Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints

`terraform init` can't find a provider version matching your constraints (or can't reach the registry).

invalid reference formatDocker

docker: invalid reference format (repository name must be lowercase)

Docker couldn’t parse the image name — uppercase letters, spaces, an empty variable, or a misplaced option.

No such containerDocker

Error response from daemon: No such container

The container name or ID you used doesn’t exist on this Docker host — it was removed, has another name, or you’re talking to a di…

is not runningDocker

Error response from daemon: Container X is not running

You tried to exec into or interact with a container that has stopped.