Administrators create application templates to help ensure that their preferred architecture is used by each development team. This helps you govern the resources and configurations that developers use in their application deployments.
Once you create an application template, it is available to others in your space. You can also add a template to a catalog to share with other spaces.
Developers can use your application template to create an application instance. When developers create an instance, they can configure each component from the template, but they can't add or remove any components. The template generates Terraform code, which developers can download or deploy from App Design Center.
This document helps you design, configure, and share an application template using App Design Center.
Before you begin
You must have one of the following roles:
- Application Design Center Admin (
roles/designcenter.admin
) - Application Design Center User (
roles/designcenter.user
)
Create an application template
Create application templates to share your architecture design with development teams. You can add the following components to your template design:
Assets: High-level resources that help you control other resources. For example, service accounts.
Services: Network or API interfaces that are consumed over the network. Examples include Cloud Storage and Vertex AI.
Workloads: Binary deployments that perform business functions. Examples include Cloud Run and Compute Engine.
As you design your template, Terraform code is generated to reflect the design and configuration details.
Specify template details
Template details help you categorize your template and help developers decide whether to use your template.
To enter details for your template, do the following:
From the navigation menu, click Templates.
Click Create template.
In the Template name field, enter a unique identifier for the template. This field is required.
In the Display name field, enter an identifier to display in the Google Cloud console.
In the Description field, enter a brief explanation of the application's purpose.
Click Create template. The design canvas is displayed.
Design your template
You can design your template by adding components to the following starting points:
- A blank canvas.
- A Google-provided template.
- A template that you generate with Gemini assistance.
To design your template, do the following:
From the design canvas, make sure Design is selected.
Do one of the following to get started:
To start from scratch, from the Components area, click a component to add it to the canvas area.
To start from a Google-provided template, click the template name.
To use natural language chat to generate a template, click Custom Application with Gemini.
To create a communication channel between components, do one of the following:
To connect two components on the canvas, drag from a blue on a component to a blue dot on another component.
To add connect a new component to a component on the canvas, click
Add and select the component to add.
To remove a component or connection, do the following:
In the canvas, click the component or connection.
In the Configuration area, click Delete.
In the field, enter delete.
Click Delete.
Configure components
For each asset, service or workload that you add to the canvas, you can specify configuration details such as name, project where the resource is created, and location.
All component configuration details are optional when you create the template. If you specify configuration details, they are used as default values for application instances. Before developers deploy an application instance, they must configure the required details for each supported resource in the application.
To specify component configuration details as default values, do the following:
From the design canvas, click a component.
In the Configuration area, from the Project ID list, select the project where you want to deploy the resource. Select a project with the following qualifications:
- The project must be a descendant of the selected app-enabled folder.
- The project must not be a management project.
Configure additional settings for the resource. For example, for Cloud SQL, you might configure the following:
- Region
- Backup configuration
- Database flags
- IP configuration
For links to configuration documentation for each component, see Supported resources.
Click Save.
View Terraform code
As you design your application template, Terraform code is generated to reflect the design and configuration details. To view the Terraform code, do the following:
From the design canvas, click Code. The generated Terraform files are displayed.
In the Explorer area, click main.tf. The Terraform module for each component is displayed.
Delete a Template
If you no longer need a template, you can delete it.
- From the design canvas, click Actions.
- Click Delete.
Verify your template
Before you share your template with developers, make sure that it functions as you intended. To verify your template, do the following:
- Create an application
instance with
the following settings:
- From the Environment list, select TEST.
- From the Criticality list, select LOW.
- Deploy the instance. For steps to deploy an application instance, see Deploy an application instance.
- Test your infrastructure to make sure that it meets your requirements.
- To avoid recurring costs, delete the test deployment.
Share a template to a catalog
Once you have verified your template, you can publish the template to a catalog. The template can be used by application developers who have access to a space where the catalog is shared.
- From the design canvas, click Add to Catalog.
- To manage spaces where the catalog is shared, see Manage catalogs.
Revise and reshare your template
As you gain experience with your application and your business needs evolve, you might want to update your application template. For example, you might decide to improve performance for a backend service by adding a Memorystore service for caching.
If you make changes to a template, those changes are not automatically published to the catalog. To share the latest revision, publish the template to the catalog again.
To create a new revision, do the following:
From the navigation menu, click Templates.
Select the application template that you want to revise. The canvas opens.
Modify the template to fit your new requirements. For example, add and configure a new component.
To share the latest revision with other spaces, add the template to relevant catalogs again.
What's next
To share templates with other spaces, create and share a catalog.
Before you deploy your application, create an application instance.