From 857ac4fdd4184148a4d0d696428aad61493d8810 Mon Sep 17 00:00:00 2001 From: Tim Visher Date: Fri, 4 Jun 2021 12:49:46 -0400 Subject: [PATCH] Require vagrant 1.2 to 2.2.15 This is provided because 2.2.16 has a bug where it cannot be used with RSA SHA1 ssh keys which makes it impossible to use with vagrant-aws as well as any other platform that only supports RSA SHA1 keys. There's been no activity from the vagrant maintainers to fix this for some time. https://github.com/hashicorp/vagrant/issues/12344 --- lib/vagrant-aws/plugin.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/vagrant-aws/plugin.rb b/lib/vagrant-aws/plugin.rb index 2a93656a..c007f76b 100644 --- a/lib/vagrant-aws/plugin.rb +++ b/lib/vagrant-aws/plugin.rb @@ -4,10 +4,17 @@ raise "The Vagrant AWS plugin must be run within Vagrant." end -# This is a sanity check to make sure no one is attempting to install -# this into an early Vagrant version. -if Vagrant::VERSION < "1.2.0" - raise "The Vagrant AWS plugin is only compatible with Vagrant 1.2+" +# This is a sanity check to make sure no one is attempting to install this +# into an early Vagrant version or a Vagrant version that requires SSH +# keys that AWS does not support. +# +# Upstream issue documenting platforms that don't support SHA2 SSH keys: +# https://github.com/hashicorp/vagrant/issues/12344 +# +# AWS documentation about what kinds of SSH keys are required: +# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html +if Vagrant::VERSION < "1.2.0" or "2.2.15" < Vagrant::Version + raise "The Vagrant AWS plugin is only compatible with Vagrant 1.2 to 2.2.15" end module VagrantPlugins