github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/iam_user_ssh_key.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_iam_user_ssh_key"
     4  sidebar_current: "docs-aws-resource-iam-user-ssh-key"
     5  description: |-
     6    Uploads an SSH public key and associates it with the specified IAM user.
     7  ---
     8  
     9  # aws\_iam\_user\_ssh\_key
    10  
    11  Uploads an SSH public key and associates it with the specified IAM user.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_iam_user" "user" {
    17    name = "test-user"
    18    path = "/"
    19  }
    20  
    21  resource "aws_iam_user_ssh_key" "user" {
    22    username   = "${aws_iam_user.user.name}"
    23    encoding   = "PEM"
    24    public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 mytest@mydomain.com"
    25  }
    26  ```
    27  
    28  ## Argument Reference
    29  
    30  The following arguments are supported:
    31  
    32  * `username` - (Required) The name of the IAM user to associate the SSH public key with.
    33  * `encoding` - (Required) Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use SSH . To retrieve the public key in PEM format, use PEM .
    34  * `public_key` - (Required) The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
    35  * `status` - (Optional) The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used. Default is `active`.
    36  
    37  ## Attributes Reference
    38  
    39  The following attributes are exported:
    40  
    41  * `ssh_public_key_id` - The unique identifier for the SSH public key.
    42  * `fingerprint` - The MD5 message digest of the SSH public key.
    43