Open researchgecko opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
There's also this problem https://github.com/hashicorp/terraform-provider-tls/issues/44 terraform-provider-tls cannot import tls key. Operator needs to manual work to import keys. IMO every ec2 needs to have ssh option at a backup for ssm connect. And to have proper security they need different key pairs. Thus this will block many workflows.
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