Remote Server Credentials

A RemoteServerCredential is a way to store a credential for Remote Servers in a centralized vault and then reference it from Remote Server definitions.

This allows you to manage your credentials in one place and avoid duplicating them across multiple Remote Server configurations. It also enhances security by allowing you to use Terraform or APIs for Remote Server management without having to worry about credential exposure.

Resource Schema

Optional

PropertyDescription
workspace_id
Int64
Workspace ID (0 for default workspace)
name
String
Internal name for your reference
description
String
Internal description for your reference
server_type
String
Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
aws_access_key
String
AWS Access Key.
s3_assume_role_arn
String
AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds
Int64
Session duration in seconds for AssumeRole authentication (900-43200).
google_cloud_storage_s3_compatible_access_key
String
Google Cloud Storage: S3-compatible Access Key.
wasabi_access_key
String
Wasabi: Access Key.
s3_compatible_access_key
String
S3-compatible: Access Key
filebase_access_key
String
Filebase: Access Key.
cloudflare_access_key
String
Cloudflare: Access Key.
linode_access_key
String
Linode: Access Key
sharepoint_tenant_id
String
SharePoint: Microsoft Entra tenant ID for app-only authentication.
sharepoint_client_id
String
SharePoint: Microsoft Entra application client ID for app-only authentication.
username
String
Remote server username.
password
String
Password, if needed.
private_key
String
Private key, if needed.
private_key_passphrase
String
Passphrase for private key if needed.
aws_secret_key
String
AWS: secret key.
azure_blob_storage_access_key
String
Azure Blob Storage: Access Key
azure_blob_storage_sas_token
String
Azure Blob Storage: Shared Access Signature (SAS) token
azure_files_storage_access_key
String
Azure File Storage: Access Key
azure_files_storage_sas_token
String
Azure File Storage: Shared Access Signature (SAS) token
backblaze_b2_application_key
String
Backblaze B2 Cloud Storage: applicationKey
backblaze_b2_key_id
String
Backblaze B2 Cloud Storage: keyID
cloudflare_secret_key
String
Cloudflare: Secret Key
filebase_secret_key
String
Filebase: Secret Key
google_cloud_storage_credentials_json
String
Google Cloud Storage: JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
google_cloud_storage_s3_compatible_secret_key
String
Google Cloud Storage: S3-compatible secret key
linode_secret_key
String
Linode: Secret Key
s3_compatible_secret_key
String
S3-compatible: Secret Key
sharepoint_client_certificate
String
SharePoint: PEM-encoded certificate and unencrypted private key for app-only authentication.
sharepoint_client_secret
String
SharePoint: Microsoft Entra application client secret for app-only authentication.
wasabi_secret_key
String
Wasabi: Secret Key
copy_values_from_credential_id
Int64
ID of Remote Server Credential to copy omitted values from.

Read Only

PropertyDescription
id
Int64
Remote Server Credential ID
s3_assume_role_external_id
String
External ID for AssumeRole authentication.
sharepoint_app_credential_type
String
SharePoint: App-only credential type. Either secret or certificate.

Example Resource

resource "files_remote_server_credential" "example_remote_server_credential" {
  name                                          = "My Credential"
  description                                   = "More information or notes about this credential."
  server_type                                   = "s3"
  aws_access_key                                = "example"
  s3_assume_role_arn                            = "example"
  s3_assume_role_duration_seconds               = 1
  cloudflare_access_key                         = "example"
  filebase_access_key                           = "example"
  google_cloud_storage_s3_compatible_access_key = "example"
  linode_access_key                             = "example"
  s3_compatible_access_key                      = "example"
  sharepoint_client_id                          = "00000000-0000-0000-0000-000000000000"
  sharepoint_tenant_id                          = "00000000-0000-0000-0000-000000000000"
  username                                      = "user"
  wasabi_access_key                             = "example"
  workspace_id                                  = 0
  copy_values_from_credential_id                = 1
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Remote Server Credentials can be imported by specifying the id.
terraform import files_remote_server_credential.example_remote_server_credential 1

Data Source Schema

Required

PropertyDescription
id
Int64
Remote Server Credential ID

Read Only

PropertyDescription
workspace_id
Int64
Workspace ID (0 for default workspace)
name
String
Internal name for your reference
description
String
Internal description for your reference
server_type
String
Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
aws_access_key
String
AWS Access Key.
s3_assume_role_arn
String
AWS IAM Role ARN for AssumeRole authentication.
s3_assume_role_duration_seconds
Int64
Session duration in seconds for AssumeRole authentication (900-43200).
s3_assume_role_external_id
String
External ID for AssumeRole authentication.
google_cloud_storage_s3_compatible_access_key
String
Google Cloud Storage: S3-compatible Access Key.
wasabi_access_key
String
Wasabi: Access Key.
s3_compatible_access_key
String
S3-compatible: Access Key
filebase_access_key
String
Filebase: Access Key.
cloudflare_access_key
String
Cloudflare: Access Key.
linode_access_key
String
Linode: Access Key
sharepoint_tenant_id
String
SharePoint: Microsoft Entra tenant ID for app-only authentication.
sharepoint_client_id
String
SharePoint: Microsoft Entra application client ID for app-only authentication.
sharepoint_app_credential_type
String
SharePoint: App-only credential type. Either secret or certificate.
username
String
Remote server username.

Example Data Source

data "files_remote_server_credential" "example_remote_server_credential" {
  id = 1
}