-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds vpc_id to ec2_group, from subnet facts, and allows to specify SG ip cidr #2405
Adds vpc_id to ec2_group, from subnet facts, and allows to specify SG ip cidr #2405
Conversation
Signed-off-by: Vinicyus Macedo <7549205+vinicyusmacedo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks fine to me but I can't test it and I don't use the driver personally.
Can anyone else comment?
Also, it would be AWESOME if you have time/energy to consider migrating the driver itself out into a plugin over at https://github.com/pycontribs/molecule-ec2. We are working towards a pluggable architecture in Molecule 3.0 and need people using the drivers to step up for this. No pressure 😅
It would be really awesome to do it. I'm willing to help :) |
Thanks @ssbarnea |
@vinicyusmacedo Don't be too happy about it, removal comes after but I wanted to avoid having you recreate the patch on the new repository. I am relying on your help testing the plugin once I initialize the new repository. |
Also, come chat with us on IRC if you are not already there and we organise ourselves to get this done! |
@decentral1se joined. |
- name: Create security group | ||
ec2_group: | ||
name: "{{ security_group_name }}" | ||
description: "{{ security_group_name }}" | ||
rules: "{{ security_group_rules }}" | ||
rules_egress: "{{ security_group_rules_egress }}" | ||
vpc_id: "{{ subnet_facts.vpc_id }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ssbarnea I found a bug in here: it should iterate through subnet_facts. Should I keep doing patches on this repo or leave it to molecule-ec2?
Based on improve ec2 template for molecule #2230
How to use it
VPC ID
molecule init role -r test-ec2 -d ec2
vpc_subnet_id
to your platform onmolecule.yml
IP CIDR
allowed_ip_cidr
to the platforms (to specify a CIDR) orauto_public_ip
(to make it use your current public IP). If you include none of these, the default will be 0.0.0.0/0.