-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provider/aws: Allow VPC Classic Linking in Autoscaling Launch Configs #7470
provider/aws: Allow VPC Classic Linking in Autoscaling Launch Configs #7470
Conversation
Fixes #2433 |
Hi @andrewsykim Thanks so much for the work here. The code looks good, but unfortunately the tests don't pass:
This seems to be due to a hardcoded sg in the test for this work - can we try and create this with terraform as part of the test and pass it in that way? That way we would ensure that the test system would be able to work as expected Thanks Paul |
@stack72 sounds good, I saw a few acceptance test cases that had hard coded values so I assumed there was a set of values we can hard code for those acceptance tests to work (with some shared AWS account). For the tests to pass I can add a setup step that creates all the existing resources required for this acceptance test |
Hi @andrewsykim Yeah, if you could have the acceptance test create the security group that would be great. That should allow it to pass then Paul |
@stack72 I've modified the acceptance tests to generate a VPC and a security group as part of its
|
Hi @andrewsykim Just had to modify 1 thing in your acceptance test - change the ami id for one that works in our default region of us-west-2. The test results now look as follows:
Thanks for all the work on this :) Paul |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
AWS provides EC2 ClassicLink which allows instances outside of a VPC to reach instances within it. More details here. The use case is mainly for transitioning existing infrastructure into a VPC. You can specify a default VPC id and an associated security group with an autoscaling launch config so that all instances within the autoscaling group are automatically linked to a desired VPC. From my current understanding, terraform does not have support yet for VPC linking in launch configurations.
I noticed that the acceptance tests require the use of real AWS resources. I've tested my changes against resources that we own but I've replaced those values with some of the values I've seen in other examples for obvious reasons. As a result I'm not entirely sure if they'll work using your AWS resources. I'd be interested to know how you guys manage resources for acceptance testing from outside contributors.