Terraform Cloud VCS-driven workspaces with Terraform version 1.6.0 with correctly set SSH key are prompting the below error:
Downloading git::ssh://email@example.com/... ╷ │ Error: Failed to download module │ ... │ Could not download module "..." source code from │ "git::ssh://firstname.lastname@example.org/...: │ error downloading │ 'ssh://email@example.com/... exited with 128: Cloning into │ '.terraform/modules/...
│ Host key verification failed. │ fatal: Could not read from remote repository. │ │ Please make sure you have the correct access rights │ and the repository exists.
This is a known bug with Terraform version 1.6.0 in Terraform Cloud workspaces.
This issue has been resolved with the next Terraform version - 1.6.1.
- Workspace settings -> General -> Terraform version drop-down menu -> Choose any version higher or lower than 1.6.0-> Click "Save settings"
- Perform another run