v1

Infrastructure as Code /

Infrastructure as code on Northflank

Northflank templates give you the ability to codify your workflow to create and update resources on Northflank. Everything you can do in the Northflank UI or API can be achieved in repeatable, programmatic templates.

Enable bidirectional GitOps on your templates to automatically update resource configurations and scale infrastructure on Git push.

You can create templates with dynamic variables to deploy different environments, across multiple regions and cloud providers, and provide other users the ability to quickly deploy your stack with their desired configuration.

Types of template

  • Templates are created in your team. You create and update team-level integrations and infrastructure, projects and resources. You can include pipelines with release flow and preview environment templates within these templates.
  • Release flow templates can be defined for each stage of a pipeline. They automate your workflow to run a release for the specific stage.
  • Preview environment templates are also defined within a pipeline. They specify resources and secrets to create for ephemeral environments.
An example of a successfully run template in the Northflank application

Create integrations, infrastructure, and resources in templates

Templates allow you to create reproducible specifications for setting up team integrations, infrastructure, and resources to deploy in any region or cloud provider.

You can reproduce any workflow you would use to create integrations and deploy resources using the Northflank UI or API in a template, such as:

  • Automate the process to deploy a single service, or multiple projects
  • Manage your infrastructure and deployments using GitOps
  • Add integrations with cloud providers and deploy clusters into your own cloud accounts
  • Define pipelines with release flows and preview environments
  • Create shareable one-click deployments for your project so users can get up and running immediately

Templates can be created using the visual editor in the Northflank application, or edited directly as JSON.

Write dynamic templates

You can write templates in a programmatic manner so that they can be easily run with different configurations, or use dynamic values based on variables. Hardcoded values can be replaced by template arguments, references to the output from a previous template node, and functions that are evaluated when the template is run.

This allows you to use a single generalised template to deploy the same project in different regions, as different staging environments, or share a template where team members or the public can enter their own arguments to configure a deployment.

Manage infrastructure with GitOps

Northflank's bidirectional GitOps helps you maintain a single source of truth for your infrastructure and resource configuration. Any changes to your template code committed to your repository will automatically update the template on Northflank, and any changes to your template in Northflank will be committed to your repository. You can use one source template to manage multiple Northflank templates. Combined with arguments and overrides you can update multiple projects with separate configurations.

You can also set your template to run automatically when it is updated, meaning you can manage your infrastructure and configuration using Git.

Define release flows and preview environments

Release flows are templates for specific pipeline stages that can automate release tasks, such as backing up databases, triggering and deploying builds, running jobs, and promoting images from one stage to another.

You can create a release flow either in an existing project's pipeline, or by configuring it in a pipeline node in a Northflank template. You can add Git or webhook triggers to run a release automatically.

Versioning and history for templates

You can use GitOps with your Northflank templates to track and manage changes in your Git repository.

All templates have a run history, detailing the status and output of each template run, which you can use to review and troubleshoot templates. Release flows allow you to roll back to a previous release with a single click.

Enterprise customers can use the template drafts feature to review proposed changes to a template directly in Northflank, and track template changes and runs using audit logs.

© 2025 Northflank Ltd. All rights reserved.