This page covers common issues and their solutions.

Authentication Errors

Module not found

Error:

Error: Failed to query available provider packages

Solution: Verify your registry credentials are configured correctly. See Authentication.

Invalid credentials

Error:

Error: 401 Unauthorized

Solution:

  • Check that your token hasn’t expired
  • Verify the token is correctly formatted in ~/.terraformrc
  • Ensure the environment variable is set if using that method

Provider Errors

Provider version conflict

Error:

Error: Failed to query available provider packages
Could not retrieve the list of available versions

Solution: Run terraform init -upgrade to update provider versions.

Missing required argument

Error:

Error: Missing required argument

Solution: Check the module’s inputs documentation. Ensure all required variables are provided.

State Issues

State lock error

Error:

Error: Error acquiring the state lock

Solution:

  • Wait for other operations to complete
  • If the lock is stale: terraform force-unlock LOCK_ID

Resource already exists

Error:

Error: Resource already exists

Solution: Import the existing resource: terraform import MODULE.RESOURCE RESOURCE_ID

Deployment Errors

Insufficient permissions

Error:

Error: AccessDenied

Solution: Verify your AWS credentials have the required IAM permissions.

Resource limit exceeded

Error:

Error: LimitExceeded

Solution: Request a limit increase through AWS Support.

Still Having Issues?

If your issue isn’t listed here, check the module’s documentation or open a support issue.