kitchen-ec2 icon indicating copy to clipboard operation
kitchen-ec2 copied to clipboard

Redundant parameters when using VPC

Open dtoubelis opened this issue 10 years ago • 3 comments

When Amazon VPC is set up, such parameters as region, availability_zone and security_group_ids are associated with subnet and I had to match them in .kitchen.yml as follows:

subnet_id: subnet-...
region: us-east-1
availability_zone: us-east-1a
security_group_ids: []

Would it be possible to change logic to the following: if subnet_id is provided the parameters region, availability_zone and security_group_ids are not allowed in configuration file and this info is pulled from Amazon via API.

This is the way vagrant-ec2 plugin works and it kind of makes sense.

dtoubelis avatar Dec 10 '14 17:12 dtoubelis

:+1:

robcoward avatar Mar 24 '15 15:03 robcoward

+1 for this

yoshiwaan avatar May 20 '15 22:05 yoshiwaan

Would it be possible to change logic to the following: if subnet_id is provided the parameters region, availability_zone and security_group_ids are not allowed in configuration file and this info is pulled from Amazon via API.

I don't think this is totally doable. The only redundant parameter is availability_zone.

I'm guessing region is necessary so that SDK knows which API endpoint to hit, and there is no such thing as associating security groups with subnets.

However, if a subnet_id is specified, availability_zone becomes redundant, as you don't need to specify both when launching instances.

vrivellino avatar Mar 03 '16 19:03 vrivellino