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

AWS Spot fleet resource #7243

Merged
merged 1 commit into from
Jun 23, 2016
Merged

Conversation

keshavdv
Copy link
Contributor

@keshavdv keshavdv commented Jun 20, 2016

This adds a Spot fleet resource to AWS, docs and some acceptance tests. We've been using this for a bit in our own environment without any issues.

Fixes #4070

@keshavdv keshavdv changed the title AWS Spot fleet provider AWS Spot fleet resource Jun 20, 2016
@jen20
Copy link
Contributor

jen20 commented Jun 21, 2016

Hi @keshavdv! Thanks for opening a pull request. I've taken a quick look over it and it looks good to me - one request however: could you rebase this onto master and squash it into a single commit? Thanks!

@keshavdv keshavdv force-pushed the keshav-hashicorp-rebase branch 2 times, most recently from 31f48d9 to f5aad08 Compare June 22, 2016 00:04
@keshavdv keshavdv force-pushed the keshav-hashicorp-rebase branch from f5aad08 to 58bd6df Compare June 22, 2016 00:33
@keshavdv
Copy link
Contributor Author

keshavdv commented Jun 22, 2016

Done! Fixes #4070

@solarkennedy
Copy link

^ keep in mind that "fixes" thing has to be in the "body" of the PR to work (otherwise it is just a reference, not an auto-close thing):
https://github.com/blog/1506-closing-issues-via-pull-requests

@keshavdv
Copy link
Contributor Author

Huh, didn't know that. Updated the PR.

@stack72
Copy link
Contributor

stack72 commented Jun 23, 2016

Thanks for rebasing this PR @keshavdv

On running the tests, I could see they were targetted towards us-east-1, but no region was added to the region:

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotFleetRequest_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/23 07:55:34 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotFleetRequest_ -timeout 120m
=== RUN   TestAccAWSSpotFleetRequest_basic
--- FAIL: TestAccAWSSpotFleetRequest_basic (73.70s)
    testing.go:255: Step 0 error: Error applying: 1 error(s) occurred:

        * aws_spot_fleet_request.foo: Error requesting spot fleet: [WARN] Error creating Spot fleet request, retrying: InvalidSpotFleetRequestConfig: Invalid Amazon Machine Image(s) specified: The image id '[ami-f652979b]' does not exist (Service: AmazonEC2; Status Code: 400; Error Code: InvalidAMIID.NotFound; Request ID: bfd448e2-0979-4ed1-bd30-fba3f47c3b1a).
            status code: 400, request id: f7d44743-6108-4de8-aef7-a5432b604a8c
=== RUN   TestAccAWSSpotFleetRequest_launchConfiguration
--- FAIL: TestAccAWSSpotFleetRequest_launchConfiguration (14.84s)
    testing.go:255: Step 0 error: Error applying: 1 error(s) occurred:

        * aws_spot_fleet_request.foo: InvalidAMIID.NotFound: The image id '[ami-f652979b]' does not exist
            status code: 400, request id: ed45e060-06b5-4250-8caf-ceebddf23b16
=== RUN   TestAccAWSSpotFleetRequest_CannotUseEmptyKeyName
--- PASS: TestAccAWSSpotFleetRequest_CannotUseEmptyKeyName (0.00s)
FAIL
exit status 1
FAIL    github.com/hashicorp/terraform/builtin/providers/aws    88.553s

I then changed the tests to use us-west-2a and ami-d06a90b0 (and m1.small to keep the testing costs down) for us-west and got the following results:

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotFleetRequest_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /vendor/)
2016/06/23 08:11:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotFleetRequest_ -timeout 120m
=== RUN   TestAccAWSSpotFleetRequest_basic
--- PASS: TestAccAWSSpotFleetRequest_basic (29.91s)
=== RUN   TestAccAWSSpotFleetRequest_launchConfiguration
--- PASS: TestAccAWSSpotFleetRequest_launchConfiguration (31.60s)
=== RUN   TestAccAWSSpotFleetRequest_CannotUseEmptyKeyName
--- PASS: TestAccAWSSpotFleetRequest_CannotUseEmptyKeyName (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    61.523s

I have manually merged this with these changes (ef0302e) :)

Thanks for the work here

Paul

@ghost
Copy link

ghost commented Apr 25, 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 Apr 25, 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.

Feature Request: Spot-Fleet Requests from AWS
4 participants