Commit Graph

14 Commits

Author SHA1 Message Date
Michael S. Fischer af9505ffa2 aws_key_pair: Ensure key_name attribute is set
Ensure that the `key_name` attribute is available to `aws_key_pair`
resource dependents, even when the attribute is not specifically
set (i.e., when `key_name_prefix` or automatic naming is performed).

Fixes #10983.
2017-01-01 12:17:43 -08:00
Nick Santamaria 8949419bef provider/aws: Add key_name_prefix argument to aws_key_pair resource (#9993)
* Added key_name_prefix to aws_key_pair resource schema.

* Added logic to prefix the aws_key_pair name on create.

* Added aws_key_pair test config for key_name_prefix case.

* Copied test cases from testAccAWSSecurityGroup namespace.

* Modified copied test case to suit aws_key_pair resource.

* Changed required flag to optional on key_name argument for aws_key_pair resource.

* Added documentation for key_name_prefix argument.

* Code style fix.

* Fixed undefined variable error in test.
2016-11-09 15:35:51 +00:00
Mitchell Hashimoto a992860b8d
providers/aws: key_pair import 2016-05-16 10:13:20 -07:00
Clint Shryock 31b8f04bda provider/aws: Migrate KeyPair to version 1 2015-10-12 16:04:51 -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 66372d8d1d small update to keypair_refresh, to bring in-line with sdk changes 2015-05-21 09:21:57 -05:00
Phil Frost 9e2ecafc46 Handle AWS keypairs which no longer exist
When refreshing a keypair, update state appropriately rather than crash
if the keypair no longer exists on AWS.

Likely fixes #1851.
2015-05-20 20:53:49 -04:00
Paul Hinze b99611fa44 provider/aws: allow key_pair name to be generated
As a module author, I'd like to be able to create a module that includes
a key_pair.  I don't care about the name, I only know I don't want it to
collide with anything else in the account.

This allows my module to be used multiple times in the same account
without having to do anything funky like adding a user-specified unique
name parameter.
2015-04-30 10:33:14 -05:00
Clint Shryock ba43b7c963 mass search-replace of ec2SDKconn 2015-04-16 15:05:55 -05:00
Clint Shryock 6feba0bf36 migrate aws keypair test suite 2015-04-06 15:13:29 -05:00
Clint Shryock eb82f2bf2a provider/aws: Convert Key Pair to upstream aws-sdk-go 2015-04-06 12:22:57 -05:00
Clint Shryock 28fbd971fc Retire goamz 2015-03-13 09:42:50 -05:00
Clint Shryock 641c7c613a provider/aws: Convert AWS Key Pair to aws-sdk-go 2015-03-04 15:17:23 -06:00
Pete Hodgson 5b66b9306e add aws_key_pair resource
For now this only supports importing a key pair (by specifying a
public_key) property. In the future it'd be fairly trivial to support
key pair creation, with the private key returned as a computed property.

In real world usage you'd probably want to provide that public_key
property via a variable rather than hard-coding it into a terraform
config that'd end up in source control.
2014-12-18 01:27:06 -08:00