» google_os_login_ssh_public_key

The SSH public key information associated with a Google account.

To get more information about SSHPublicKey, see:

» Example Usage - Os Login Ssh Key Provided User

data "google_client_openid_userinfo" "me" {

resource "google_os_login_ssh_public_key" "cache" {
  user =  data.google_client_openid_userinfo.me.email
  key = file("path/to/id_rsa.pub")

» Argument Reference

The following arguments are supported:

  • key - (Required) Public key text in SSH format, defined by RFC4253 section 6.6.

  • user - (Required) The user email.

» Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format users/{{user}}/sshPublicKeys/{{fingerprint}}

  • fingerprint - The SHA-256 fingerprint of the SSH public key.

» Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • update - Default is 4 minutes.
  • delete - Default is 4 minutes.

» Import

SSHPublicKey can be imported using any of these accepted formats:

$ terraform import google_os_login_ssh_public_key.default users/{{user}}/sshPublicKeys/{{fingerprint}}
$ terraform import google_os_login_ssh_public_key.default {{user}}/{{fingerprint}}