Skip to content
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

Conversation

mrdavidlaing
Copy link
Contributor

This PR resolves the issue reported in #2919 where AWS spot requests were ignoring key_name and VPC subnetId settings.

resource "aws_spot_instance_request" "foo" {
ami = "ami-4fccb37f"
instance_type = "m1.small"
key_name = "${aws_key_pair.debugging.key_name}"
Copy link
Contributor Author

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.

@mrdavidlaing
Copy link
Contributor Author

I think this is ready for review & merging.

@matsuu
Copy link

matsuu commented Aug 15, 2015

👍

@mrdavidlaing
Copy link
Contributor Author

@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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LaunchSpecification.SubnetId

@catsby
Copy link
Contributor

catsby commented Aug 31, 2015

Hey @mrdavidlaing, thanks for the patch!
The SDK has change some, can you please merge or rebase from master and make the two small changes I marked above? Then we'll get this in 😄

catsby added a commit that referenced this pull request Aug 31, 2015
…s_to_aws_spot_request

Pass key_name and subnetId to spot instance request - resolves issue #2919
@catsby catsby merged commit 273d4fc into hashicorp:master Aug 31, 2015
@catsby
Copy link
Contributor

catsby commented Aug 31, 2015

Hey @mrdavidlaing (again) – ignore that, I went ahead and merged and made the small change in f174587

Thanks again!

@mrdavidlaing
Copy link
Contributor Author

@catsby - thanks!

@ghost
Copy link

ghost commented May 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants