Skip to main content

Configuration as Code

Configuration as code keeps your Files.com setup in version-controlled files. You declare the resources a site needs, review proposed changes, and apply those definitions through Terraform or OpenTofu. This makes configuration repeatable across environments and gives the team a record of the changes it approves.

This approach fits teams that already manage configuration through code, need consistent dev, test, and production environments, or run several sites. Terraform and OpenTofu provide this through their Infrastructure as Code (IaC) workflows.

The resource definitions become the source of truth for the configuration they manage. Coverage usually includes users, groups, permissions, and integrations, and can extend to folder structure. The exact set of resources depends on the tool and provider version.

Supported Tools

Files.com supports configuration as code with Terraform and OpenTofu. Both use similar workflows. Start with Terraform if your organization standardizes on it, or use OpenTofu if you standardize on OpenTofu.

Typical Workflow

Define desired state in code and store that code in version control. Plan changes before applying them, and review the plan output with stakeholders. Apply changes from an automated pipeline or a controlled workstation. Patterns like variables and iteration keep larger configurations maintainable.

Configuration Changes and File Workflows

Configuration as code handles the configuration lifecycle. File movement workflows run through separate features. For reactions to file events, use Automations. For custom runtime behavior, use the SDKs & APIs.