published on Thursday, Aug 20, 2026 by jschady
published on Thursday, Aug 20, 2026 by jschady
An SFTP Host Key is a cryptographic key used to verify the identity of the server during an SFTP connection. This allows the client to be sure that it is connecting to the intended server, preventing man-in-the-middle attacks and ensuring secure communication between the client and Files.com.
Files.com allows you to provide custom SFTP Host Keys, which is particularly useful when migrating to Files.com from an existing SFTP server, allowing the Files.com platform to match your previously-installed host key for a seamless transition.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as filescom from "pulumi-filescom";
const exampleSftpHostKey = new filescom.SftpHostKey("example_sftp_host_key", {name: "My Key"});
import pulumi
import pulumi_filescom as filescom
example_sftp_host_key = filescom.SftpHostKey("example_sftp_host_key", name="My Key")
package main
import (
"github.com/jschady/pulumi-filescom/sdk/go/filescom"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := filescom.NewSftpHostKey(ctx, "example_sftp_host_key", &filescom.SftpHostKeyArgs{
Name: pulumi.String("My Key"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Filescom = Jschady.Filescom;
return await Deployment.RunAsync(() =>
{
var exampleSftpHostKey = new Filescom.SftpHostKey("example_sftp_host_key", new()
{
Name = "My Key",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.filescom.SftpHostKey;
import com.pulumi.filescom.SftpHostKeyArgs;
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 exampleSftpHostKey = new SftpHostKey("exampleSftpHostKey", SftpHostKeyArgs.builder()
.name("My Key")
.build());
}
}
resources:
exampleSftpHostKey:
type: filescom:SftpHostKey
name: example_sftp_host_key
properties:
name: My Key
pulumi {
required_providers {
filescom = {
source = "pulumi/filescom"
}
}
}
resource "filescom_sftphostkey" "example_sftp_host_key" {
name = "My Key"
}
Create SftpHostKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SftpHostKey(name: string, args?: SftpHostKeyArgs, opts?: CustomResourceOptions);@overload
def SftpHostKey(resource_name: str,
args: Optional[SftpHostKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SftpHostKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
private_key: Optional[str] = None)func NewSftpHostKey(ctx *Context, name string, args *SftpHostKeyArgs, opts ...ResourceOption) (*SftpHostKey, error)public SftpHostKey(string name, SftpHostKeyArgs? args = null, CustomResourceOptions? opts = null)
public SftpHostKey(String name, SftpHostKeyArgs args)
public SftpHostKey(String name, SftpHostKeyArgs args, CustomResourceOptions options)
type: filescom:SftpHostKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "filescom_sftp_host_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SftpHostKeyArgs
- 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 SftpHostKeyArgs
- 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 SftpHostKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SftpHostKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SftpHostKeyArgs
- 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 sftpHostKeyResource = new Filescom.SftpHostKey("sftpHostKeyResource", new()
{
Name = "string",
PrivateKey = "string",
});
example, err := filescom.NewSftpHostKey(ctx, "sftpHostKeyResource", &filescom.SftpHostKeyArgs{
Name: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
})
resource "filescom_sftp_host_key" "sftpHostKeyResource" {
lifecycle {
create_before_destroy = true
}
name = "string"
private_key = "string"
}
var sftpHostKeyResource = new SftpHostKey("sftpHostKeyResource", SftpHostKeyArgs.builder()
.name("string")
.privateKey("string")
.build());
sftp_host_key_resource = filescom.SftpHostKey("sftpHostKeyResource",
name="string",
private_key="string")
const sftpHostKeyResource = new filescom.SftpHostKey("sftpHostKeyResource", {
name: "string",
privateKey: "string",
});
type: filescom:SftpHostKey
properties:
name: string
privateKey: string
SftpHostKey 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 SftpHostKey resource accepts the following input properties:
- Name string
- The friendly name of this SFTP Host Key.
- Private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- Name string
- The friendly name of this SFTP Host Key.
- Private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- name string
- The friendly name of this SFTP Host Key.
- private_
key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- name String
- The friendly name of this SFTP Host Key.
- private
Key String - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- name string
- The friendly name of this SFTP Host Key.
- private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- name str
- The friendly name of this SFTP Host Key.
- private_
key str - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- name String
- The friendly name of this SFTP Host Key.
- private
Key String - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
Outputs
All input properties are implicitly available as output properties. Additionally, the SftpHostKey resource produces the following output properties:
- Fingerprint
Md5 string - MD5 Fingerprint of the public key
- Fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- Id string
- The provider-assigned unique ID for this managed resource.
- Fingerprint
Md5 string - MD5 Fingerprint of the public key
- Fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- Id string
- The provider-assigned unique ID for this managed resource.
- fingerprint_
md5 string - MD5 Fingerprint of the public key
- fingerprint_
sha256 string - SHA256 Fingerprint of the public key
- id string
- The provider-assigned unique ID for this managed resource.
- fingerprint
Md5 String - MD5 Fingerprint of the public key
- fingerprint
Sha256 String - SHA256 Fingerprint of the public key
- id String
- The provider-assigned unique ID for this managed resource.
- fingerprint
Md5 string - MD5 Fingerprint of the public key
- fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- id string
- The provider-assigned unique ID for this managed resource.
- fingerprint_
md5 str - MD5 Fingerprint of the public key
- fingerprint_
sha256 str - SHA256 Fingerprint of the public key
- id str
- The provider-assigned unique ID for this managed resource.
- fingerprint
Md5 String - MD5 Fingerprint of the public key
- fingerprint
Sha256 String - SHA256 Fingerprint of the public key
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SftpHostKey Resource
Get an existing SftpHostKey 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?: SftpHostKeyState, opts?: CustomResourceOptions): SftpHostKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
fingerprint_md5: Optional[str] = None,
fingerprint_sha256: Optional[str] = None,
name: Optional[str] = None,
private_key: Optional[str] = None) -> SftpHostKeyfunc GetSftpHostKey(ctx *Context, name string, id IDInput, state *SftpHostKeyState, opts ...ResourceOption) (*SftpHostKey, error)public static SftpHostKey Get(string name, Input<string> id, SftpHostKeyState? state, CustomResourceOptions? opts = null)public static SftpHostKey get(String name, Output<String> id, SftpHostKeyState state, CustomResourceOptions options)resources: _: type: filescom:SftpHostKey get: id: ${id}import {
to = filescom_sftp_host_key.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.
- Fingerprint
Md5 string - MD5 Fingerprint of the public key
- Fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- Name string
- The friendly name of this SFTP Host Key.
- Private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- Fingerprint
Md5 string - MD5 Fingerprint of the public key
- Fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- Name string
- The friendly name of this SFTP Host Key.
- Private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- fingerprint_
md5 string - MD5 Fingerprint of the public key
- fingerprint_
sha256 string - SHA256 Fingerprint of the public key
- name string
- The friendly name of this SFTP Host Key.
- private_
key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- fingerprint
Md5 String - MD5 Fingerprint of the public key
- fingerprint
Sha256 String - SHA256 Fingerprint of the public key
- name String
- The friendly name of this SFTP Host Key.
- private
Key String - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- fingerprint
Md5 string - MD5 Fingerprint of the public key
- fingerprint
Sha256 string - SHA256 Fingerprint of the public key
- name string
- The friendly name of this SFTP Host Key.
- private
Key string - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- fingerprint_
md5 str - MD5 Fingerprint of the public key
- fingerprint_
sha256 str - SHA256 Fingerprint of the public key
- name str
- The friendly name of this SFTP Host Key.
- private_
key str - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
- fingerprint
Md5 String - MD5 Fingerprint of the public key
- fingerprint
Sha256 String - SHA256 Fingerprint of the public key
- name String
- The friendly name of this SFTP Host Key.
- private
Key String - NOTE: This field is write-only and its value will not be updated in state as part of read operations. The private key data.
Import
The pulumi import command can be used, for example:
Sftp Host Keys can be imported by specifying the id.
$ pulumi import filescom:index/sftpHostKey:SftpHostKey example_sftp_host_key 1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- filescom jschady/pulumi-filescom
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
filescomTerraform Provider.
published on Thursday, Aug 20, 2026 by jschady