Commit Graph

9 Commits

Author SHA1 Message Date
clint shryock 1e03c90238 provider/aws: use a known good ami for spot instance test 2016-01-25 16:16:55 -06:00
clint shryock 1c2c1a5edb provider/aws: Update tests destroy checks 2015-12-22 11:08:09 -06:00
stack72 632a9147cc Adding support for Block_Durations to AWS Spot instance 2015-11-26 11:56:04 +00:00
clint shryock 66ad974193 add acceptance test for spot instanace updates 2015-11-16 15:11:44 -06:00
Clint Shryock f174587291 provider/aws: touch up on aws_spot_instance 2015-08-31 09:34:34 -05:00
Clint 273d4fc98d Merge pull request #2954 from stayup-io/issue_2919_pass_extra_settings_to_aws_spot_request
Pass key_name and subnetId to spot instance request - resolves issue #2919
2015-08-31 09:33:30 -05:00
Clint Shryock 0c2f189d08 provider/aws: Update to aws-sdk 0.9.0 rc1 2015-08-17 13:27:16 -05:00
David Laing 79d8fde09c Pass key_name and subnetId to spot instance request 2015-08-06 20:22:10 +01:00
Paul Hinze 112724fc39 provider/aws: spot_instance_request
This is an iteration on the great work done by @dalehamel in PRs #2095
and #2109.

The core team went back and forth on how to best model Spot Instance
Requests, requesting and then rejecting a separate-resource
implementation in #2109.

After more internal discussion, we landed once again on a separate
resource to model Spot Instance Requests. Out of respect for
@dalehamel's already-significant donated time, with this I'm attempting
to pick up the work to take this across the finish line.

Important architectural decisions represented here:

 * Spot Instance Requests are always of type "persistent", to properly
   match Terraform's declarative model.
 * The spot_instance_request resource exports several attributes that
   are expected to be constantly changing as the spot market changes:
   spot_bid_status, spot_request_state, and instance_id. Creating
   additional resource dependencies based on these attributes is not
   recommended, as Terraform diffs will be continually generated to keep
   up with the live changes.
 * When a Spot Instance Request is deleted/canceled, an attempt is made
   to terminate the last-known attached spot instance. Race conditions
   dictate that this attempt cannot guarantee that the associated spot
   instance is terminated immediately.

Implementation notes:

 * This version of aws_spot_instance_request borrows a lot of common
   code from aws_instance.
 * In order to facilitate borrowing, we introduce `awsInstanceOpts`, an
   internal representation of instance details that's meant to be shared
   between resources. The goal here would be to refactor ASG Launch
   Configurations to use the same struct.
 * The new aws_spot_instance_request acc. test is passing.
 * All aws_instance acc. tests remain passing.
2015-06-07 17:33:32 -05:00