Skip to content

Commit

Permalink
Fix aws_transfer_user document
Browse files Browse the repository at this point in the history
  • Loading branch information
teraken0509 committed Dec 19, 2018
1 parent dd68c2a commit 098682c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions website/docs/r/transfer_user.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ resource "aws_transfer_server" "foo" {
}
}
resource "aws_iam_role" "foo" {
name = "tf-test-transfer-user-iam-role-%s"
name = "tf-test-transfer-user-iam-role"
assume_role_policy = <<EOF
{
Expand All @@ -41,7 +40,7 @@ EOF
}
resource "aws_iam_role_policy" "foo" {
name = "tf-test-transfer-user-iam-policy-%s"
name = "tf-test-transfer-user-iam-policy"
role = "${aws_iam_role.foo.id}"
policy = <<POLICY
{
Expand All @@ -60,15 +59,10 @@ resource "aws_iam_role_policy" "foo" {
POLICY
}
resource "aws_transfer_user" "foo" {
server_id = "${aws_transfer_server.foo.id}"
user_name = "tftestuser"
role = "${aws_iam_role.foo.arn}"
tags {
NAME = "tftestuser"
}
}
```
Expand All @@ -80,8 +74,8 @@ The following arguments are supported:
* `server_id` - (Requirement) The Server ID of the Transfer Server (e.g. `s-12345678`)
* `user_name` - (Requirement) The name used for log in to your SFTP server.
* `home_directory` - (Optional) The landing directory (folder) for a user when they log in to the server using their SFTP client.
* `policy` - (Optional) The policy scopes down user access to portions of their Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.
* `role` - (Optional) Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
* `policy` - (Optional) An IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. Since the IAM variable syntax matches Terraform's interpolation syntax, they must be escaped inside Terraform configuration strings (`$${Transfer:UserName}`).
* `role` - (Requirement) Amazon Resource Name (ARN) of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
* `tags` - (Optional) A mapping of tags to assign to the resource.

## Attributes Reference
Expand All @@ -91,8 +85,8 @@ In addition to all arguments above, the following attributes are exported:

## Import

Transfer user can be imported using the `user_name` and `server_id` separated by `/`.
Transfer Users can be imported using the `server_id` and `user_name` separated by `/`.

```
$ terraform import aws_transfer_user.bar test-username/s-12345678
$ terraform import aws_transfer_user.bar s-12345678/test-username
```

0 comments on commit 098682c

Please sign in to comment.