Terraform
init, plan, apply, and state errors in CI - fixed.
Fix Terraform CI failures: init and provider errors, state locking, plan and apply failures, authentication, and version constraints. Reliable fixes for IaC pipelines.
Init & providers
Provider downloads, backends, and versions.
.terraform.lock.hcl hash mismatchFix OpenTofu provider hash mismatch in .terraform.lock.hcl after migrating from Terraform in CI - the lock re…
"Failed to query available provider packages"Fix OpenTofu "Error: Failed to query available provider packages" in CI - tofu could not reach registry.opent…
"Inconsistent dependency lock file"Fix OpenTofu "Error: Inconsistent dependency lock file" in CI - a required provider is missing from .terrafor…
"Invalid provider registry host"Fix OpenTofu "Error: Invalid provider registry host" in CI - a provider source address names a host that does…
"Module not installed"Fix OpenTofu "Error: Module not installed" in CI - a plan or validate ran before tofu init downloaded the mod…
"tofu: command not found"Fix "tofu: command not found" in CI - the OpenTofu binary is not installed or not on PATH. Install it with op…
"Unsupported block type"Fix OpenTofu "Error: Unsupported block type" in CI - the configuration uses a block your tofu version does no…
"Unsupported OpenTofu Core version"Fix "Error: Unsupported OpenTofu Core version" in CI - the required_version constraint in your configuration…
"provider ... not available for your platform"Fix OpenTofu "provider ... is not available for the platform" in CI - no provider build exists for the runner…
provider mirror not usedFix OpenTofu provider mirror problems in CI - tofu ignores the mirror or fails to find providers because the…
"signature verification" (provider)Fix OpenTofu provider signature verification errors in CI - tofu could not verify the GPG signature of a prov…
TF_TOKEN not appliedFix OpenTofu registry authentication in CI - a private module or provider registry returns 401 because the TF…
"~>" constraint conflictFix Terraform pessimistic "~>" constraint conflicts in CI - a `required_version = "~> 1.7.0"` that excludes t…
missing -backend-config valueFix Terraform init "currently configured backend ... has changed" and missing -backend-config errors in CI -…
"Backend configuration changed"Fix Terraform "Backend configuration changed" during init in CI - when the backend block or -backend-config d…
"Backend configuration changed"Fix Terraform "Error: Backend configuration changed" in CI - the backend block differs from the last init, so…
"Backend initialization required"Fix Terraform "Backend initialization required, please run terraform init" in CI - plan or apply ran where th…
"Backend initialization required"Fix Terraform "Error: Backend initialization required, please run \"terraform init\"" in CI - plan/apply ran…
"Backend initialization required"Fix Terraform "Backend initialization required, please run 'terraform init'" in CI - when plan/apply runs in…
"checksums do not match"Fix Terraform .terraform.lock.hcl "checksums ... do not match" in CI - missing platform hashes after switchin…
provider checksum mismatchFix Terraform provider checksum mismatches in CI -- "doesn't match any of the checksums previously recorded"…
cloud "organization not found"Fix Terraform Cloud/HCP "cloud" block errors in CI - "organization \"x\" not found" or "required token could…
registry unreachableFix Terraform "Failed to query available provider packages" registry connection errors in CI - transient DNS…
"Could not load plugin"Fix Terraform "Could not load plugin" / "Failed to instantiate provider" in CI - a corrupt or partially-cache…
"Could not retrieve the list of available versions"Fix Terraform init "Could not retrieve the list of available versions for provider" in CI - a version constra…
"Error accessing remote module registry"Fix Terraform "Error accessing remote module registry" with a 401 in CI - the module registry rejected the re…
"Error acquiring the state lock" (DynamoDB)Fix Terraform "Error acquiring the state lock" against a DynamoDB lock table in CI - a missing table, missing…
S3 backend "no valid credential sources"Fix Terraform "error configuring S3 Backend: no valid credential sources found" during init in CI - the backe…
S3 backend "NoCredentialProviders"Fix Terraform "error configuring S3 Backend: no valid credential sources / NoCredentialProviders" in CI -- th…
"NoSuchBucket" (S3 backend)Fix Terraform S3 backend init "NoSuchBucket: The specified bucket does not exist" in CI - the state bucket na…
"Failed to download module"Fix Terraform "Error: Failed to download module" in CI - init could not fetch a module from its git or HTTP s…
"Failed to get existing workspaces"Fix Terraform init "Failed to get existing workspaces" with an S3 backend in CI - the runner cannot list the…
"Failed to install provider"Fix Terraform "Failed to install provider" during init in CI - registry lookup failures, a misspelled provide…
"Failed to query available provider packages"Fix Terraform "Failed to query available provider packages" in CI - a transient registry timeout when listing…
"Failed to query available provider packages"Fix Terraform init "Failed to query available provider packages" in CI - a bad source address, a network bloc…
"Failed to read module directory"Fix Terraform "Failed to read module directory" in CI -- a local module path does not exist on the runner, of…
"Failed to read module manifest"Fix Terraform "Error: Failed to read module manifest" in CI - the .terraform/modules/modules.json file is mis…
registry "401 Unauthorized"Fix Terraform provider/module "401 Unauthorized" from a private registry in CI - a missing or expired token f…
"Failed to retrieve available versions"Fix Terraform "Failed to retrieve available versions for module" with a 403 from registry.terraform.io in CI…
"Inconsistent dependency lock file"Fix Terraform "Inconsistent dependency lock file" in CI - when .terraform.lock.hcl records different provider…
"Invalid module source address"Fix Terraform "Error: Invalid module source address" in CI - the string in a module source argument is not a…
"Invalid provider configuration"Fix Terraform "Invalid provider configuration" / "provider configuration not present" in CI - a missing requi…
"Missing required argument" (module)Fix Terraform "Error: Missing required argument" for a module in CI - a called module has an input variable w…
"does not have a version constraint"Fix the Terraform warning/error that a registry module has no version constraint in CI - a registry module so…
"Module not found" (private registry)Fix Terraform "Module not found" from a private registry in CI - the registry has no module by that namespace…
"Module not installed"Fix Terraform "Module not installed" and "Failed to download module" in CI - the source was not fetched becau…
"Module not installed"Fix Terraform "Error: Module not installed" in CI - a module block references a module that init never downlo…
"Module source has changed"Fix Terraform "Module source has changed ... please run terraform init" in CI -- a module source or version w…
"Module source has changed"Fix Terraform "Error: Module source has changed" in CI - a module block source or version was edited since th…
provider version conflictFix Terraform "no available provider ... versions match the given constraints" in CI - when root and module c…
provider constraint cannot be satisfiedFix Terraform "no available releases match the given constraints" in CI -- conflicting or impossible provider…
module version not foundFix Terraform "Unsupported module version" / "no versions matched" in CI - a module version constraint that n…
provider not declaredFix Terraform "not present in required_providers" / "provider requirements cannot be satisfied" in CI - decla…
"Provider configuration not present"Fix Terraform "Provider configuration not present" in CI -- a resource still in state has no matching provide…
"Reference to undeclared module"Fix Terraform "Error: Reference to undeclared module" in CI - an expression reads module.X but no module bloc…
"reference to undefined provider"Fix Terraform "reference to undefined provider" alias errors in CI - a resource or module uses provider = aws…
"Required plugins are not installed"Fix Terraform "Required plugins are not installed" in CI - a plan/apply ran against a config whose providers…
"Required token could not be found"Fix Terraform "required token could not be found" during init in CI - the remote backend or private registry…
"timeout waiting for plugin to start"Fix Terraform "timeout while waiting for plugin to start" in CI -- a provider plugin failed to hand off withi…
"Unable to find remote state"Fix Terraform "Unable to find remote state" / access errors from a terraform_remote_state data source in CI -…
"Unreadable module directory"Fix Terraform "Error: Unreadable module directory" in CI - init cannot read the directory a module source poi…
"Unsupported attribute" (module output)Fix Terraform "Error: Unsupported attribute" when reading a module output in CI - the module has no output bl…
"Unsupported Terraform Core version"Fix Terraform "Error: Unsupported Terraform Core version" raised by a module's required_version in CI - the m…
"Unsupported Terraform Core version"Fix Terraform "Unsupported Terraform Core version" in CI - the installed CLI version does not satisfy the con…
"Unsupported Terraform Core version"Fix Terraform "Unsupported Terraform Core version" errors in CI - when the installed terraform binary is outs…
AWS "No valid credential sources"Fix Terraform AWS provider "No valid credential sources found" in CI -- the provider cannot resolve credentia…
azurerm "Insufficient features blocks"Fix Terraform azurerm "Insufficient features blocks" in CI -- the azurerm provider requires a features {} blo…
azurerm "building AzureRM Client"Fix Terraform azurerm provider auth in CI - "building AzureRM Client: please ensure you have configured crede…
cloud remote execution mismatchFix HCP Terraform remote-execution surprises in CI - a `cloud {}` workspace set to remote runs the plan on HC…
GCP "validating provider credentials"Fix Terraform google "Error validating provider credentials" in CI -- the GCP provider rejected the service-a…
google "default credentials" (ADC)Fix Terraform google provider auth in CI - "could not find default credentials" when Application Default Cred…
"Error reading backend config file"Fix Terraform partial backend errors in CI - "Error reading backend config" when the -backend-config=<file>.t…
transient provider download failFix transient Terraform provider/module download failures in CI - a network blip or registry 5xx mid-fetch th…
provider registry 403 / networkFix Terraform init provider-download failures in CI - a 403 from the registry, a blocked mirror, or flaky net…
registry 403/429 on downloadFix Terraform registry.terraform.io 403/429 download errors in CI -- the provider download was rate-limited o…
"Could not download remote source"Fix Terragrunt "Error downloading remote source" in CI - Terragrunt could not fetch the module referenced in…
"Could not find terragrunt.hcl"Fix Terragrunt "Error finding terragrunt config" / no terragrunt.hcl in CI - the working directory has no con…
"include ... could not be found"Fix Terragrunt include block errors in CI - "could not find find_in_parent_folders" or the parent terragrunt.…
"local ... is not defined"Fix Terragrunt "Unsupported attribute: local.X is not defined" in CI - a locals reference points at a value n…
"read_terragrunt_config" errorFix Terragrunt read_terragrunt_config() errors in CI - the config path passed to the function does not exist…
"terragrunt: command not found"Fix "terragrunt: command not found" in CI - the runner has no terragrunt binary on PATH. Install it or use th…
"version constraint not satisfied"Fix Terragrunt terragrunt_version_constraint / terraform_version_constraint errors in CI - the installed bina…
auto-init "module is not yet installed"Fix Terragrunt auto-init failures in CI - when --terragrunt-no-auto-init is set, plan runs before init and Te…
generate "file already exists"Fix Terragrunt generate block "already exists" errors in CI - a generate block will not overwrite a file that…
provider cache server errorFix Terragrunt provider cache errors in CI - the provider cache server fails to start or the cache dir is unw…
terraform_binary / TG_TF_PATH mismatchFix Terragrunt running the wrong CLI (Terraform vs OpenTofu) in CI - set terraform_binary or TG_TF_PATH / TER…
State & locking
Lock contention and state errors.
"Backend configuration changed"Fix OpenTofu "Error: Backend configuration changed" in CI - the backend block differs from the initialized st…
"Error acquiring the state lock"Fix OpenTofu "Error: Error acquiring the state lock" in CI - another run holds the lock, or a crashed job lef…
state encryption errorFix OpenTofu state encryption errors in CI - an encryption method or key provider is misconfigured, or a key…
Terraform Cloud not compatible with tofuFix OpenTofu Terraform Cloud/HCP incompatibility in CI - the cloud and remote backends target HCP Terraform,…
"Backend configuration changed"Fix Terraform "Backend configuration changed" in CI -- the backend settings differ from the initialized state…
state/resource mismatchFix Terraform state mismatches in CI - "resource already managed by Terraform" on import, or a state entry th…
state lock contention (DynamoDB)Fix Terraform "Error acquiring the state lock: ConditionalCheckFailedException" in CI -- another run holds th…
"Error acquiring the state lock"Fix Terraform "Error acquiring the state lock" in CI - a concurrent run holds the lock, or a killed run left…
"Error acquiring the state lock" (held)Fix Terraform "Error acquiring the state lock" when the lock is already held in CI - a parallel run or a cras…
"Error acquiring the state lock"Fix Terraform "Error acquiring the state lock" in CI -- another run holds the lock, or a crashed run left a s…
"Error acquiring the state lock"Fix Terraform "Error: Error acquiring the state lock" in CI - another run holds the lock, or a crashed job le…
"Error loading state: AccessDenied"Fix Terraform "Error loading state: AccessDenied" in CI -- the CI identity cannot read the state object from…
"Error loading state: AccessDenied"Fix Terraform "Error loading state: AccessDenied" in CI - the CI role can configure the backend but lacks s3:…
"Error loading state: AccessDenied"Fix Terraform "Error loading state" with AccessDenied in CI - the credentials can reach the backend but lack…
"Failed to load state: AccessDenied"Fix Terraform "Failed to load state: AccessDenied" in CI - the runner cannot read the remote state object (mi…
"Failed to load state: ConditionalCheckFailed"Fix Terraform "Failed to load state ... ConditionalCheckFailed" / state digest mismatch in CI - when the Dyna…
"force-unlock failed"Fix Terraform force-unlock failures in CI - the lock ID does not match, the backend denies the delete, or the…
"import" block errorsFix Terraform 1.5+ `import {}` block errors in CI - "Cannot import to non-existent resource", a wrong import…
"Invalid template interpolation value"Fix Terraform "Invalid template interpolation value" in CI -- interpolating a null, list, or map into a strin…
force-unlock failedFix Terraform force-unlock failures in CI - a wrong lock ID, lock-table permissions, or a backend that no lon…
"moved" block errorsFix Terraform `moved {}` block errors in CI - "Invalid moved block" / target address still in use, or both th…
"No state file was found"Fix Terraform "No state file was found" / empty state in CI - a missing or wrong backend key makes Terraform…
"Output refers to sensitive values"Fix Terraform "Output refers to sensitive values" / "Invalid use of sensitive value" in CI - exposing a sensi…
"removed" block errorsFix Terraform 1.7+ `removed {}` block errors in CI - removing a resource from state while its `resource` bloc…
"already exists"Fix Terraform "Error: ... already exists" / EntityAlreadyExists in CI - a resource exists in the cloud but no…
"resource already exists" (import needed)Fix Terraform apply "already exists" errors in CI - the cloud resource exists but is not in state, so Terrafo…
"Resource already managed by Terraform"Fix Terraform "Resource already managed by Terraform" on import in CI -- the target address is already in sta…
saved plan no longer validFix Terraform "saved plan is stale" / "plan ... is no longer valid" when applying a saved plan file in CI - s…
state snapshot mismatchFix Terraform "saved state ... does not match" / snapshot mismatch in CI -- the state changed (or was written…
"state snapshot was created by Terraform vX"Fix Terraform "state snapshot was created by Terraform vX, which is newer" in CI - the runner CLI is older th…
"state snapshot was created by..."Fix Terraform "state snapshot was created by Terraform vX, which is newer than current" in CI - an older CLI…
"workspace ... does not exist"Fix Terraform "workspace \"prod\" does not exist" in CI - selecting a workspace that was never created, which…
"workspace does not exist"Fix Terraform "workspace \"X\" does not exist" in CI - a select or plan targeted a state workspace that was n…
TFC "required token could not be found"Fix Terraform Cloud token errors in CI -- "required token could not be found" when the cloud/remote backend h…
DynamoDB lock table errorFix Terraform DynamoDB backend errors in CI - "ResourceNotFoundException" for a missing lock table or a wrong…
S3 backend "AccessDenied"Fix Terraform S3 backend "AccessDenied" / "NoSuchBucket" errors in CI - missing IAM permissions on the state…
S3 backend: no lock tableFix Terraform S3 backend running without a DynamoDB lock table in CI - concurrent runs corrupt state because…
S3 lockfile errorFix Terraform S3 backend native lockfile errors in CI - a stale .tflock object or missing s3:DeleteObject per…
stale DynamoDB lockClear a stale Terraform state lock left in DynamoDB after a cancelled CI job - confirm no run is active, then…
state driftUnderstand Terraform drift in CI - "Objects have changed outside of Terraform" and unexpected plan diffs from…
state drift detected in CIHandle Terraform state drift in CI - a plan shows changes nobody authored because real infrastructure was mod…
stale lock retry timeoutFix Terraform state-lock timeouts left by a killed run in CI - a -lock-timeout retry clears a stale lock once…
"Error acquiring the state lock"Fix Terragrunt "Error acquiring the state lock" in CI - parallel run-all units contend for the same state or…
"Missing required argument" (backend)Fix Terragrunt "Missing required argument" in the generated backend in CI - the remote_state config omits a v…
"NoSuchBucket"Fix Terragrunt "NoSuchBucket" in CI - the S3 backend bucket for remote state does not exist or the runner cre…
remote_state backend configFix Terragrunt remote_state backend errors in CI - the generated backend.tf conflicts with a committed backen…
Plan & apply
Resource, auth, and dependency errors.
Ansible "'X' is undefined"Fix Ansible "'X' is undefined" in CI -- a task or template references a variable that was never defined, ofte…
Ansible vault password requiredFix Ansible Vault password errors in CI -- "Attempting to decrypt but no vault secrets found" when a vault-en…
Ansible "conflicting action statements"Fix Ansible "conflicting action statements" in CI -- a task declares two modules/actions, usually from a YAML…
Ansible "couldn't resolve module/action"Fix Ansible "couldn't resolve module/action" in CI -- a task uses a module from a collection that is not inst…
Ansible "No inventory was parsed"Fix Ansible "No inventory was parsed, only implicit localhost is available" in CI -- the inventory path is wr…
Ansible "Permission denied"Fix Ansible permission errors in CI -- SSH "Permission denied (publickey)" at connect time, or a become/sudo…
Ansible "Syntax Error ... YAML"Fix Ansible "Syntax Error while loading YAML" in CI -- malformed playbook YAML: bad indentation, an unquoted…
Ansible "role ... was not found"Fix Ansible "the role X was not found" in CI -- a play references a role that is not on the roles path and wa…
Ansible "Unexpected Exception"Fix Ansible "Unexpected Exception" and remote Python interpreter errors in CI -- a missing or wrong Python on…
Ansible "UNREACHABLE" (SSH)Fix Ansible "UNREACHABLE! => Failed to connect to the host via ssh" in CI -- the runner cannot open an SSH co…
Ansible module not found on remoteFix Ansible "module not found" / missing remote dependency in CI -- a module needs a Python library or binary…
Ansible host key check failedFix Ansible SSH host key verification failures in CI -- "Host key verification failed" when an ephemeral targ…
ansible-galaxy download failedFix ansible-galaxy "failed to download collection" in CI -- a transient registry/network error, a missing col…
ansible-lint blocking CIFix ansible-lint failures that block CI -- rule violations (FQCN, no-changed-when, risky shell) or a profile/…
No value for required variableFix OpenTofu variable errors in CI - "No value for required variable" or a missing tfvars file. Pass values w…
"Error: Cycle"Fix OpenTofu "Error: Cycle" in CI - two or more resources depend on each other, forming a loop the graph cann…
"Reference to undeclared ..."Fix OpenTofu "Error: Reference to undeclared resource" or "input variable" in CI - the expression names somet…
"tofu test" run failedFix "tofu test" failures in CI - a .tftest.hcl run block assertion failed, or the test could not initialize p…
for_each value depends on resource attributesFix OpenTofu for_each and dynamic block errors in CI - "Invalid for_each argument" when the value is unknown…
import block failedFix OpenTofu import block errors in CI - "Configuration for import target does not exist" or a bad import id…
workspace "X" does not existFix OpenTofu "workspace does not exist" in CI - a selected workspace was never created in the backend. Use to…
"-target" partial apply warningUnderstand the Terraform "Applied changes may be incomplete" -target warning in CI - why partial, targeted ap…
"already exists"Fix Terraform apply "already exists" errors in CI - the cloud resource exists but is not in state, so Terrafo…
"Backend configuration changed"Fix Terraform "Error: Backend configuration changed" in CI - the backend block or its -backend-config differs…
"Call to unknown function"Fix Terraform "Call to unknown function" in CI -- using a function name that does not exist, is misspelled, o…
"check" block failedUnderstand Terraform 1.5+ `check {}` block failures in CI - assertions that warn rather than error, and how t…
"Conflicting configuration arguments"Fix Terraform "Conflicting configuration arguments" in CI -- two mutually exclusive arguments were set on the…
"context deadline exceeded"Fix Terraform "context deadline exceeded" in CI - a provider API call exceeded its timeout, usually from slow…
"AccessDenied" / "UnauthorizedOperation"Fix Terraform apply "creating ... AccessDenied" or "UnauthorizedOperation" in CI - the runner role authentica…
create "AccessDenied" / "Unauthorized"Fix Terraform "creating <resource>: AccessDenied" / "UnauthorizedOperation" in apply - the CI role can read s…
EC2 "InvalidParameterValue"Fix Terraform "creating EC2 Instance: InvalidParameterValue" in CI -- an instance argument like AMI, instance…
IAM "EntityAlreadyExists"Fix Terraform "creating IAM Role: EntityAlreadyExists" in CI -- a role or policy with that name already exist…
S3 "BucketAlreadyExists"Fix Terraform "creating S3 Bucket: BucketAlreadyExists / BucketAlreadyOwnedByYou" in CI -- the bucket name is…
"Cycle" dependency errorFix Terraform "Cycle" errors in CI -- two or more resources depend on each other, forming a loop Terraform ca…
"Cycle: ..."Fix Terraform "Cycle" errors in CI - two or more resources depend on each other directly or through outputs,…
"Cycle:"Fix Terraform "Error: Cycle: ..." dependency-cycle errors in CI - when resources reference each other in a lo…
"Error: Cycle"Fix Terraform "Error: Cycle" in CI - two or more resources depend on each other, forming a loop Terraform can…
delete "DependencyViolation"Fix Terraform "deleting <resource>: DependencyViolation" on destroy/apply in CI - a resource cannot be delete…
"DependencyViolation"Fix Terraform "DependencyViolation" on destroy in CI -- AWS refuses to delete a resource (VPC, subnet, SG) be…
"Duplicate provider configuration"Fix Terraform "Duplicate provider configuration" in CI -- two default (or two identically-aliased) provider b…
"Duplicate resource configuration"Fix Terraform "Duplicate resource ... configuration" in CI - two resource blocks share the same type and name…
"Duplicate resource"Fix Terraform "Duplicate resource" errors in CI - two blocks declare the same resource type and name, so Terr…
"dynamic" block errorsFix Terraform `dynamic {}` block errors in CI - iterating a non-collection, a wrong iterator reference, or ge…
"Error acquiring the state lock"Fix Terraform "Error acquiring the state lock: ConditionalCheckFailedException" in CI - the DynamoDB lock ite…
"Error locking state: timeout"Fix Terraform "Error locking state" lock timeout in CI - Terraform waited the full -lock-timeout for a held l…
"Error refreshing state: AccessDenied"Fix Terraform "Error refreshing state" with S3 AccessDenied in CI - the runner credentials cannot read the st…
"Error: creating ..."Diagnose Terraform "Error: creating <resource>" failures during apply in CI - provider API rejections from pe…
"value to match regular expression"Fix Terraform "expected value to match regular expression" in CI -- an argument value failed the provider or…
"Failed to get existing workspaces"Fix Terraform "Error: Failed to get existing workspaces" in CI - init could not list state objects in the S3…
"doesn't match any of the checksums"Fix Terraform "Failed to install provider" checksum mismatch in CI - the downloaded provider package does not…
"Inconsistent dependency lock file"Fix Terraform "Error: Inconsistent dependency lock file" in CI - a required provider is missing from .terrafo…
"Inconsistent dependency lock file"Fix Terraform "Inconsistent dependency lock file" in CI - a required provider is not recorded in .terraform.l…
"Invalid count argument"Fix Terraform "Invalid count argument" and for_each "cannot be determined until apply" errors in CI - meta-ar…
count on unknown valueFix Terraform "Invalid count argument: the count value depends on resource attributes that cannot be determin…
"Invalid count argument"Fix Terraform "Invalid count argument" in CI -- count depends on a value that is not known until apply, so Te…
"Invalid count argument"Fix Terraform "Error: Invalid count argument" in CI - count depends on a value not known until apply, so Terr…
"Invalid for_each argument"Fix Terraform "Error: Invalid for_each argument" in CI - the for_each set depends on resource attributes that…
"Invalid for_each argument"Fix Terraform "Invalid for_each argument" in CI - a for_each value that is null, not a map/set, or depends on…
"Invalid for_each argument"Fix Terraform "Invalid for_each argument" in CI - for_each got a value that is not a known map/set of strings…
"Invalid function argument"Fix Terraform "Invalid function argument" and "Invalid index" errors in CI - null or wrong-typed values, or i…
"Invalid index"Fix Terraform "Invalid index" in CI - indexing a list past its end or a map with a key that does not exist, o…
"Invalid index"Fix Terraform "Invalid index" in CI -- indexing a list out of bounds or a map with a missing key, often when…
"Invalid resource instance key"Fix Terraform "Invalid resource instance key" in CI -- indexing a resource with the wrong key form (e.g. [cou…
"Invalid template interpolation value"Fix Terraform "Invalid template interpolation value" in CI - interpolating a null or non-stringable value (a…
"Invalid value for variable"Fix Terraform "Invalid value for variable" / custom validation failures in CI - an input that a variable vali…
"LimitExceeded" (quota)Fix Terraform "LimitExceeded" in CI -- the account hit an AWS service quota (VPCs, EIPs, instances) so the cr…
"Missing required argument"Fix Terraform "Missing required argument" in CI - a resource, module, or provider block is missing an argumen…
missing provider aliasFix Terraform "provider configuration ... is required" / missing alias in CI -- a module needs an aliased pro…
"Module not installed"Fix Terraform "Error: Module not installed" in CI - a referenced module was never fetched into .terraform/mod…
no valid AWS credentialsFix Terraform AWS "No valid credential sources found" in CI - a missing OIDC role, expired keys, or unset AWS…
"No valid credential sources found"Fix Terraform "Error: No valid credential sources found" in CI - the AWS provider could not locate credential…
"No value for required variable"Fix Terraform "No value for required variable" in CI -- a variable with no default was not supplied, and -inp…
"Provider configuration not present"Fix Terraform "Error: Provider configuration not present" in CI - state references a provider (often an alias…
"inconsistent final plan"Fix Terraform "Provider produced inconsistent final plan" in CI -- a known-after-apply attribute changed to a…
"Provider produced inconsistent final plan"Fix Terraform "Error: Provider produced inconsistent final plan" in CI - during apply the provider returned a…
"Provider produced inconsistent final plan"Fix Terraform "Provider produced inconsistent final plan" in CI - the provider returned a different value at…
"inconsistent final plan"Fix Terraform "Provider produced inconsistent final plan" in CI - usually a provider bug worked around by upg…
"inconsistent result after apply"Fix Terraform "Provider produced inconsistent result after apply" in CI - a provider bug or an eventually-con…
"NoSuchEntity"Fix Terraform "NoSuchEntity" in CI -- a data source or refresh referenced an IAM entity (role, policy, user)…
"Reference to undeclared input variable"Fix Terraform "Error: Reference to undeclared input variable" in CI - the configuration uses var.X but no mat…
"Reference to undeclared module"Fix Terraform "Reference to undeclared module" in CI -- reading module.<name>.<output> when no module block b…
"Reference to undeclared resource"Fix Terraform "Reference to undeclared resource" in CI - a reference to a resource or data source that is not…
"Reference to undeclared resource"Fix Terraform "Reference to undeclared resource" in CI - an expression references a resource address that doe…
"RequestError: send request failed"Fix Terraform "RequestError: send request failed" in CI -- the provider could not reach the cloud API endpoin…
value not known until applyFix Terraform plan errors where count/keys/providers depend on values not known until apply - restructure so…
"ResourceInUseException"Fix Terraform "ResourceInUseException" in CI -- a resource (security group, ECS service, DynamoDB table) cann…
provider crash (rpc Unavailable)Fix Terraform "rpc error: code = Unavailable" / "plugin did not respond" in CI -- a provider plugin crashed m…
"Saved plan is stale"Fix Terraform "Saved plan is stale" / "plan is no longer valid" when applying a saved plan file in CI - state…
"Saved plan is stale"Fix Terraform "Error: Saved plan is stale" in CI - the state changed between plan and apply, so the saved pla…
"Self-referential block"Fix Terraform "Self-referential block" errors in CI - a resource referencing its own attributes inside its de…
"Throttling: Rate exceeded"Fix Terraform "Throttling: Rate exceeded" in CI - the cloud API rejected requests because Terraform sent them…
"ThrottlingException: Rate exceeded"Fix Terraform "ThrottlingException: Rate exceeded" in CI -- the provider sent API calls faster than the AWS s…
"timeout while waiting for state to become"Fix Terraform "timeout while waiting for state to become \"available\"" in CI - a slow resource that did not…
"timeout waiting for state available"Fix Terraform "timeout while waiting for state to become available" in CI -- a resource did not reach its rea…
"timeout while waiting for state to become"Fix Terraform apply "timeout while waiting for state to become ..." in CI - a resource did not reach its expe…
timeout creating resourceFix Terraform "timeout while waiting for state to become ..." during apply in CI - when a resource takes long…
"UnauthorizedOperation"Fix Terraform "UnauthorizedOperation: You are not authorized to perform this operation" in CI -- the CI ident…
"Unsupported argument"Fix Terraform "Error: Unsupported argument" in CI - a block sets an argument the resource or provider schema…
"Unsupported argument"Fix Terraform "Unsupported argument" in CI - an argument that the resource, module, or provider schema does n…
module output not declaredFix Terraform "Unsupported attribute ... module output ... not declared" in CI - referencing module.x.foo whe…
module output not declaredFix Terraform "Unsupported attribute: this object does not have an attribute named X" for a module output in…
"Unsupported attribute"Fix Terraform "Unsupported attribute" in CI -- referencing an attribute a resource, module, or object does no…
"Unsupported block type"Fix Terraform "Unsupported block type" in CI - a nested block the schema does not accept, often after a provi…
"Unsupported block type"Fix Terraform "Unsupported block type" in CI -- a nested block name is not valid for the resource or provider…
"Unsupported Terraform Core version"Fix Terraform "Error: Unsupported Terraform Core version" in CI - the runner Terraform does not satisfy the r…
"value for undeclared variable"Fix Terraform "value for undeclared variable" in CI - a tfvars file or TF_VAR env var sets a variable the con…
"AccessDenied / UnauthorizedOperation"Fix Terraform apply failures where creating a cloud resource is denied in CI - the runner identity lacks the…
"AccessDenied: not authorized to perform"Fix Terraform AWS provider "AccessDenied: User ... is not authorized to perform: <action> on resource <arn>"…
"BucketAlreadyOwnedByYou"Fix Terraform AWS provider "BucketAlreadyOwnedByYou" in CI - the S3 bucket name already exists in your accoun…
"couldn't find resource"Fix Terraform AWS provider "Error: reading ...: couldn't find resource" / 404 in CI - a resource in state no…
"DependencyViolation"Fix Terraform AWS provider "DependencyViolation" on destroy in CI - AWS refuses to delete a resource (VPC, su…
"EntityAlreadyExists"Fix Terraform AWS provider "EntityAlreadyExists: Role/Policy with name X already exists" in CI - the IAM enti…
"InvalidClientTokenId" / "RequestExpired"Fix Terraform AWS provider "InvalidClientTokenId" or "RequestExpired" in CI - the credentials are invalid/exp…
"InvalidParameterValue"Fix Terraform AWS provider "InvalidParameterValue" in CI - the API rejected an attribute value as invalid, su…
"OptInRequired"Fix Terraform AWS provider "OptInRequired" in CI - the account is not subscribed to the service or has not op…
"Provider produced inconsistent result after apply"Fix Terraform "Provider produced inconsistent result after apply" from the AWS provider in CI - an applied at…
"ThrottlingException: Rate exceeded"Fix Terraform AWS provider "ThrottlingException: Rate exceeded" / "RequestLimitExceeded" in CI - the API thro…
"timeout while waiting for state ... available"Fix Terraform AWS provider "error waiting for ... : timeout while waiting for state to become 'available'" in…
"UnauthorizedOperation"Fix Terraform AWS provider "Error: creating ...: UnauthorizedOperation: You are not authorized to perform thi…
Azure authentication failedFix Terraform azurerm "Error building AzureRM Client" auth failures in CI - missing service principal env var…
azurerm "AuthorizationFailed"Fix Terraform azurerm "AuthorizationFailed" in CI -- the service principal lacks the RBAC role needed to perf…
"already exists - needs to be imported"Fix Terraform AzureRM "A resource with the ID ... already exists - to be managed via Terraform this resource…
"building AzureRM Client"Fix Terraform "Error: building AzureRM Client" in CI - the provider could not authenticate because ARM_CLIENT…
"MissingSubscriptionRegistration"Fix Terraform AzureRM "Error: ... was not found" / "MissingSubscriptionRegistration" in CI - the resource pro…
"PublicIPCountLimitReached"Fix Terraform AzureRM Code="PublicIPCountLimitReached" in CI - the subscription hit its public IP address quo…
"QuotaExceeded" (vCPU / Sku)Fix Terraform AzureRM Code="QuotaExceeded" in CI - the requested VM size or vCPU count exceeds the subscripti…
"does not have authorization"Fix Terraform AzureRM "authorization.RoleAssignmentsClient ... does not have authorization to perform action"…
"Apply not allowed ... VCS connection"Fix Terraform Cloud "Error: Apply not allowed for workspaces with a VCS connection" in CI - you cannot CLI-ap…
"Cannot apply ... plan ... discarded"Fix Terraform Cloud "Error: Cannot apply a run that has been discarded" in CI - the plan was discarded, super…
"context deadline exceeded"Fix Terraform Cloud "Error: context deadline exceeded" in CI - a request to HCP Terraform timed out because t…
"does not support ..."Fix Terraform Cloud "Error: Currently HCP Terraform does not support ..." in CI - a CLI operation, argument,…
"Error migrating" stateFix Terraform Cloud "Error: Error migrating the workspace state" in CI - state migration into HCP Terraform f…
"Failed to request discovery document" 401Fix Terraform Cloud "Error: Failed to request discovery document ... 401 Unauthorized" in CI - the API token…
"Failed to upload configuration"Fix Terraform Cloud "Error: Failed to upload configuration files" in CI - the CLI could not send the config b…
"No agents are available"Fix Terraform Cloud "No agents are available" in CI - an agent-execution workspace queued a run but no agent…
"Organization ... not found"Fix Terraform Cloud "Error: Failed to read organization ... not found or user unauthorized" in CI - the org i…
"Policy check failed"Fix Terraform Cloud "Policy check failed" in CI - a Sentinel or OPA policy set with a hard-mandatory rule blo…
"Required token could not be found"Fix Terraform Cloud "Error: Required token could not be found" in CI - the cloud block has no API token becau…
"unexpected error" 429 rate limitFix Terraform Cloud "returned an unexpected error ... 429" in CI - the API rate limit was hit because too man…
"Run ... errored"Fix a Terraform Cloud remote run that ends "errored" in CI - the run reached plan or apply on the remote and…
"run task ... failed"Fix Terraform Cloud run tasks failing in CI - a pre-plan or post-plan run task returned a failing status and,…
"Terraform version ... not available"Fix Terraform Cloud "Error: Terraform version ... not available" in CI - the workspace pins a Terraform versi…
"Two remote workspace ..." conflictFix Terraform Cloud "Error: Too many workspaces / Two remote workspaces" in CI - the cloud block sets both a…
"workspace ... not found"Fix Terraform Cloud "Error: Currently HCP Terraform ... workspace ... not found" in CI - the workspace named…
cloud block vs remote backendFix Terraform Cloud init errors after moving from the remote backend to the cloud block in CI - having both,…
Cost estimation errorFix a Terraform Cloud run that errors during cost estimation in CI - the cost-estimation stage failed or a po…
Plan has changes, apply not confirmedFix Terraform Cloud runs that plan changes but wait for manual confirmation in CI - auto-apply is off, so the…
Run trigger source not foundFix Terraform Cloud run trigger errors in CI - a run trigger references a source workspace that is missing, u…
Variable set not appliedFix Terraform Cloud remote runs missing variables in CI - a variable set exists but is not applied to the wor…
depends_on missing resourceFix Terraform depends_on referencing a non-existent resource in CI -- a depends_on entry points at a resource…
for_each on computed valuesFix Terraform "the for_each value depends on resource attributes that cannot be determined until apply" in CI…
GCP "Error 403: quotaExceeded"Fix Terraform GCP "googleapi: Error 403: Quota exceeded" in CI -- a project hit a Compute or service quota, s…
GCP "Error 409: already exists"Fix Terraform GCP "googleapi: Error 409 ... already exists" in CI -- a resource with that name already exists…
"API ... has not been used ... or it is disabled"Fix Terraform Google provider "Error 403: ... API has not been used in project ... before or it is disabled"…
"Error 400 ... INVALID_ARGUMENT"Fix Terraform Google provider "googleapi: Error 400: ... INVALID_ARGUMENT" in CI - the API rejected an attrib…
"Error 403 ... does not have ... permission"Fix Terraform Google provider "googleapi: Error 403: ... does not have <permission>" in CI - the service acco…
"Quota exceeded"Fix Terraform Google provider "googleapi: Error 403: Quota ... exceeded" / RESOURCE_EXHAUSTED in CI - the req…
"Error 409 ... alreadyExists"Fix Terraform Google provider "googleapi: Error 409: ... already exists, alreadyExists" in CI - the GCP resou…
"Error waiting for ... operation"Fix Terraform Google provider "Error waiting for ... : timeout" in CI - a long-running GCP operation did not…
GCP credentials missingFix Terraform google provider "could not find default credentials" in CI - set GOOGLE_CREDENTIALS or use work…
"jsonencode"/"yamlencode" errorsFix Terraform `jsonencode()` / `yamlencode()` errors in CI - encoding a null or unknown value, or a type the…
module depends_on pitfallsFix Terraform module `depends_on` problems in CI - an invalid reference, a depends_on that forces everything…
moved block target missingFix Terraform moved block "managed resource ... has not been declared" in CI -- a moved block targets an addr…
"Required token could not be found"Fix the GitHub OIDC "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL" / token-not-found error before Terraform in…
plan exit code 2 (changes)Understand Terraform plan exit code 2 in CI -- with -detailed-exitcode, 2 means changes are present, which a…
precondition/postcondition failedFix Terraform `precondition` / `postcondition` failures in CI - a custom `lifecycle` condition (or check bloc…
"state ... created by Terraform v..."Fix Terraform "state snapshot was created by Terraform v... newer than current" in CI - the runner Terraform…
"templatefile" errorsFix Terraform `templatefile()` errors in CI - a missing template variable, a file-not-found path, or invalid…
"terraform_data" errorsFix Terraform `terraform_data` and `replace_triggered_by` issues in CI - an unknown `triggers_replace` value…
variable "validation" failedFix Terraform variable `validation {}` failures in CI - an input value that violated a custom validation rule…
"Detected dependency cycle"Fix Terragrunt "Found a dependency cycle" in CI - two or more units depend on each other through dependency b…
"encountered errors" (run-all)Fix Terragrunt "run-all failed / encountered errors" in CI - one or more units in the stack failed, and the s…
"Unsupported attribute" (dependency.outputs)Fix Terragrunt "Unsupported attribute" on dependency.outputs in CI - the upstream unit does not export the ou…
before_hook / after_hook failedFix Terragrunt before_hook / after_hook failures in CI - a hook command exited non-zero, so Terragrunt aborts…
"has not been applied yet"Fix Terragrunt "dependency has not been applied yet" in CI - a plan reads dependency outputs before the depen…
mock_outputs missing attributeFix Terragrunt mock_outputs errors in CI - the plan reads a dependency output that mock_outputs does not defi…
missing --terragrunt-non-interactiveFix Terragrunt hanging or failing on a prompt in CI - without --terragrunt-non-interactive, run-all apply wai…
run-all apply orderingFix Terragrunt run-all apply ordering problems in CI - a unit applies before the dependency it needs because…
--terragrunt-parallelism tuningFix Terragrunt run-all failures from too much parallelism in CI - many units running at once exhaust memory o…
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
Java & JVMMaven, Gradle, and JVM failures in CI - resolved.
GoGo build, module, and test failures - diagnosed.