Skip to content

Commit 49c5137

Browse files
committed
provider/aws: Add documentation for aws_iam_user_ssh_key resource
1 parent 7e61947 commit 49c5137

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
```
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+

website/source/layouts/aws.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@
388388
<a href="/docs/providers/aws/r/iam_user_policy.html">aws_iam_user_policy</a>
389389
</li>
390390

391+
<li<%= sidebar_current("docs-aws-resource-iam-user-ssh-key") %>>
392+
<a href="/docs/providers/aws/r/iam_user_ssh_key.html">aws_iam_user_ssh_key</a>
393+
</li>
394+
391395
</ul>
392396
</li>
393397

0 commit comments

Comments
 (0)