key-pair

cloudposse/key-pair/aws

Terraform Module HCL AWS

Terraform Module to Automatically Generate SSH Key Pairs (Public/Private Keys)

Install
module "key-pair" {
source = "cloudposse/key-pair/aws"
version = "0.20.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-key-pair ![Latest Release](https://github.com/cloudposse/terraform-aws-key-pair/releases/latest) ![Slack Community](https://slack.cloudposse.com) [![README Header][readme_header_img]][readme_header_link] [![Cloud Posse][logo]](https://cpco.io/homepage) Terraform module for generating or importing an SSH public key file into AWS. --- This project is part of our comprehensive "SweetOps" approach towards DevOps. [ ][share_email] [ ][share_googleplus] [ ][share_facebook] [ ][share_reddit] [ ][share_linkedin] [ ][share_twitter] ![Terraform Open Source Modules][terraform_modules] It's 100% Open Source and licensed under the APACHE2. We literally have [hundreds of terraform modules][terraform_modules] that are Open Source and well-maintained. Check them out! Security & Compliance Se

Inputs (26)
NameTypeDescriptionDefault
ssh_public_key_pathstringPath to SSH public key directory (e.g. `/secrets`) required
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
ssm_parameter_enabledboolWhether an SSM parameter store value is created to store the key's private key pfalse
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
generate_ssh_keyboolIf set to `true`, new SSH key pair will be created and `ssh_public_key_file` wilfalse
ssh_key_algorithmstringSSH key algorithm"RSA"
private_key_extensionstringPrivate key extension""
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
Outputs (5)
key_name — Name of SSH key
public_key — Content of the generated public key
private_key — Content of the generated private key
public_key_filename — Public Key Filename
private_key_filename — Private Key Filename
Resources (5)
aws_key_pairaws_ssm_parameterlocal_filelocal_sensitive_filetls_private_key
Details
FrameworkTerraform Module
LanguageHCL
Version0.20.0
Cloud AWS
★ Stars153
Forks74
Total downloads400.8k
Inputs26
Outputs5
Resources5
Examples2
LicenseApache-2.0
Namespacecloudposse
Updated