Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Cannot delete permissions referencing security groups in another VPC #27

Open
eagletmt opened this issue Jan 20, 2017 · 0 comments
Open

Comments

@eagletmt
Copy link
Contributor

eagletmt commented Jan 20, 2017

Suppose there's a permission referencing security groups in another VPC.

ec2 'vpc-xxxxxx' do
  security_group 'sample-x' do  # sg-xxxxxx
  end

  security_group 'test' do
    permission :tcp, 80..80 do
      groups('sg-xxxxxx', 'sg-yyyyyy')
    end
  end
end

ec2 'vpc-yyyyyy' do
  security_group 'sample-y' do  # sg-yyyyyy
  end
end

When I try to delete some of them, it fails unexpectedly.

ec2 'vpc-xxxxxx' do
  security_group 'sample-x' do  # sg-xxxxxx
  end

  security_group 'test' do
    permission :tcp, 80..80 do
      groups('sg-xxxxxx')  # Revoke sg-yyyyyy
    end
  end
end

ec2 'vpc-yyyyyy' do
  security_group 'sample-y' do  # sg-yyyyyy
  end
end
% piculet -a Groupfile
Apply `/path/to/Groupfile` to SecurityGroup
Delete Permission: vpc-xxxxxx > test(ingress) > tcp 80..80
  revoke sample-y
[ERROR] Can't find SecurityGroup: 012345678901/sample-y in vpc-xxxxxx

It seems normalizing security groups to their name isn't a good idea for cross-VPC permissions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant