published on Tuesday, Oct 20, 2026 by Pulumi
published on Tuesday, Oct 20, 2026 by Pulumi
A Storage FTP User resource supporting directory mappings and user credentials for an SFTP Server.
Example Usage
Storage Ftp User Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bucket = new gcp.storage.Bucket("bucket", {
name: "sftp-bucket",
location: "US",
uniformBucketLevelAccess: true,
});
const sa = new gcp.serviceaccount.Account("sa", {
accountId: "sftp-sa",
displayName: "Storage FTP Service Account",
});
const server = new gcp.storage.FtpServer("server", {
location: "us-west1",
serverId: "sftp-srv",
displayName: "My SFTP Server",
accessType: "EXTERNAL",
externalConfig: {
allowedCidrBlocks: [
"192.168.1.0/24",
"10.0.0.0/8",
],
},
});
const userFtp = new gcp.storage.FtpUser("user_ftp", {
location: "us-west1",
serverId: server.serverId,
userId: "sftp-user",
customerServiceAccount: sa.email,
storageDirectoryMappings: [
{
bucket: bucket.name,
bucketPrefix: "my-prefix-1",
directory: "/dir-1",
permission: "READ_ONLY",
},
{
bucket: bucket.name,
bucketPrefix: "my-prefix-2",
directory: "/dir-2",
permission: "READ_ONLY",
},
],
userCredentials: [{
credentialName: "ssh-key-credential",
credentialType: "PUBLIC_KEY",
sshPublicKeyBody: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com",
}],
});
import pulumi
import pulumi_gcp as gcp
bucket = gcp.storage.Bucket("bucket",
name="sftp-bucket",
location="US",
uniform_bucket_level_access=True)
sa = gcp.serviceaccount.Account("sa",
account_id="sftp-sa",
display_name="Storage FTP Service Account")
server = gcp.storage.FtpServer("server",
location="us-west1",
server_id="sftp-srv",
display_name="My SFTP Server",
access_type="EXTERNAL",
external_config={
"allowed_cidr_blocks": [
"192.168.1.0/24",
"10.0.0.0/8",
],
})
user_ftp = gcp.storage.FtpUser("user_ftp",
location="us-west1",
server_id=server.server_id,
user_id="sftp-user",
customer_service_account=sa.email,
storage_directory_mappings=[
{
"bucket": bucket.name,
"bucket_prefix": "my-prefix-1",
"directory": "/dir-1",
"permission": "READ_ONLY",
},
{
"bucket": bucket.name,
"bucket_prefix": "my-prefix-2",
"directory": "/dir-2",
"permission": "READ_ONLY",
},
],
user_credentials=[{
"credential_name": "ssh-key-credential",
"credential_type": "PUBLIC_KEY",
"ssh_public_key_body": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com",
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/serviceaccount"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
Name: pulumi.String("sftp-bucket"),
Location: pulumi.String("US"),
UniformBucketLevelAccess: pulumi.Bool(true),
})
if err != nil {
return err
}
sa, err := serviceaccount.NewAccount(ctx, "sa", &serviceaccount.AccountArgs{
AccountId: pulumi.String("sftp-sa"),
DisplayName: pulumi.String("Storage FTP Service Account"),
})
if err != nil {
return err
}
server, err := storage.NewFtpServer(ctx, "server", &storage.FtpServerArgs{
Location: pulumi.String("us-west1"),
ServerId: pulumi.String("sftp-srv"),
DisplayName: pulumi.String("My SFTP Server"),
AccessType: pulumi.String("EXTERNAL"),
ExternalConfig: &storage.FtpServerExternalConfigArgs{
AllowedCidrBlocks: pulumi.StringArray{
pulumi.String("192.168.1.0/24"),
pulumi.String("10.0.0.0/8"),
},
},
})
if err != nil {
return err
}
_, err = storage.NewFtpUser(ctx, "user_ftp", &storage.FtpUserArgs{
Location: pulumi.String("us-west1"),
ServerId: server.ServerId,
UserId: pulumi.String("sftp-user"),
CustomerServiceAccount: sa.Email,
StorageDirectoryMappings: storage.FtpUserStorageDirectoryMappingArray{
&storage.FtpUserStorageDirectoryMappingArgs{
Bucket: bucket.Name,
BucketPrefix: pulumi.String("my-prefix-1"),
Directory: pulumi.String("/dir-1"),
Permission: pulumi.String("READ_ONLY"),
},
&storage.FtpUserStorageDirectoryMappingArgs{
Bucket: bucket.Name,
BucketPrefix: pulumi.String("my-prefix-2"),
Directory: pulumi.String("/dir-2"),
Permission: pulumi.String("READ_ONLY"),
},
},
UserCredentials: storage.FtpUserUserCredentialArray{
&storage.FtpUserUserCredentialArgs{
CredentialName: pulumi.String("ssh-key-credential"),
CredentialType: pulumi.String("PUBLIC_KEY"),
SshPublicKeyBody: pulumi.String("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var bucket = new Gcp.Storage.Bucket("bucket", new()
{
Name = "sftp-bucket",
Location = "US",
UniformBucketLevelAccess = true,
});
var sa = new Gcp.ServiceAccount.Account("sa", new()
{
AccountId = "sftp-sa",
DisplayName = "Storage FTP Service Account",
});
var server = new Gcp.Storage.FtpServer("server", new()
{
Location = "us-west1",
ServerId = "sftp-srv",
DisplayName = "My SFTP Server",
AccessType = "EXTERNAL",
ExternalConfig = new Gcp.Storage.Inputs.FtpServerExternalConfigArgs
{
AllowedCidrBlocks = new[]
{
"192.168.1.0/24",
"10.0.0.0/8",
},
},
});
var userFtp = new Gcp.Storage.FtpUser("user_ftp", new()
{
Location = "us-west1",
ServerId = server.ServerId,
UserId = "sftp-user",
CustomerServiceAccount = sa.Email,
StorageDirectoryMappings = new[]
{
new Gcp.Storage.Inputs.FtpUserStorageDirectoryMappingArgs
{
Bucket = bucket.Name,
BucketPrefix = "my-prefix-1",
Directory = "/dir-1",
Permission = "READ_ONLY",
},
new Gcp.Storage.Inputs.FtpUserStorageDirectoryMappingArgs
{
Bucket = bucket.Name,
BucketPrefix = "my-prefix-2",
Directory = "/dir-2",
Permission = "READ_ONLY",
},
},
UserCredentials = new[]
{
new Gcp.Storage.Inputs.FtpUserUserCredentialArgs
{
CredentialName = "ssh-key-credential",
CredentialType = "PUBLIC_KEY",
SshPublicKeyBody = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.storage.FtpServer;
import com.pulumi.gcp.storage.FtpServerArgs;
import com.pulumi.gcp.storage.inputs.FtpServerExternalConfigArgs;
import com.pulumi.gcp.storage.FtpUser;
import com.pulumi.gcp.storage.FtpUserArgs;
import com.pulumi.gcp.storage.inputs.FtpUserStorageDirectoryMappingArgs;
import com.pulumi.gcp.storage.inputs.FtpUserUserCredentialArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 bucket = new Bucket("bucket", BucketArgs.builder()
.name("sftp-bucket")
.location("US")
.uniformBucketLevelAccess(true)
.build());
var sa = new Account("sa", AccountArgs.builder()
.accountId("sftp-sa")
.displayName("Storage FTP Service Account")
.build());
var server = new FtpServer("server", FtpServerArgs.builder()
.location("us-west1")
.serverId("sftp-srv")
.displayName("My SFTP Server")
.accessType("EXTERNAL")
.externalConfig(FtpServerExternalConfigArgs.builder()
.allowedCidrBlocks(
"192.168.1.0/24",
"10.0.0.0/8")
.build())
.build());
var userFtp = new FtpUser("userFtp", FtpUserArgs.builder()
.location("us-west1")
.serverId(server.serverId())
.userId("sftp-user")
.customerServiceAccount(sa.email())
.storageDirectoryMappings(
FtpUserStorageDirectoryMappingArgs.builder()
.bucket(bucket.name())
.bucketPrefix("my-prefix-1")
.directory("/dir-1")
.permission("READ_ONLY")
.build(),
FtpUserStorageDirectoryMappingArgs.builder()
.bucket(bucket.name())
.bucketPrefix("my-prefix-2")
.directory("/dir-2")
.permission("READ_ONLY")
.build())
.userCredentials(FtpUserUserCredentialArgs.builder()
.credentialName("ssh-key-credential")
.credentialType("PUBLIC_KEY")
.sshPublicKeyBody("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com")
.build())
.build());
}
}
resources:
bucket:
type: gcp:storage:Bucket
properties:
name: sftp-bucket
location: US
uniformBucketLevelAccess: true
sa:
type: gcp:serviceaccount:Account
properties:
accountId: sftp-sa
displayName: Storage FTP Service Account
server:
type: gcp:storage:FtpServer
properties:
location: us-west1
serverId: sftp-srv
displayName: My SFTP Server
accessType: EXTERNAL
externalConfig:
allowedCidrBlocks:
- 192.168.1.0/24
- 10.0.0.0/8
userFtp:
type: gcp:storage:FtpUser
name: user_ftp
properties:
location: us-west1
serverId: ${server.serverId}
userId: sftp-user
customerServiceAccount: ${sa.email}
storageDirectoryMappings:
- bucket: ${bucket.name}
bucketPrefix: my-prefix-1
directory: /dir-1
permission: READ_ONLY
- bucket: ${bucket.name}
bucketPrefix: my-prefix-2
directory: /dir-2
permission: READ_ONLY
userCredentials:
- credentialName: ssh-key-credential
credentialType: PUBLIC_KEY
sshPublicKeyBody: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_storage_bucket" "bucket" {
lifecycle {
create_before_destroy = true
}
name = "sftp-bucket"
location = "US"
uniform_bucket_level_access = true
}
resource "gcp_serviceaccount_account" "sa" {
lifecycle {
create_before_destroy = true
}
account_id = "sftp-sa"
display_name = "Storage FTP Service Account"
}
resource "gcp_storage_ftp_server" "server" {
lifecycle {
create_before_destroy = true
}
location = "us-west1"
server_id = "sftp-srv"
display_name = "My SFTP Server"
access_type = "EXTERNAL"
external_config = {
allowed_cidr_blocks = ["192.168.1.0/24", "10.0.0.0/8"]
}
}
resource "gcp_storage_ftp_user" "user_ftp" {
lifecycle {
create_before_destroy = true
}
location = "us-west1"
server_id = gcp_storage_ftp_server.server.server_id
user_id = "sftp-user"
customer_service_account = gcp_serviceaccount_account.sa.email
storage_directory_mappings {
bucket = gcp_storage_bucket.bucket.name
bucket_prefix = "my-prefix-1"
directory = "/dir-1"
permission = "READ_ONLY"
}
storage_directory_mappings {
bucket = gcp_storage_bucket.bucket.name
bucket_prefix = "my-prefix-2"
directory = "/dir-2"
permission = "READ_ONLY"
}
user_credentials {
credential_name = "ssh-key-credential"
credential_type = "PUBLIC_KEY"
ssh_public_key_body = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM4pxpbPpjuBocS6qlW0BHRYgH5xmv/yVrANZR9lc1N user@example.com"
}
}
Create FtpUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FtpUser(name: string, args: FtpUserArgs, opts?: CustomResourceOptions);@overload
def FtpUser(resource_name: str,
args: FtpUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FtpUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
customer_service_account: Optional[str] = None,
location: Optional[str] = None,
server_id: Optional[str] = None,
user_id: Optional[str] = None,
deletion_policy: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
storage_directory_mappings: Optional[Sequence[FtpUserStorageDirectoryMappingArgs]] = None,
user_credentials: Optional[Sequence[FtpUserUserCredentialArgs]] = None)func NewFtpUser(ctx *Context, name string, args FtpUserArgs, opts ...ResourceOption) (*FtpUser, error)public FtpUser(string name, FtpUserArgs args, CustomResourceOptions? opts = null)
public FtpUser(String name, FtpUserArgs args)
public FtpUser(String name, FtpUserArgs args, CustomResourceOptions options)
type: gcp:storage:FtpUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_storage_ftp_user" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FtpUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FtpUserArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FtpUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FtpUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FtpUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ftpUserResource = new Gcp.Storage.FtpUser("ftpUserResource", new()
{
CustomerServiceAccount = "string",
Location = "string",
ServerId = "string",
UserId = "string",
DeletionPolicy = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
StorageDirectoryMappings = new[]
{
new Gcp.Storage.Inputs.FtpUserStorageDirectoryMappingArgs
{
Bucket = "string",
BucketPrefix = "string",
Directory = "string",
Permission = "string",
},
},
UserCredentials = new[]
{
new Gcp.Storage.Inputs.FtpUserUserCredentialArgs
{
CredentialName = "string",
CredentialType = "string",
SshPublicKeyBody = "string",
},
},
});
example, err := storage.NewFtpUser(ctx, "ftpUserResource", &storage.FtpUserArgs{
CustomerServiceAccount: pulumi.String("string"),
Location: pulumi.String("string"),
ServerId: pulumi.String("string"),
UserId: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
StorageDirectoryMappings: storage.FtpUserStorageDirectoryMappingArray{
&storage.FtpUserStorageDirectoryMappingArgs{
Bucket: pulumi.String("string"),
BucketPrefix: pulumi.String("string"),
Directory: pulumi.String("string"),
Permission: pulumi.String("string"),
},
},
UserCredentials: storage.FtpUserUserCredentialArray{
&storage.FtpUserUserCredentialArgs{
CredentialName: pulumi.String("string"),
CredentialType: pulumi.String("string"),
SshPublicKeyBody: pulumi.String("string"),
},
},
})
resource "gcp_storage_ftp_user" "ftpUserResource" {
lifecycle {
create_before_destroy = true
}
customer_service_account = "string"
location = "string"
server_id = "string"
user_id = "string"
deletion_policy = "string"
labels = {
"string" = "string"
}
project = "string"
storage_directory_mappings {
bucket = "string"
bucket_prefix = "string"
directory = "string"
permission = "string"
}
user_credentials {
credential_name = "string"
credential_type = "string"
ssh_public_key_body = "string"
}
}
var ftpUserResource = new FtpUser("ftpUserResource", FtpUserArgs.builder()
.customerServiceAccount("string")
.location("string")
.serverId("string")
.userId("string")
.deletionPolicy("string")
.labels(Map.of("string", "string"))
.project("string")
.storageDirectoryMappings(FtpUserStorageDirectoryMappingArgs.builder()
.bucket("string")
.bucketPrefix("string")
.directory("string")
.permission("string")
.build())
.userCredentials(FtpUserUserCredentialArgs.builder()
.credentialName("string")
.credentialType("string")
.sshPublicKeyBody("string")
.build())
.build());
ftp_user_resource = gcp.storage.FtpUser("ftpUserResource",
customer_service_account="string",
location="string",
server_id="string",
user_id="string",
deletion_policy="string",
labels={
"string": "string",
},
project="string",
storage_directory_mappings=[{
"bucket": "string",
"bucket_prefix": "string",
"directory": "string",
"permission": "string",
}],
user_credentials=[{
"credential_name": "string",
"credential_type": "string",
"ssh_public_key_body": "string",
}])
const ftpUserResource = new gcp.storage.FtpUser("ftpUserResource", {
customerServiceAccount: "string",
location: "string",
serverId: "string",
userId: "string",
deletionPolicy: "string",
labels: {
string: "string",
},
project: "string",
storageDirectoryMappings: [{
bucket: "string",
bucketPrefix: "string",
directory: "string",
permission: "string",
}],
userCredentials: [{
credentialName: "string",
credentialType: "string",
sshPublicKeyBody: "string",
}],
});
type: gcp:storage:FtpUser
properties:
customerServiceAccount: string
deletionPolicy: string
labels:
string: string
location: string
project: string
serverId: string
storageDirectoryMappings:
- bucket: string
bucketPrefix: string
directory: string
permission: string
userCredentials:
- credentialName: string
credentialType: string
sshPublicKeyBody: string
userId: string
FtpUser Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FtpUser resource accepts the following input properties:
- Customer
Service stringAccount - The email address of the service account associated with the user.
- Location string
- The location (region) of the Storage FTP User.
- Server
Id string - The ID of the server.
- User
Id string - The unique ID for the user.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Labels Dictionary<string, string>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Storage
Directory List<FtpMappings User Storage Directory Mapping> - Directory mappings for the Storage FTP user. Structure is documented below.
- User
Credentials List<FtpUser User Credential> - The credentials associated with the user. Structure is documented below.
- Customer
Service stringAccount - The email address of the service account associated with the user.
- Location string
- The location (region) of the Storage FTP User.
- Server
Id string - The ID of the server.
- User
Id string - The unique ID for the user.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Labels map[string]string
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Storage
Directory []FtpMappings User Storage Directory Mapping Args - Directory mappings for the Storage FTP user. Structure is documented below.
- User
Credentials []FtpUser User Credential Args - The credentials associated with the user. Structure is documented below.
- customer_
service_ stringaccount - The email address of the service account associated with the user.
- location string
- The location (region) of the Storage FTP User.
- server_
id string - The ID of the server.
- user_
id string - The unique ID for the user.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- labels map(string)
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- storage_
directory_ list(object)mappings - Directory mappings for the Storage FTP user. Structure is documented below.
- user_
credentials list(object) - The credentials associated with the user. Structure is documented below.
- customer
Service StringAccount - The email address of the service account associated with the user.
- location String
- The location (region) of the Storage FTP User.
- server
Id String - The ID of the server.
- user
Id String - The unique ID for the user.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- labels Map<String,String>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- storage
Directory List<FtpMappings User Storage Directory Mapping> - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials List<FtpUser User Credential> - The credentials associated with the user. Structure is documented below.
- customer
Service stringAccount - The email address of the service account associated with the user.
- location string
- The location (region) of the Storage FTP User.
- server
Id string - The ID of the server.
- user
Id string - The unique ID for the user.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- labels {[key: string]: string}
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- storage
Directory FtpMappings User Storage Directory Mapping[] - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials FtpUser User Credential[] - The credentials associated with the user. Structure is documented below.
- customer_
service_ straccount - The email address of the service account associated with the user.
- location str
- The location (region) of the Storage FTP User.
- server_
id str - The ID of the server.
- user_
id str - The unique ID for the user.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- labels Mapping[str, str]
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- storage_
directory_ Sequence[Ftpmappings User Storage Directory Mapping Args] - Directory mappings for the Storage FTP user. Structure is documented below.
- user_
credentials Sequence[FtpUser User Credential Args] - The credentials associated with the user. Structure is documented below.
- customer
Service StringAccount - The email address of the service account associated with the user.
- location String
- The location (region) of the Storage FTP User.
- server
Id String - The ID of the server.
- user
Id String - The unique ID for the user.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- labels Map<String>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- storage
Directory List<Property Map>Mappings - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials List<Property Map> - The credentials associated with the user. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the FtpUser resource produces the following output properties:
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- The provisioning status of the user.
- Username string
- The SFTP login username for the user.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- The provisioning status of the user.
- Username string
- The SFTP login username for the user.
- effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- The provisioning status of the user.
- username string
- The SFTP login username for the user.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- The provisioning status of the user.
- username String
- The SFTP login username for the user.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- The provisioning status of the user.
- username string
- The SFTP login username for the user.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- state str
- The provisioning status of the user.
- username str
- The SFTP login username for the user.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- The provisioning status of the user.
- username String
- The SFTP login username for the user.
Look up Existing FtpUser Resource
Get an existing FtpUser 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?: FtpUserState, opts?: CustomResourceOptions): FtpUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
customer_service_account: Optional[str] = None,
deletion_policy: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
server_id: Optional[str] = None,
state: Optional[str] = None,
storage_directory_mappings: Optional[Sequence[FtpUserStorageDirectoryMappingArgs]] = None,
user_credentials: Optional[Sequence[FtpUserUserCredentialArgs]] = None,
user_id: Optional[str] = None,
username: Optional[str] = None) -> FtpUserfunc GetFtpUser(ctx *Context, name string, id IDInput, state *FtpUserState, opts ...ResourceOption) (*FtpUser, error)public static FtpUser Get(string name, Input<string> id, FtpUserState? state, CustomResourceOptions? opts = null)public static FtpUser get(String name, Output<String> id, FtpUserState state, CustomResourceOptions options)resources: _: type: gcp:storage:FtpUser get: id: ${id}import {
to = gcp_storage_ftp_user.example
id = "${id}"
}
- 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.
- 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.
- Customer
Service stringAccount - The email address of the service account associated with the user.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- Location string
- The location (region) of the Storage FTP User.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Server
Id string - The ID of the server.
- State string
- The provisioning status of the user.
- Storage
Directory List<FtpMappings User Storage Directory Mapping> - Directory mappings for the Storage FTP user. Structure is documented below.
- User
Credentials List<FtpUser User Credential> - The credentials associated with the user. Structure is documented below.
- User
Id string - The unique ID for the user.
- Username string
- The SFTP login username for the user.
- Customer
Service stringAccount - The email address of the service account associated with the user.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- Location string
- The location (region) of the Storage FTP User.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Server
Id string - The ID of the server.
- State string
- The provisioning status of the user.
- Storage
Directory []FtpMappings User Storage Directory Mapping Args - Directory mappings for the Storage FTP user. Structure is documented below.
- User
Credentials []FtpUser User Credential Args - The credentials associated with the user. Structure is documented below.
- User
Id string - The unique ID for the user.
- Username string
- The SFTP login username for the user.
- customer_
service_ stringaccount - The email address of the service account associated with the user.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels map(string)
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- location string
- The location (region) of the Storage FTP User.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- server_
id string - The ID of the server.
- state string
- The provisioning status of the user.
- storage_
directory_ list(object)mappings - Directory mappings for the Storage FTP user. Structure is documented below.
- user_
credentials list(object) - The credentials associated with the user. Structure is documented below.
- user_
id string - The unique ID for the user.
- username string
- The SFTP login username for the user.
- customer
Service StringAccount - The email address of the service account associated with the user.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- location String
- The location (region) of the Storage FTP User.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- server
Id String - The ID of the server.
- state String
- The provisioning status of the user.
- storage
Directory List<FtpMappings User Storage Directory Mapping> - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials List<FtpUser User Credential> - The credentials associated with the user. Structure is documented below.
- user
Id String - The unique ID for the user.
- username String
- The SFTP login username for the user.
- customer
Service stringAccount - The email address of the service account associated with the user.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- location string
- The location (region) of the Storage FTP User.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- server
Id string - The ID of the server.
- state string
- The provisioning status of the user.
- storage
Directory FtpMappings User Storage Directory Mapping[] - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials FtpUser User Credential[] - The credentials associated with the user. Structure is documented below.
- user
Id string - The unique ID for the user.
- username string
- The SFTP login username for the user.
- customer_
service_ straccount - The email address of the service account associated with the user.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- location str
- The location (region) of the Storage FTP User.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- server_
id str - The ID of the server.
- state str
- The provisioning status of the user.
- storage_
directory_ Sequence[Ftpmappings User Storage Directory Mapping Args] - Directory mappings for the Storage FTP user. Structure is documented below.
- user_
credentials Sequence[FtpUser User Credential Args] - The credentials associated with the user. Structure is documented below.
- user_
id str - The unique ID for the user.
- username str
- The SFTP login username for the user.
- customer
Service StringAccount - The email address of the service account associated with the user.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
Resource labels that can contain user-provided metadata.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effectiveLabelsfor all of the labels present on the resource.- location String
- The location (region) of the Storage FTP User.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- server
Id String - The ID of the server.
- state String
- The provisioning status of the user.
- storage
Directory List<Property Map>Mappings - Directory mappings for the Storage FTP user. Structure is documented below.
- user
Credentials List<Property Map> - The credentials associated with the user. Structure is documented below.
- user
Id String - The unique ID for the user.
- username String
- The SFTP login username for the user.
Supporting Types
FtpUserStorageDirectoryMapping, FtpUserStorageDirectoryMappingArgs
- Bucket string
- The Cloud Storage bucket name. Omit the gs://.
- Bucket
Prefix string - The path of a folder within the bucket to set as the root directory for this directory mapping.
- Directory string
- The directory path in the virtual file system.
- Permission string
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- Bucket string
- The Cloud Storage bucket name. Omit the gs://.
- Bucket
Prefix string - The path of a folder within the bucket to set as the root directory for this directory mapping.
- Directory string
- The directory path in the virtual file system.
- Permission string
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- bucket string
- The Cloud Storage bucket name. Omit the gs://.
- bucket_
prefix string - The path of a folder within the bucket to set as the root directory for this directory mapping.
- directory string
- The directory path in the virtual file system.
- permission string
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- bucket String
- The Cloud Storage bucket name. Omit the gs://.
- bucket
Prefix String - The path of a folder within the bucket to set as the root directory for this directory mapping.
- directory String
- The directory path in the virtual file system.
- permission String
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- bucket string
- The Cloud Storage bucket name. Omit the gs://.
- bucket
Prefix string - The path of a folder within the bucket to set as the root directory for this directory mapping.
- directory string
- The directory path in the virtual file system.
- permission string
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- bucket str
- The Cloud Storage bucket name. Omit the gs://.
- bucket_
prefix str - The path of a folder within the bucket to set as the root directory for this directory mapping.
- directory str
- The directory path in the virtual file system.
- permission str
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
- bucket String
- The Cloud Storage bucket name. Omit the gs://.
- bucket
Prefix String - The path of a folder within the bucket to set as the root directory for this directory mapping.
- directory String
- The directory path in the virtual file system.
- permission String
- The access level for the directory. For read-only access, set this value to READ_ONLY. For read and write access, set this value to READ_WRITE.
Possible values are:
READ_ONLY,READ_WRITE.
FtpUserUserCredential, FtpUserUserCredentialArgs
- Credential
Name string - The name of the credential.
- Credential
Type string - The type of the credential.
- Ssh
Public stringKey Body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- Credential
Name string - The name of the credential.
- Credential
Type string - The type of the credential.
- Ssh
Public stringKey Body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- credential_
name string - The name of the credential.
- credential_
type string - The type of the credential.
- ssh_
public_ stringkey_ body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- credential
Name String - The name of the credential.
- credential
Type String - The type of the credential.
- ssh
Public StringKey Body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- credential
Name string - The name of the credential.
- credential
Type string - The type of the credential.
- ssh
Public stringKey Body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- credential_
name str - The name of the credential.
- credential_
type str - The type of the credential.
- ssh_
public_ strkey_ body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
- credential
Name String - The name of the credential.
- credential
Type String - The type of the credential.
- ssh
Public StringKey Body - The SSH public key body. A file either absolute or relative path should be provided which contains the ssh public key using file() interpolation in Terraform, not recommended to have key as a literal string in config.
Import
User can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/servers/{{server_id}}/users/{{user_id}}{{project}}/{{location}}/{{server_id}}/{{user_id}}{{location}}/{{server_id}}/{{user_id}}
When using the pulumi import command, User can be imported using one of the formats above. For example:
$ pulumi import gcp:storage/ftpUser:FtpUser default projects/{{project}}/locations/{{location}}/servers/{{server_id}}/users/{{user_id}}
$ pulumi import gcp:storage/ftpUser:FtpUser default {{project}}/{{location}}/{{server_id}}/{{user_id}}
$ pulumi import gcp:storage/ftpUser:FtpUser default {{location}}/{{server_id}}/{{user_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Tuesday, Oct 20, 2026 by Pulumi