Overview
A stack is a product installed from the catalogue: an app with its database, storage and domain, created together and changed as one. The catalogue has WordPress, Ghost, n8n, Uptime Kuma, Gitea and Plausible, and your own templates.
When to use it
- A blog, a wiki or an analytics tool without wiring it yourself.
- The same setup installed several times from your own template.
How it works
- Templates
- YAML or JSON: parameters, the resources to create in the API’s own form, and outputs, with versions.
- One transaction
- Every member is created at once, or none is.
A template’s placeholders (the stack’s name, parameters, other members’ names) are filled in, the members are created together, and changing a parameter renders them again. Members change only through their stack.
Architecture
- Template to Stack blog: parameters
- Stack blog to App blog
- Stack blog to Database blog-db
- Stack blog to Volume
- Stack blog to Domain
Flows
Installing WordPress
- Choose WordPress in the catalogue and give it a domain.
- The app, database, volume and domain are created together.
- Open the address and finish WordPress’s own setup.
Set it up
In the console
- Open the Catalogue and choose a product.
- Answer its questions and Install.
- The stack’s page shows its parts.
With the CLI
enclave stack create blog --template wordpress --param domain=blog.localhost --waitWith OpenTofu
OpenTofu configuration
resource "enclave_stack" "blog" {
name = "blog"
template = "wordpress"
parameters = { domain = "blog.localhost" }
}Settings reference
Every setting and output of the OpenTofu resource; the console and the CLI use the same names in their own words. Generated from platform 4d30582.
| Name | Type | Use | What it does |
|---|---|---|---|
name | text | required | Name of the stack: 3–40 lowercase letters, digits or hyphens, starting with a letter. Changing it replaces the stack. |
parameters | map of text | optional | The template's parameters; numbers and booleans are written as strings. Change in place. |
project | text | optional | The project to create it in. Defaults to the provider's project (ENCLAVE_PROJECT, else default). Changing it replaces the resource. |
secret_parameters | map of text | optional | Secret parameters: they become the stack's secrets and are never read back. Change in place. |
template | text | optional | A catalogue entry, like wordpress. Changing it replaces the stack. |
template_body | text | optional | A template of your own, in YAML or JSON (for example file("worker.yaml")). Changing it replaces the stack. |
template_version | text | optional | The template's version (default: the newest when created). Changes in place. |
id | text | output | Resource ID. |
members | list of objects | output | The resources the stack holds. |
outputs | map of text | output | The template's outputs, like its URL. |
Limits and security
Good to know
- Deleting a stack deletes all its parts, data included.
Security
- Generated passwords become secrets of the stack.