Access
Provides a AWS Transfer Access resource.
Example Usage
Basic S3
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Access;
import com.pulumi.aws.transfer.AccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Access("example", AccessArgs.builder()
.externalId("S-1-1-12-1234567890-123456789-1234567890-1234")
.serverId(aws_transfer_server.example().id())
.role(aws_iam_role.example().arn())
.homeDirectory(String.format("/%s/", aws_s3_bucket.example().id()))
.build());
}
}
Content copied to clipboard
Basic EFS
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Access;
import com.pulumi.aws.transfer.AccessArgs;
import com.pulumi.aws.transfer.inputs.AccessPosixProfileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Access("test", AccessArgs.builder()
.externalId("S-1-1-12-1234567890-123456789-1234567890-1234")
.serverId(aws_transfer_server.test().id())
.role(aws_iam_role.test().arn())
.homeDirectory(String.format("/%s/", aws_efs_file_system.test().id()))
.posixProfile(AccessPosixProfileArgs.builder()
.gid(1000)
.uid(1000)
.build())
.build());
}
}
Content copied to clipboard
Import
Using pulumi import
, import Transfer Accesses using the server_id
and external_id
. For example:
$ pulumi import aws:transfer/access:Access example s-12345678/S-1-1-12-1234567890-123456789-1234567890-1234
Content copied to clipboard
Properties
Link copied to clipboard
The landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a /
. The first item in the path is the name of the home bucket (accessible as ${Transfer:HomeBucket}
in the policy) and the rest is the home directory (accessible as ${Transfer:HomeDirectory}
in the policy). For example, /example-bucket-1234/username
would set the home bucket to example-bucket-1234
and the home directory to username
.