Closed surfd4wg closed 3 years ago
Hi @surfd4wg !
This error is not related to this module or Terraform itself.
git must be available and on the PATH.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
The code I'm using. If key-name already exists, don't try to create it, it will produce an error. If it exists, just use it: module "key_pair" { source = "terraform-aws-modules/key-pair/aws" key_name = "surfkey" public_key = file("~/.ssh/surfkey.pub") create_key_pair = false }
Error:
terraform init
Initializing modules... Downloading terraform-aws-modules/key-pair/aws 0.6.0 for key_pair...
Error: Failed to download module
Could not download module "key_pair" (main.tf:165) source code from "git::https://github.com/terraform-aws-modules/terraform-aws-key-pair?ref=v0.6.0": error downloading 'https://github.com/terraform-aws-modules/terraform-aws-key-pair?ref=v0.6.0': git must be available and on the PATH.