PhilKeeble / AWS-RedTeam-ADLab

111 stars 30 forks source link

Error import KeyPair #1

Open r3dt3am opened 3 years ago

r3dt3am commented 3 years ago

On running "terraform apply" the following error is thrown Error: Error import KeyPair: InvalidKey.Format: Key is not in valid OpenSSH public key format │ status code: 400, request id: 0cb63772-f4d8-49a5-9454-6e97f7c36742 │ │ with aws_key_pair.terraformkey, │ on aws.tf line 9, in resource "aws_key_pair" "terraformkey": │ 9: resource "aws_key_pair" "terraformkey" {

Issue seems to be because of the way file is handled as discussed here https://github.com/aws/aws-cli/issues/4969 Need to use aws cli version 1

PhilKeeble commented 3 years ago

I used aws cli 2 with no issues, are you creating keys as I describe here https://philkeeble.com/automation/windows/activedirectory/AWS-RedTeam-ADLab-Setup/ ?