mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 574 forks source link

Unable to create with region eu-north-1 #555

Open Rayal opened 5 years ago

Rayal commented 5 years ago

~/.vagrant.d/gems/2.4.4/gems/fog-aws-2.0.1/lib/fog/aws.rb:237:in 'validate_region!': Unknown region: "eu-north-1" (ArgumentError)

I'm quite sure that eu-north-1 is a valid region. What gives?

sobi3ch commented 4 years ago

Same issue here I was trying several times but without success. I've setup my access and secrets but nothing helps. For vagrant it looks like region doesn't exists With this Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = 'packer_amazon-ebs_aws'

  config.vm.provider :aws do |aws, override|
    #aws.access_key_id = 'YOUR KEY'
    #aws.secret_access_key = 'YOUR SECRET KEY'
    aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
    aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
    #aws.session_token = 'SESSION TOKEN'
    aws.keypair_name = 'awsstockholm'
    aws.region = 'eu-north-1'
    aws.ami = 'ami-03aad3c3037c4cd11'
    override.ssh.username = 'ubuntu'
    override.ssh.private_key_path = '~/.ssh/awsstockholm.pem'
  end
end

I'm getting this error:

$ vagrant up --provider=aws
/home/me/.vagrant.d/gems/2.4.5/gems/fog-aws-2.0.1/lib/fog/aws.rb:237:in `validate_region!': Unknown region: "eu-north-1" (ArgumentError)
sobi3ch commented 4 years ago

OK so it is look like this is about outdated fog-aws library in version 2.0.1 (it's from Feb 28, 2018). The latest one is 3.5.2 (from Jul 16, 2019). And this outdated lib has this region definition without eu-north-1 https://github.com/fog/fog-aws/blob/v2.0.1/lib/fog/aws.rb#L231-L233 The eu-north-1 was added in 3.5.0 version.