[Enhancement]: Resource/aws_key_pair - Enable key pair generation by leaving out public key #39529
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/ec2
Issues and PRs that pertain to the ec2 service.
Description
CloudFormation allows for creating EC2 key pairs by omitting the public key material in
AWS::EC2::KeyPair
. Ref: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-keypair.htmlAt present, the public key is a required field in Terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#public_key
Is it possible to enable key pair creation by specifying
key_name
and leaving outpublic_key
, similar to CloudFormation?Affected Resource(s) and/or Data Source(s)
resource/aws_key_pair
Potential Terraform Configuration
References
AWS's CloudFormation guide for EC2 key pairs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-keypair.html
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: