Skip to content

Commit

Permalink
wrap hime directory in a function sub
Browse files Browse the repository at this point in the history
  • Loading branch information
Guslington committed Mar 17, 2021
1 parent 69fa822 commit c7ca5d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sftp.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,10 @@

else

home_directory = user.has_key?('home') ? "/#{user['bucket']}#{user['home']}" : "/#{user['bucket']}/home/#{user['name']}"

Transfer_User("#{user['name']}SftpUser") {
HomeDirectory user.has_key?('home') ? "/#{user['bucket']}#{user['home']}" : "/#{user['bucket']}/home/#{user['name']}"
HomeDirectory FnSub(home_directory)
UserName user['name']
ServerId FnGetAtt(:SftpServer, :ServerId)
Role FnGetAtt("#{user['name']}SftpAccessRole", :Arn)
Expand Down

0 comments on commit c7ca5d7

Please sign in to comment.