kitchen-ec2
kitchen-ec2 copied to clipboard
Redundant parameters when using VPC
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.
:+1:
+1 for this
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.