Terraform & OpenTofu
Add the Files.com provider to your existing Terraform or OpenTofu configuration to manage Site resources through your team's established workflow. Both tools support the same Files.com resource model: accounts and Groups, folder permissions, sharing, Remote Servers, Syncs, Automations, and other administrative resources.
The Terraform Registry and OpenTofu Registry publish the provider's resource and data-source references. Use your organization's existing toolchain; the Terraform CLI and OpenTofu CLI references cover tool-specific commands.
Provider Connection
The provider authenticates with a Files.com API key. Its authority follows the key's account, permissions, and scope. Use a credential that can administer the resources in the configuration; a successful connection does not grant additional administrative access.
Supply the key through the FILES_API_KEY environment variable in your shell or deployment system's secret configuration. Keep it out of committed configuration files. Both tools use the following provider declaration, including the terraform block name:
terraform {
required_providers {
files = {
source = "Files-com/files"
}
}
}
provider "files" {
endpoint_override = "https://MYSITE.files.com"
}
Replace MYSITE.files.com with the intended Site address. Keep production and test endpoints, credentials, and state distinct. A Terraform or OpenTofu workspace separates state; it does not create a Files.com Workspace or Child Site, or change the provider's connection automatically.
Select a provider version constraint appropriate to your deployment and commit the dependency lock file. Review provider upgrades with a fresh plan before applying them. State and saved plans can contain sensitive values even when ordinary output hides them; protect those artifacts as well as the API key.
Resources and Dependencies
Files.com access combines accounts, memberships, and folder permissions. A permission grants a user, Group, or Partner access to a folder; creating a Group and assigning it a permission does not add users to that Group. A Sync similarly needs its source and destination configuration as well as the access required to transfer files.
Use resource references to connect those objects rather than hard-coding identifiers from a different Site. Repeatable Provisioning provides a complete arrangement of individual accounts, memberships, Groups, folders, and permissions. If those objects already exist, import them instead of trying to create them again.
Plans and Changes
Include the Files.com configuration in your existing validation and plan-review process. Review the intended Site, account access, folder paths, and connections as well as the resource changes. A valid configuration can still grant the wrong person access or point a workflow at a production destination.
A plan can contain updates, deletions, and replacements as well as new resources. Configuration Lifecycle explains ownership, omitted settings, resource identity, and recovery after a partial apply. Syntax validation alone does not establish that users have the intended access or that a configured file workflow reaches the correct destination.