templates/<provider>/<my-template>/ in your template repository, edit the placeholders, push, and trigger a sync. You will have a working custom template in minutes.
This page is the fastest path to “something that runs”. The pages that follow (Writing the Terraform Files, template.json Reference) explain the why and the full schema.
Directory Layout
templates/<provider>/<name>/ shape is required — Amnify discovers templates by walking this exact structure.
Skeleton main.tf — Azure
Skeleton main.tf — AWS
Skeleton template.json
How a Variable Connects Across Both Files
Every variable lives in two places: declared inmain.tf and described in template.json. The name must match exactly. Here is the canonical pattern for a sensitive (secret) variable:
- The user types a value into a masked input in the Amnify UI.
- Amnify encrypts the value with AES-256-GCM, scoped per organization, before storing it.
- During deployment, the worker decrypts the value in memory and writes it into
terraform.tfvars.jsonalongside the non-sensitive variables. - The plaintext is never persisted — only the encrypted ciphertext lives in the database.
Setting
sensitive = true on the Terraform variable block does not flag it as a secret in Amnify. Only the sensitive field in template.json does that. You can set both, but the JSON is the source of truth for UI masking and encryption.Next Steps
- Read Writing the Terraform Files for the full set of rules Amnify imposes.
- Read template.json Reference for every field the manifest supports.
- Walk through the Azure Resource Group example to see a complete, validated template.