-
Notifications
You must be signed in to change notification settings - Fork 119
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
Support explicit public ip on default vpc #364
Support explicit public ip on default vpc #364
Conversation
37c8fd6
to
682b403
Compare
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.
Hey this is off to a good start. It covers the reported cases and passes as expected. I left a few comments about using SSM and sport instances. The tests take a bit of time to run.
I also left some thoughts on refactoring the code a little, as it was immediately clear to me what was happening. Let me know if you have any feedback or questions.
When implementing the AWS upload of public keys when one private key is set in the configuration, we added one check to the Spot tests. However, these do not define a private key, so the public key was never uploaded, and the test would fail.
If a template requests a public IP for the instance being created, and no VPC or subnet is, we get the default VPC ID and a random subnet in this VPC to associate for the instance being created. This fixes a bug where the public IP was requested, but because no subnet was specified, it wasn't associated explicitely.
682b403
to
7e6957b
Compare
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.
LGTM
--- PASS: TestAccBuilder_SpotInstanceWithPublicIPAddressExplicitelySet (421.39s)
--- PASS: TestAccBuilder_SpotInstanceWithPublicIPAddressExplicitelySet/Spot_instance,_with_public_IP_explicitely_set (89.36s)
--- PASS: TestAccBuilder_SpotInstanceWithPublicIPAddressExplicitelySet/Spot_instance,_with_public_IP_explicitely_unset (113.94s)
--- PASS: TestAccBuilder_SpotInstanceWithPublicIPAddressExplicitelySet/Non-Spot_instance,_with_public_IP_explicitely_set (97.49s)
--- PASS: TestAccBuilder_SpotInstanceWithPublicIPAddressExplicitelySet/Non-Spot_instance,_with_public_IP_explicitely_unset (120.60s)
PASS
This PR changes the way we set a VPC/Subnet during the
StepNetworkInfo
so that if theassociate_public_ip_address
attribute is set totrue
in the configs, it will be taken into account when setupping the network for the instance we are creating.Closes #18