> For the complete documentation index, see [llms.txt](https://docs.duplocloud.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplocloud.com/docs/automation-platform/automation-and-tools/automation-stacks/create-a-deploy-template.md).

# Create a deploy template

Create a re-usable template to deploy resources using the DuploCloud Stacks feature.

Create a re-usable template to deploy resources (Nodes, Hosts, Services, Secrets, storage, etc.) using the DuploCloud Stacks feature.

1. Select the Tenant from the **Tenant** list box that owns the resources that will act as a baseline for the new template.
2. Navigate to **Automation** -> **Stacks**.
3. Select the **Templates** tab.
4. Click **Generate**. The **Generate Deployment Template** pane displays.
5. Enter a name for the template in the **Name** field.
6. Select all applicable scopes in the **Scopes** field. If unsure, you can safely add any scope, as it only affects the resource lists shown on the next page. The following scopes are currently available, with more to be added as new resource types are supported:
   * Kubernetes
   * Admin / Reverse Proxy
   * Admin / System Config
   * Admin / Tenant Security
   * Cloud / Host
   * Cloud / Load Balancer
   * Cloud / Storage
   * Docker
7. Click **Next**. A page allowing you to edit the template configurations displays.
8. Edit the template configurations as needed:
   * The left panel displays resources and their components (e.g., **Kubernetes**, **Service**, and **filebeat-k8s-duploinfrasvc)** organized hierarchically.
     * Subcomponents can be toggled on or off, controlling their inclusion in the template.
     * Selecting a parent node (e.g., **Kubernetes**) includes all its child components, while deselecting it removes them.
   * The right panel displays JSON that dynamically reflects the selections made on the left.
     * Adding or removing components on the left modifies the corresponding nodes and payloads in the JSON.
     * Advanced users can click **Edit** to [fine-tune the JSON manually](/docs/automation-platform/automation-and-tools/automation-stacks/customize-deploy-templates.md#customizing-deploy-templates).
     * Click **Save** to save your changes.
9. Click the **Download** button to save the template file to your local machine for further use or modifications.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.duplocloud.com/docs/automation-platform/automation-and-tools/automation-stacks/create-a-deploy-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
