Commit Graph

150 Commits

Author SHA1 Message Date
Zachary Salzbank afb06f907f providers/aws: expose network interface id (#6751)
Expose the network interface ID that is created with a new instance.

This can be useful when associating an existing elastic IP to the
default interface on an instance that has multiple network interfaces.
2016-07-25 19:52:40 +01:00
Brian Menges 17b16f543e Ignore IOPS on non io1 AWS devices (#7783)
- Already ignoring IOPS on ebs attached non-io1 devices; extended to root_block_device
- Added warning captured from #4146 / [../blob/master/builtin/providers/aws/resource_aws_ebs_volume.go#L104](resource_aws_ebs_volume.go#L104)
- Added test when setting IOPS to 330 (11GiB * 30 = 330) on GP2 root device results in AWS reported 100 IOPS (successfully ignored input)
2016-07-25 12:32:24 +01:00
David Tolnay 2943a1c978 Retry creation of IAM role depending on new IAM user (#7324) 2016-07-07 15:24:17 -05:00
djuke c1eee521f3 reading the aws instance it was assumed that eth0 was the first in the list of network interfaces (#6761) 2016-05-29 23:01:58 +01:00
Mitchell Hashimoto 884980da1a
providers/aws: instance, nat, internet gateway 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto d85df63526
providers/aws: aws_instance id-only 2016-04-22 09:37:41 -07:00
Doug Neal 1c662c2bc4 [#4794] Don't Base64-encode EC2 userdata if it is already Base64 encoded (#6140)
* Don't Base64-encode EC2 userdata if it is already Base64 encoded

The user data may be Base64 encoded already - for example, if it has been
generated by a template_cloudinit_config resource.

* Add encoded user_data to aws_instance acceptance test
2016-04-13 10:20:20 -05:00
Paul Hinze e9c4d4f6d5 Revert "provider/aws: Support additional changes to security groups of instance without forcing new" 2016-03-10 14:51:30 -06:00
innossh 564dd360a2 provider/aws: Support additional changes to security groups of instance without forcing new 2016-02-21 14:24:33 +09:00
Trevor Pounds 0cd0ff0f8e Use built-in schema.HashString. 2016-02-07 16:29:34 -08: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 79c32ddbe9 Merge pull request #4627 from ColinHebert/patch-1
provider/aws: EBS optimised to force new resource
2016-01-14 14:57:13 -06:00
Clint c9231a73ec Merge pull request #4240 from hashicorp/b-aws-catch-sg-name-id-error
provider/aws: Trap Instance error from mismatched SG IDs and Names
2016-01-13 11:57:58 -06:00
Clint 4f8e9713cf Merge pull request #3261 from fatih/show-instance-state
aws: store and read instance state
2016-01-12 11:06:30 -06:00
Colin Hebert 2948d3678d provider/aws: EBS optimised to force new resource
EBS optimised can't be changed without re-creating the instance. Apply forcenew.
2016-01-11 08:16:49 +01:00
Clint e273fe6cfc Merge pull request #3663 from semarj/master
get profile name even if profile path exists
2015-12-18 10:55:23 -06:00
clint shryock 5c60f7f2c1 provider/aws: Trap Instance error from mismatched SG IDs and Names 2015-12-09 15:59:36 -06:00
clint shryock 9fc6c27de1 provider/aws: Check for empty instances in AWS Instance RunInstance response
Fixes #4206
2015-12-08 14:37:54 -06:00
Joshua Semar 31767accac get profile name even if profile path exists 2015-10-27 21:30:44 -05:00
Panagiotis Moustafellos e4845f75cc removed extra parentheses 2015-10-08 15:48:04 +03:00
Clint Shryock efa26ed2a7 provider/aws: Fix issue with disabling source dest check on first run 2015-10-01 17:00:30 -05:00
Fatih Arslan 545b8a3cd0 aws: store and read instance state
This allows us to store the instance state into the state file. This
means we can now easily see the instance state with `terraform show`.
2015-09-17 13:26:38 +03:00
Paul Hinze 96317a6a38 Merge pull request #3152 from dwradcliffe/read_source_dest_check_state
provider/aws: read instance source_dest_check and save to state
2015-09-16 10:29:37 -05:00
Paul Hinze dcaf0f8b87 provider/aws: correct && -> || mistake
Thanks for the sanity check, @aparrentlymart and @dwradcliffe :)
2015-09-06 12:01:57 -05:00
Paul Hinze 1dfad739bb provider/aws: tweak iam_instance_profile logic
- always `d.Set` to either the profile name or the empty string
 - add some conservative pointer checking to the helper method

/cc @dwradcliffe
2015-09-04 19:20:58 -05:00
David Radcliffe 0b88177cf0 read iam_instance_profile and save to state 2015-09-03 15:43:41 -04:00
David Radcliffe 987ec967ea read source_dest_check and save to state 2015-09-02 14:04:45 -04:00
Clint Shryock fde2a400f7 Merge branch 'master' into f-aws-pr-2779
* master: (84 commits)
  provider/aws: Update to aws-sdk 0.9.0 rc1
  use name instead of id  - launch configs use the name and not ID
  Fix typo on heroku_cert example
  provider/aws: add value into ELB name validation message
  tests: fix missed test update from last merge
  update prevent_destroy error message
  Update CHANGELOG.md
  Update CHANGELOG.md
  providers/aws: Update Launch Config. docs to detail naming and lifecycle recommendation
  release: cleanup after v0.6.3
  v0.6.3
  Update CHANGELOG.md
  core: fix deadlock when dependable node replaced with non-dependable one
  tests: extract deadlock checking test helper
  core: log every 5s while waiting for dependencies
  Fixed indentation in a code sample
  state/remote/s3: match with upstream changes
  provider/aws: match with upstream changes
  google: Add example of two-tier app
  Updating Launch Config Docs for Name attribute
  ...
2015-08-18 14:40:01 -05:00
Clint Shryock 0c2f189d08 provider/aws: Update to aws-sdk 0.9.0 rc1 2015-08-17 13:27:16 -05:00
Clint Shryock 8d5fe93152 conditionally set InstanceInitiatedShutdownBehavior 2015-08-04 06:09:47 -05:00
Clint Shryock 30572212f2 Merge branch 'master' into pr-2779
* master: (86 commits)
  providers/google: Fix reading account_file path
  providers/google: Fix error appending
  providers/google: Return if we could parse JSON
  providers/google: Change account_file to JSON
  providers/google: Default account_file* to empty
  providers/google: Add account_file/account_file_contents ConflictsWith
  providers/google: Document account_file_contents
  providers/google: Use account_file_contents if provided
  providers/google: Add account_file_contents to provider
  Update CHANGELOG.md
  Update CHANGELOG.md
  use d.Id()
  Update CHANGELOG.md
  Update CHANGELOG.md
  scripts: change website_push to push from HEAD
  update analytics
  core: fix crash on provider warning
  provider/aws: Update source to comply with upstream breaking change
  Update CHANGELOG.
  provider/aws: Fix issue with IAM Server Certificates and Chains
  ...
2015-07-29 15:54:56 -05:00
Clint Shryock 579ccbefea provider/aws: Update source to comply with upstream breaking change 2015-07-28 15:29:46 -05:00
Clint Shryock 99f9b93b57 provider/aws: Error when unable to find a Root Block Device name
Fixes #2633
2015-07-27 10:59:37 -05:00
Clint Shryock db5d0301d8 provider/aws: Fix issue with toggling monitoring in AWS Instances 2015-07-20 12:32:58 -05:00
Marc Tamsky 521451db4d provider/aws/aws_instance: add new argument `instance_initiated_shutdown_behavior`,
accepts string values of 'stop' or 'terminate'.

Signed-off-by: Marc Tamsky <tamsky@users.noreply.github.com>
2015-07-18 09:45:34 -07:00
Mitchell Hashimoto f6b9e7c1a6 providers/aws: set AMI on read for instance [GH-1571] 2015-06-26 17:12:20 -07:00
Mitchell Hashimoto 25fa84974b update CHANGELOG 2015-06-25 09:07:11 -07:00
Joshua Garnett d23f534d26 Adding support for detailed monitoring of instances 2015-06-25 10:58:28 -04:00
Paul Hinze 95235ba2cc Merge pull request #2374 from hashicorp/b-aws-detect-instance-type-drift
provider/aws: detect instance_type drift on aws_instance
2015-06-23 15:01:20 -05:00
Paul Hinze 020dc03234 provider/aws: fix root_block_device for odd AMIs
Some AMIs have a RootDeviceName like "/dev/sda1" that does not appear as a
DeviceName in the BlockDeviceMapping list (which will instead have
    something like "/dev/sda")

While this seems like it breaks an invariant of AMIs, it ends up working
on the AWS side, and AMIs like this are common enough that we need to
special case it so Terraform does the right thing.

Our heuristic is: if the RootDeviceName does not appear in the
BlockDeviceMapping, assume that the DeviceName of the first
BlockDeviceMapping entry serves as the root device.

fixes #2224
2015-06-23 09:01:41 -05:00
Paul Hinze 35819b7ae1 provider/aws: detect instance_type drift on aws_instance
fixes #2365
2015-06-16 13:23:50 -05:00
Paul Hinze d41c9d46a8 provider/aws: ignore empty vpc_security_group_ids
fixes #2293
2015-06-11 07:59:42 -05:00
Clint Shryock 9885ac8689 provider/aws: Fix issue with associating KeyPairs with Instances 2015-06-10 14:02:26 -05:00
Paul Hinze 60a5d11fa8 provider/aws: remove default from associate_public_ip_address
I snuck this in with #2263 because thought it was simply a stylistic
clarity thing, but it actually generates a resource-replacement-forcing
diff for existing resources that don't have this set in the config.
Definitely don't want that. :P

/cc @catsby
2015-06-08 12:39:36 -05: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
Clint Shryock 2a0dc4e277 don't set this, it messes things up 2015-06-03 17:10:07 -05:00
Clint Shryock fcd89828f9 provider/aws: Correctly default Instance source_dest_check to true 2015-06-03 15:54:01 -05:00
Paul Hinze b71fa3d0ae provider/aws: handle upstream aws-sdk-go repo move
`awslabs/aws-sdk-go => aws/aws-sdk-go`

Congrats to upstream on the promotion. :)
2015-06-03 13:36:57 -05:00
Clint Shryock db8805dfa5 provider/aws: Fix issue with restoring from snapshot ID
Fixes #1862
2015-05-28 11:25:13 -05:00
Clint b2af84f466 Merge pull request #2026 from hashicorp/f-aws-instance-move-tags
providers/aws: Move up where we assign tags on Instance
2015-05-22 06:48:04 -05:00