-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Pass key_name and subnetId to spot instance request - resolves issue #2919 #2954
Pass key_name and subnetId to spot instance request - resolves issue #2919 #2954
Conversation
resource "aws_spot_instance_request" "foo" { | ||
ami = "ami-4fccb37f" | ||
instance_type = "m1.small" | ||
key_name = "${aws_key_pair.debugging.key_name}" |
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.
I changed the default spot test to validate that passing a key_name
works; since it doesn't seem to make sense to start an instance without one.
I think this is ready for review & merging. |
👍 |
@radeksimko @matsuu - Anything further you need from me to get this merged? |
func testAccCheckAWSSpotInstanceRequestAttributesVPC( | ||
sir *ec2.SpotInstanceRequest) resource.TestCheckFunc { | ||
return func(s *terraform.State) error { | ||
if sir.LaunchSpecification.SubnetID == nil { |
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.
LaunchSpecification.SubnetId
Hey @mrdavidlaing, thanks for the patch! |
…s_to_aws_spot_request Pass key_name and subnetId to spot instance request - resolves issue #2919
Hey @mrdavidlaing (again) – ignore that, I went ahead and merged and made the small change in f174587 Thanks again! |
@catsby - thanks! |
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. |
This PR resolves the issue reported in #2919 where AWS spot requests were ignoring
key_name
and VPCsubnetId
settings.