Skip to content

Simple terraform module for create AWS Key Pair and store them in S3

License

Notifications You must be signed in to change notification settings

terraform-iaac/terraform-aws-key-pair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform module for AWS Key Pair + S3

Terraform module used to create AWS Key Pair and store them in S3. With simple syntax.

Usage

module "ec2-key" {
  source        = "terraform-iaac/key-pair/aws"

  key_name           = "my-ec2-instance"
  key_storage_bucket = aws_s3_bucket.ssh_key_storage.id
}

module "ec2" {
  source = "ec2...."
  
  ..................
  key_pair_name = module.ec2-key.key_name
  ..................
}

Terraform Requirements

Name Version
terraform >= 1.3.0
aws >= 4.0.0

Inputs

Name Description Type Default Required
key_name Key Pair name in AWS & S3 file string n/a yes
key_storage_bucket S3 bucket string n/a yes
rsa_bits Rsa bits for private key number 4096 no

Outputs

Name Description
public_key Public key pem
private_key Private key pem
key_name Key Pair name in AWS & S3 file

About

Simple terraform module for create AWS Key Pair and store them in S3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages