Commit Graph

19 Commits

Author SHA1 Message Date
Richard Bowden b673f4d972 adds resource retry to SpotInstanceRequestCreate (#8516)
so that the create process waits for IAM Instance profiles and roles to propagate before continuing, this has been taken from `resource_aws_instance`
2016-08-29 21:53:40 +01:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
clint shryock be07e4c0c9 cleanup spot instance attribute setting 2015-12-01 15:25:53 -06:00
clint shryock c5f0c8ced6 provider/aws: Check for nil on some spot instance attributes 2015-12-01 14:58:59 -06:00
stack72 632a9147cc Adding support for Block_Durations to AWS Spot instance 2015-11-26 11:56:04 +00:00
clint shryock 70f1c9c1e6 remove duplicate readInstance call 2015-11-16 15:16:41 -06:00
clint shryock f31b30d4a5 minor tweaks to connection info setup 2015-11-16 14:51:14 -06:00
clint shryock d998e883fb providers/aws: Update Spot Instance request to provide connection information 2015-11-16 14:43:24 -06:00
Carlos A Becker a3111b41e5 Allow non-persistent spot requests 2015-09-23 15:30:44 -03: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
Clint Shryock 579ccbefea provider/aws: Update source to comply with upstream breaking change 2015-07-28 15:29:46 -05:00
Raúl Naveiras 87239dcec8 Amend AWS spot instace state name cancelled 2015-07-21 17:26:00 +02:00
Clint Shryock 2fedaa9a4b provider/aws: Fix issue where spot instance requests would crash
Requests that are pending do not have an InstanceID
2015-07-07 09:48:04 -06:00
Clint Shryock c81345f535 provider/aws: Code cleanups for Spot Requests 2015-06-30 09:28:14 -05:00
Joshua Garnett d23f534d26 Adding support for detailed monitoring of instances 2015-06-25 10:58:28 -04: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