Skip to main content

Templates

Templates are reusable Terraform blueprints that define how cloud resources should be provisioned. Amnify provides a curated library of templates covering all major cloud services.

How templates work

Templates live in your GitHub repository. When you connect GitHub to Amnify:
  1. Amnify populates your repository with a curated library of Terraform templates
  2. Templates are synced to the Amnify platform automatically
  3. You can browse and select templates from the Deploy UI
Since you own the repository, you can:
  • Customize any template to fit your requirements
  • Add your own Terraform modules
  • Version templates through normal Git workflows
Changes you make in GitHub are reflected in Amnify after a sync.

Template categories

CategoryDescriptionExamples
InfrastructureCore networking and foundational resourcesVPCs, VNets, Resource Groups, Subnets, Security Groups
ApplicationCompute and application hostingEC2 Instances, Container Apps, AKS Clusters, Web Apps
DatabaseManaged database servicesRDS, PostgreSQL, CosmosDB, Cloud SQL
ComboMulti-resource templates combining several servicesFull application stacks

Template variables

Each template defines input variables that you configure when creating a deployment:
Variable TypeDescription
StringText values (e.g., resource names, CIDR blocks)
NumberNumeric values (e.g., instance count, disk size)
BooleanTrue/false flags (e.g., enable encryption)
SelectChoose from predefined options (e.g., instance size, OS image)
Some variables may have default values, and some are required.

Custom templates

Beyond the curated library, you can create your own templates:
  1. Add a Terraform module to your GitHub repository
  2. Include a template.json manifest defining the template metadata and variables
  3. Sync templates in Amnify to discover your new template
  4. Use it in deployments like any other template

Template structure

Each template in the repository follows this structure:
templates/
  └── {provider}/
      └── {template-name}/
          ├── template.json    # Manifest: name, description, variables, category
          ├── main.tf          # Terraform configuration
          ├── variables.tf     # Variable definitions
          └── outputs.tf       # Output definitions
Template outputs are especially important when using pipelines — they become inputs for subsequent deployments in the chain.