Error map

Error loading state: AccessDenied (S3 backend) Terraform: Error: Failed to load state: AccessDenied: Access Denied / Error refreshing state: AccessDenied status code: 403

Terraform · layer 6, Platform & cloud

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). 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.

Error loading state: AccessDenied (S3 backend) — Terraform: Error: Failed to load state: AccessDenied: Access Denied / Error refreshing state: AccessDenied status code: 403 (Terraform)Error loadi…Error acquiring the state lock — Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked (Terraform)Error acquiring the…IAM AccessDeniedException — AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ... (AWS)IAM AccessDeniedExc…S3 backend: NoSuchBucket / bucket does not exist — Terraform: Error: Failed to get existing workspaces: S3 bucket "my-tf-state" does not exist / NoSuchBucket: The specified bucket does not exist (Terraform)S3 backend: NoSuchB…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 RegionBackend initialization required — Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3" (Terraform)Backend initializat…DynamoDB lock table not found (ResourceNotFoundException) — Terraform: Error: Error acquiring the state lock: ResourceNotFoundException: Requested resource not found / failed to retrieve lock info (Terraform)DynamoDB lock table…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…Output refers to sensitive values — Terraform: Error: Output refers to sensitive values — a root module output containing sensitive data must be explicitly marked as sensitive (Terraform)Output refers to se…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…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…Deadlock — Deadlock found when trying to get lock; try restarting transaction (SQL)Deadlock409 — HTTP 409 Conflict (HTTP)409Too many re-renders — Error: Too many re-renders. React limits the number of renders to prevent an infinite loop. (React)Too many re-rendersAccessDenied — AWS S3: AccessDenied (403) when calling GetObject / PutObject (AWS)AccessDeniedAuthorizationFailed — Azure: AuthorizationFailed — The client does not have authorization to perform action (Azure)AuthorizationFailedPERMISSION_DENIED — PERMISSION_DENIED: The caller does not have permission (insufficient permissions) (Authentication)PERMISSION_DENIEDWorkspace doesn't exist — Terraform: Error: Failed to select workspace: workspace "staging" doesn't exist / Currently selected workspace "x" does not exist (Terraform)Workspace doesn't e…PermanentRedirect — S3 PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint (AWS)PermanentRedirectInvalidKeyPair.NotFound — InvalidKeyPair.NotFound: The key pair 'x' does not exist (AWS)InvalidKeyPair.NotF…InvalidAMIID.NotFound — InvalidAMIID.NotFound: The image id '[ami-xxxx]' does not exist (AWS)InvalidAMIID.NotFou…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…Failed to install provider (download failed) — Terraform: Error: Failed to install provider — Error while installing hashicorp/aws v5.40.0: could not query provider registry / Get "https://releases.hashicorp.com/...": dial tcp: i/o timeout (Terraform)Failed to install p…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 …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…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 tainted…Kubernetes cluster unreachable (provider/helm) — Terraform: Error: Kubernetes cluster unreachable: Get "http://localhost/version": dial tcp 127.0.0.1:80: connect: connection refused (Terraform)Kubernetes cluster …Unable to process file command — GitHub Actions: Error: Unable to process file command 'output' successfully. Invalid format 'x' (CI/CD)Unable to process f…Invalid for_each argument (keys cannot be determined until apply) — Terraform: Error: Invalid for_each argument — The "for_each" map includes keys derived from resource attributes that cannot be determined until apply (Terraform)Invalid for_each ar…Invalid value for input variable — Terraform: Error: Invalid value for variable — "instance_type" must be a t3 type / The given value is not suitable for var.x declared at variables.tf:1,1-17: string required (Terraform)Invalid value for i…ExpiredToken — AWS: ExpiredToken — The security token included in the request is expired (AWS)ExpiredTokenNoCredentialsError — AWS: Unable to locate credentials / Could not load credentials from any providers (AWS)NoCredentialsErrorSignatureDoesNotMatch — AWS: SignatureDoesNotMatch / InvalidClientTokenId — the request signature we calculated does not match (AWS)SignatureDoesNotMat…sts:AssumeRole denied — is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::...:role/... (AWS)sts:AssumeRole deni…Cloud Run 403: Your client does not have permission to get URL — Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server (Google Cloud / Firebase)Cloud Run 403: Your…PERMISSION_DENIED: Permission 'x' denied on resource — Google Cloud: 403 PERMISSION_DENIED — Permission 'storage.objects.get' denied on resource (or it may not exist) (Google Cloud / Firebase)PERMISSION_DENIED: …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…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 …

Directly related (11)

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.

IAM AccessDeniedExceptionAWS

AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ...

The IAM user or role making the call has no permission for that action on that resource — the message names both.

S3 backend: NoSuchBucket / bucket does not existTerraform

Terraform: Error: Failed to get existing workspaces: S3 bucket "my-tf-state" does not exist / NoSuchBucket: The specified bucket does not exist

