Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_transfer_user: Support "restricted" home directory #11632

Closed
hartsick opened this issue Jan 17, 2020 · 5 comments · Fixed by #12599
Closed

aws_transfer_user: Support "restricted" home directory #11632

hartsick opened this issue Jan 17, 2020 · 5 comments · Fixed by #12599
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/transfer Issues and PRs that pertain to the transfer service.
Milestone

Comments

@hartsick
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS Transfer for SFTP supports restricting a user's home directory:

"When a home directory is set to "Restricted", your users will not be able to access anything outside of that folder, nor will they be able to see the S3 bucket or folder name."

Screenshot attached.

Screen Shot 2020-01-16 at 4 49 08 PM

I couldn't find a way to do this via the Terraform resource (only could restrict access via a policy), but would be helpful to have available for setting up new accounts.

New or Affected Resource(s)

  • aws_transfer_user

Potential Terraform Configuration

resource "aws_transfer_user" "testuser" {
  server_id = "${aws_transfer_server.main.id}"
  user_name = "testuser"
  role      = "${aws_iam_role.default_access.arn}"
  home_directory = "/${aws_s3_bucket.default.bucket}"
  restricted = true

  tags = {
    NAME = "testuser"
  }
}
@hartsick hartsick added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 17, 2020
@ghost ghost added the service/transfer Issues and PRs that pertain to the transfer service. label Jan 17, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 17, 2020
@liamkelly-esure
Copy link

Have put the thumbs up reaction but please Terraform, can we get this added ASAP?

@krzysztof-magosa
Copy link

Restricted option seems to be "UI-sugar" for home directory mappings requested in #11281.

@bflad
Copy link
Contributor

bflad commented Sep 21, 2020

Hi folks 👋 The functionality for this appears to have been covered by the merge of #13591 which will release with version 3.8.0 of the Terraform AWS Provider, later this week. Since the AWS Console and the API represent this particular functionality differently (a "Restricted" checkbox versus a home_directory_mappings entry respectively), it might be great to see an additional example added to the resource documentation page (website/docs/r/transfer_user.html.markdown in this repository) that shows this, however that effort can be separately tracked and implemented, if desired. 👍

@bflad bflad closed this as completed Sep 21, 2020
@ghost
Copy link

ghost commented Sep 24, 2020

This has been released in version 3.8.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Oct 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/transfer Issues and PRs that pertain to the transfer service.
Projects
None yet
4 participants