Create and manage application templates
This page describes how to create and delete HCP Waypoint application templates. Platform engineers often perform these tasks. Refer to Application templates for additional information.
Overview
The following steps describe the procedure for creating application templates:
- For each template you want to create, define a no-code module in Terraform Cloud that specifies a common infrastructure pattern.
- Use the HCP Waypoint UI to create the template.
After creating a template, application developers can begin using it to deploy their applications.
Prerequisites
- An HCP account with HCP Waypoint enabled. Refer to HCP Account for information about creating an account.
- A Terraform Cloud organization with Plus tier. Terraform Cloud must be Plus tier to use Terraform Cloud no-code modules and the private module registry.
Create a no-code module
Define the common infrastructure pattern in a Terraform Cloud no-code module. Refer to Designing No-Code Ready Modules for instructions on how to create no-code modules.
You can also declare the waypoint_application
variable in your no-code module. The variable specifies the name of the HCP Waypoint application. HCP Waypoint defines this value when the application developer uses the template. Refer to Input Variables for instructions on how to define variables in Terraform.
You may need to create global variable sets within your Terraform Cloud organization so your no-code modules can authenticate and interact with your cloud provider.
You can use the variable to label infrastructure resources in the no-code module so you can associate them with the HCP Waypoint application.
Create an application template
After creating the no-code module, complete the following steps in the HCP Waypoint UI:
- From the HCP Waypoint overview, go to the Templates menu.
- Click Create Application Template.
- Specify a unique identifier for the template in the Name field. The name can be up to 24 characters.
- Specify arbitrary metadata as tags to associate with your template in the Tags field.
- Add a short description of the template in the Short Summary field. This field can be up to 110 characters. HCP Waypoint presents the description when users create a new application from a template.
- Add a full-length description of the template in the Full Summary field. This field can be up ot 500 characters. HCP Waypoint presents the description in the template detail screen.
- Specify instructions for application developers on how to use the template in the Developer instructions field. HCP Waypoint exposes the following variables so you can reference them in the developer instructions. This field supports Markdown.
{{ .ApplicationName }}
: Populates the name of the developer's application in the instructions.{{ .TfcOrgName }}
: Populates the name of the Terraform Cloud organization in the instructions.
- Choose a no-code module to use as the source for the template from the Terraform no-code module drop-down menu. Once you select a no-code module, specify the version HCP Waypoint should reference in the Terraform Cloud module version field. No-code modules published in your organization's private registry appear in the menu.
- Click Create.
Edit an application template
Modifying an application template does not impact existing applications or underlying resources that were created by the template. Changes only apply to new applications.
To edit an application template, complete the following steps:
- From the HCP Waypoint overview, click on the Templates menu.
- Click on the template you want to modify.
- Click the Manage button and choose Edit template.
- Update the desired fields.
- Click Save.
Delete an application template
Deleting an application template does not remove applications that were created from the template. To do so, you must delete the application in HCP Waypoint or delete the Terraform resources and the Terraform Cloud workspace associated with the HCP Waypoint application. Refer to Destruction and Deletion for instructions.
To delete an application template, complete the following steps:
- From the HCP Waypoint overview, click on the Templates menu.
- Click on the template you want to delete.
- Click the Manage button and choose Delete template.
- In the modal, enter the name of the template and click Delete.
Next steps
To learn more about what you can do with HCP Waypoint after you created an application template, refer to the following topics: