Server
Provides a AWS Transfer Server resource.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const fooRole = new aws.iam.Role("foo", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "transfer.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
`,
});
const fooRolePolicy = new aws.iam.RolePolicy("foo", {
policy: `{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowFullAccesstoCloudWatchLogs",
"Effect": "Allow",
"Action": [
"logs:*"
],
"Resource": "*"
}
]
}
`,
role: fooRole.id,
});
const fooServer = new aws.transfer.Server("foo", {
identityProviderType: "SERVICE_MANAGED",
loggingRole: fooRole.arn,
tags: {
ENV: "test",
NAME: "tf-acc-test-transfer-server",
},
});import pulumi
import pulumi_aws as aws
foo_role = aws.iam.Role("fooRole", assume_role_policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "transfer.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
""")
foo_role_policy = aws.iam.RolePolicy("fooRolePolicy",
policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowFullAccesstoCloudWatchLogs",
"Effect": "Allow",
"Action": [
"logs:*"
],
"Resource": "*"
}
]
}
""",
role=foo_role.id)
foo_server = aws.transfer.Server("fooServer",
identity_provider_type="SERVICE_MANAGED",
logging_role=foo_role.arn,
tags={
"ENV": "test",
"NAME": "tf-acc-test-transfer-server",
})using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fooRole = new Aws.Iam.Role("fooRole", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Effect"": ""Allow"",
""Principal"": {
""Service"": ""transfer.amazonaws.com""
},
""Action"": ""sts:AssumeRole""
}
]
}
",
});
var fooRolePolicy = new Aws.Iam.RolePolicy("fooRolePolicy", new Aws.Iam.RolePolicyArgs
{
Policy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Sid"": ""AllowFullAccesstoCloudWatchLogs"",
""Effect"": ""Allow"",
""Action"": [
""logs:*""
],
""Resource"": ""*""
}
]
}
",
Role = fooRole.Id,
});
var fooServer = new Aws.Transfer.Server("fooServer", new Aws.Transfer.ServerArgs
{
IdentityProviderType = "SERVICE_MANAGED",
LoggingRole = fooRole.Arn,
Tags =
{
{ "ENV", "test" },
{ "NAME", "tf-acc-test-transfer-server" },
},
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooRole, err := iam.NewRole(ctx, "fooRole", &iam.RoleArgs{
AssumeRolePolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Effect\": \"Allow\",\n", " \"Principal\": {\n", " \"Service\": \"transfer.amazonaws.com\"\n", " },\n", " \"Action\": \"sts:AssumeRole\"\n", " }\n", " ]\n", "}\n", "\n")),
})
if err != nil {
return err
}
_, err = iam.NewRolePolicy(ctx, "fooRolePolicy", &iam.RolePolicyArgs{
Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Sid\": \"AllowFullAccesstoCloudWatchLogs\",\n", " \"Effect\": \"Allow\",\n", " \"Action\": [\n", " \"logs:*\"\n", " ],\n", " \"Resource\": \"*\"\n", " }\n", " ]\n", "}\n", "\n")),
Role: fooRole.ID(),
})
if err != nil {
return err
}
_, err = transfer.NewServer(ctx, "fooServer", &transfer.ServerArgs{
IdentityProviderType: pulumi.String("SERVICE_MANAGED"),
LoggingRole: fooRole.Arn,
Tags: pulumi.StringMap{
"ENV": pulumi.String("test"),
"NAME": pulumi.String("tf-acc-test-transfer-server"),
},
})
if err != nil {
return err
}
return nil
})
}Create a Server Resource
new Server(name: string, args?: ServerArgs, opts?: CustomResourceOptions);def Server(resource_name, opts=None, endpoint_details=None, endpoint_type=None, force_destroy=None, host_key=None, identity_provider_type=None, invocation_role=None, logging_role=None, tags=None, url=None, __props__=None);func NewServer(ctx *Context, name string, args *ServerArgs, opts ...ResourceOption) (*Server, error)public Server(string name, ServerArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Server Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Server resource accepts the following input properties:
- Endpoint
Details ServerEndpoint Details Args The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- Endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- Force
Destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- Host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- Identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- Invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- Logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- Endpoint
Details ServerEndpoint Details The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- Endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- Force
Destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- Host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- Identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- Invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- Logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- map[string]string
A map of tags to assign to the resource.
- Url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- endpoint
Details ServerEndpoint Details The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- force
Destroy boolean A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- {[key: string]: string}
A map of tags to assign to the resource.
- url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- endpoint_
details Dict[ServerEndpoint Details] The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- endpoint_
type str The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- force_
destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- host_
key str RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- identity_
provider_ strtype The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- invocation_
role str Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- logging_
role str Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- Dict[str, str]
A map of tags to assign to the resource.
- url str
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
Outputs
All input properties are implicitly available as output properties. Additionally, the Server resource produces the following output properties:
- Arn string
Amazon Resource Name (ARN) of Transfer Server
- Endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- Host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- Id string
- The provider-assigned unique ID for this managed resource.
- Arn string
Amazon Resource Name (ARN) of Transfer Server
- Endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- Host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- Id string
- The provider-assigned unique ID for this managed resource.
- arn string
Amazon Resource Name (ARN) of Transfer Server
- endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- id string
- The provider-assigned unique ID for this managed resource.
- arn str
Amazon Resource Name (ARN) of Transfer Server
- endpoint str
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- host_
key_ strfingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- id str
- The provider-assigned unique ID for this managed resource.
Look up an Existing Server Resource
Get an existing Server resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServerState, opts?: CustomResourceOptions): Serverstatic get(resource_name, id, opts=None, arn=None, endpoint=None, endpoint_details=None, endpoint_type=None, force_destroy=None, host_key=None, host_key_fingerprint=None, identity_provider_type=None, invocation_role=None, logging_role=None, tags=None, url=None, __props__=None);func GetServer(ctx *Context, name string, id IDInput, state *ServerState, opts ...ResourceOption) (*Server, error)public static Server Get(string name, Input<string> id, ServerState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of Transfer Server
- Endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- Endpoint
Details ServerEndpoint Details Args The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- Endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- Force
Destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- Host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- Host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- Identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- Invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- Logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- Arn string
Amazon Resource Name (ARN) of Transfer Server
- Endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- Endpoint
Details ServerEndpoint Details The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- Endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- Force
Destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- Host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- Host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- Identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- Invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- Logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- map[string]string
A map of tags to assign to the resource.
- Url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- arn string
Amazon Resource Name (ARN) of Transfer Server
- endpoint string
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- endpoint
Details ServerEndpoint Details The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- endpoint
Type string The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- force
Destroy boolean A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- host
Key string RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- host
Key stringFingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- identity
Provider stringType The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- invocation
Role string Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- logging
Role string Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- {[key: string]: string}
A map of tags to assign to the resource.
- url string
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
- arn str
Amazon Resource Name (ARN) of Transfer Server
- endpoint str
The endpoint of the Transfer Server (e.g.
s-12345678.server.transfer.REGION.amazonaws.com)- endpoint_
details Dict[ServerEndpoint Details] The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server. Fields documented below.
- endpoint_
type str The type of endpoint that you want your SFTP server connect to. If you connect to a
VPC_ENDPOINT, your SFTP server isn’t accessible over the public internet. If you want to connect your SFTP server via public internet, setPUBLIC. Defaults toPUBLIC.- force_
destroy bool A boolean that indicates all users associated with the server should be deleted so that the Server can be destroyed without error. The default value is
false.- host_
key str RSA private key (e.g. as generated by the
ssh-keygen -N "" -f my-new-server-keycommand).- host_
key_ strfingerprint This value contains the message-digest algorithm (MD5) hash of the server’s host key. This value is equivalent to the output of the
ssh-keygen -l -E md5 -f my-new-server-keycommand.- identity_
provider_ strtype The mode of authentication enabled for this service. The default value is
SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service.API_GATEWAYindicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.- invocation_
role str Amazon Resource Name (ARN) of the IAM role used to authenticate the user account with an
identity_provider_typeofAPI_GATEWAY.- logging_
role str Amazon Resource Name (ARN) of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
- Dict[str, str]
A map of tags to assign to the resource.
- url str
- URL of the service endpoint used to authenticate users with an
identity_provider_typeofAPI_GATEWAY.
- URL of the service endpoint used to authenticate users with an
Supporting Types
ServerEndpointDetails
- Vpc
Endpoint stringId The ID of the VPC endpoint.
- Vpc
Endpoint stringId The ID of the VPC endpoint.
- vpc
Endpoint stringId The ID of the VPC endpoint.
- vpc_
endpoint_ strid The ID of the VPC endpoint.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.