The S3 bucket configured as the state backend doesn't exist (or is in another region/account).

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.

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`).

DynamoDB lock table not found (ResourceNotFoundException)Terraform

Terraform: Error: Error acquiring the state lock: ResourceNotFoundException: Requested resource not found / failed to retrieve lock info

The S3 backend's `dynamodb_table` doesn't exist, so locking fails.

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.

Output refers to sensitive valuesTerraform

Terraform: Error: Output refers to sensitive values — a root module output containing sensitive data must be explicitly marked as sensitive

An output (or module output) exposes a value derived from a sensitive variable/attribute without `sensitive = true`.

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.

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).

Two steps away (27)

DeadlockSQL

Deadlock found when trying to get lock; try restarting transaction

Two transactions waited on each other’s locks; the database killed one so the other could continue.

409HTTP

HTTP 409 Conflict

The request conflicts with the current state of the resource — e.g. a duplicate or an edit based on an outdated version.

Too many re-rendersReact

Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.

A state update runs during render, which triggers another render, which updates state again — forever.

AccessDeniedAWS

AWS S3: AccessDenied (403) when calling GetObject / PutObject

An IAM policy, bucket policy, ACL/ownership setting, Block Public Access or KMS key policy denied the S3 request.

AuthorizationFailedAzure

Azure: AuthorizationFailed — The client does not have authorization to perform action

The signed-in identity (user, service principal or managed identity) lacks an Azure RBAC role for that action on that scope.

PERMISSION_DENIEDAuthentication

PERMISSION_DENIED: The caller does not have permission (insufficient permissions)

You are authenticated, but your identity isn’t allowed to perform this action on this resource.

Workspace doesn't existTerraform

Terraform: Error: Failed to select workspace: workspace "staging" doesn't exist / Currently selected workspace "x" does not exist

The workspace you selected (or that `.terraform/environment` points to) isn't present in the backend.

PermanentRedirectAWS

S3 PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint

The request went to the wrong S3 region/endpoint for that bucket.

InvalidKeyPair.NotFoundAWS

InvalidKeyPair.NotFound: The key pair 'x' does not exist

The key pair name you passed doesn’t exist in that region (key pairs are regional).

InvalidAMIID.NotFoundAWS

InvalidAMIID.NotFound: The image id '[ami-xxxx]' does not exist

The AMI ID isn’t available in this region/account — AMI IDs are regional and private AMIs must be shared.

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).

Failed to install provider (download failed)Terraform

Terraform: Error: Failed to install provider — Error while installing hashicorp/aws v5.40.0: could not query provider registry / Get "https://releases.hashicorp.com/...": dial tcp: i/o timeout

Terraform found the provider version but couldn't download/verify the package.

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.

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.

Resource is tainted and must be replacedTerraform

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

A previous apply failed during creation, so Terraform marked the resource tainted and will recreate it.

Kubernetes cluster unreachable (provider/helm)Terraform

Terraform: Error: Kubernetes cluster unreachable: Get "http://localhost/version": dial tcp 127.0.0.1:80: connect: connection refused

The Kubernetes/Helm provider can't connect to the cluster (no config, cluster not ready at plan time, expired credentials).

Unable to process file commandCI/CD

GitHub Actions: Error: Unable to process file command 'output' successfully. Invalid format 'x'

A line written to `$GITHUB_OUTPUT`, `$GITHUB_ENV` or `$GITHUB_STATE` is not in `name=value` form — usually a multi-line value wit…

Invalid for_each argument (keys cannot be determined until apply)Terraform

Terraform: Error: Invalid for_each argument — The "for_each" map includes keys derived from resource attributes that cannot be determined until apply

`for_each` keys depend on values only known after apply, so Terraform can't plan which instances exist.

Invalid value for input variableTerraform

Terraform: Error: Invalid value for variable — "instance_type" must be a t3 type / The given value is not suitable for var.x declared at variables.tf:1,1-17: string required

A variable value failed its type or `validation` block.

ExpiredTokenAWS

AWS: ExpiredToken — The security token included in the request is expired

Temporary AWS credentials (STS/SSO/assumed role) have expired.

NoCredentialsErrorAWS

AWS: Unable to locate credentials / Could not load credentials from any providers

The AWS CLI/SDK found no credentials in any place it looks — env vars, profile files, SSO cache or an instance/task role.

SignatureDoesNotMatchAWS

AWS: SignatureDoesNotMatch / InvalidClientTokenId — the request signature we calculated does not match

AWS rejected the request signature — wrong secret key, wrong region, clock skew, or a presigned URL used differently from how it…

sts:AssumeRole deniedAWS

is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::...:role/...

The caller can’t assume the role — either its own policy doesn’t allow sts:AssumeRole, or the role’s trust policy doesn’t trust t…

Cloud Run 403: Your client does not have permission to get URLGoogle Cloud / Firebase

Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server

The Cloud Run service requires authentication and the caller has no valid identity token or the `roles/run.invoker` role.

PERMISSION_DENIED: Permission 'x' denied on resourceGoogle Cloud / Firebase

Google Cloud: 403 PERMISSION_DENIED — Permission 'storage.objects.get' denied on resource (or it may not exist)

The caller's identity lacks the IAM permission named in the message on that resource.

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).

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 }`.