mitchellh / vagrant-aws

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

The security group 'sg-xyz' does not exist (Fog::Compute::AWS::NotFound) #468

Closed kenorb closed 8 years ago

kenorb commented 8 years ago

I'm confused with aws.security_groups, when I set the group security name as below:

aws.security_groups = [ "Vagrant" ]

I've got this error:

InvalidParameterCombination => VPC security groups may not be used for a non-VPC launch

So I've changed my security_group to the ID, since I'm using VPC, like:

aws.security_groups = [ "sg-011e817a" ]

But I've got another error:

==> mt-aws: Please check your security groups settings.
~/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/expects.rb:6:in `response_call': The security group 'sg-011e817a' does not exist (Fog::Compute::AWS::NotFound)
    from ~/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/response_parser.rb:8:in `response_call'
    from ~/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/connection.rb:389:in `response'

Running with debug didn't help much to identify what's the problem.

My group ID exists as shown below:

screen shot 2016-06-12 at 20 20 11

What is the problem here?

egh commented 8 years ago

Security groups are region specific. Is that your issue?

kenorb commented 8 years ago

Most likely, thanks, I can't retest that now, since I'm using now default security group. I'll re-test in another time.