From 3305c57322e04c6dd42a24c106d1a071fcc6fb9d Mon Sep 17 00:00:00 2001 From: Lee Porte Date: Mon, 15 Feb 2021 15:48:48 +0000 Subject: [PATCH] Update VagrantFile to work with modern vagrant We had let this bitrot and it required using an old version of Vagrant. Unfortunatly there is the need to put in a hack due to this issue on the vagrant-aws provider https://github.com/mitchellh/vagrant-aws/issues/566. I suspect that this provider is now abandoned as there is even a PR open to fix it https://github.com/mitchellh/vagrant-aws/pull/575. I propose that we look to remove vagrant in the not too distant future. --- vagrant/Vagrantfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 352e5d7f1..02bfa86ed 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -1,7 +1,19 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -Vagrant.require_version ">= 1.8.0" +class Hash + def slice(*keep_keys) + h = {} + keep_keys.each { |key| h[key] = fetch(key) if has_key?(key) } + h + end unless Hash.method_defined?(:slice) + def except(*less_keys) + slice(*keys - less_keys) + end unless Hash.method_defined?(:except) +end + + +Vagrant.require_version ">= 2.2.14" # We use bootstrap concourse SG and a subnet in default VPC in each region AWS_ACCOUNT = ENV.fetch("AWS_ACCOUNT", "dev")