Git Product home page Git Product logo

terraform-provider-sshkey's Introduction

terraform-provider-sshkey

Simple Terraform provider that generates SSH key pairs. Documentation is available on the sshkey provider page in the Terraform Registry.

Example Usage

terraform {
  required_providers {
    sshkey = {
      source = "daveadams/sshkey"
    }
  }
}

resource "sshkey_rsa_key_pair" "default" {
  bits = 4096
}

resource "sshkey_ed25519_key_pair" "admin" {
  comment = "[email protected]"
}

output "default_key_fingerprint" {
  value = sshkey_rsa_key_pair.default.fingerprint_sha256
}

resource "local_file" "default_key" {
  filename        = "id.default"
  content         = sshkey_rsa_key_pair.default.private_key_pem
  file_permission = "0600"
}

resource "aws_key_pair" "default" {
  key_name   = "default"
  public_key = sshkey_rsa_key_pair.default.public_key
}

terraform-provider-sshkey's People

Contributors

daveadams avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

terraform-provider-sshkey's Issues

LICENSE

Hi @daveadams

What License are you distributing you code under?

Thanks
Justin

private is not including the comment

Neither the RSA nor the ED25519 key is including the comment.

Using the example code

➜  ssh-keygen -l -f id.default
4096 SHA256:FQtwtC0luWBa/OL6rSm6lMRbdClUI7cvz3fgxIOXzE4 no comment (RSA)

using openssh cli

➜  ssh-keygen -t ed25519 -f id_ed25519 -N "" -C "[email protected]"
Generating public/private ed25519 key pair.
Your identification has been saved in id_ed25519
Your public key has been saved in id_ed25519.pub
The key fingerprint is:
SHA256:nQURwP9em16wjSoIh24uTGcoTJ/peuVVaDLBge28NAc [email protected]
The key's randomart image is:
+--[ED25519 256]--+
|     +.o..+o     |
|    . E .  .     |
|     o o o  .    |
|  .   B +.oo     |
| o . = OS.o.  .  |
|  o * B o   . .= |
|   = * + . . .ooo|
|    = + . . ..o. |
|  .o +.    ....  |
+----[SHA256]-----+

➜  ssh-keygen -l -f id_ed25519
256 SHA256:nQURwP9em16wjSoIh24uTGcoTJ/peuVVaDLBge28NAc [email protected] (ED25519)

I quickly looked into the code, but couldn't figure out at which stage the comment should be added to the key.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.