Create an application when you want to customize and deploy from a template. For example, you might create an application that you plan to deploy for testing purposes. You might create another application for production use.
When you create an application, you specify information that helps you categorize it based on the application's intended usage. This information helps you filter and find a specific application. You can also configure components and connection details.
This document shows you how to manage the lifecycle of an application. You'll learn how to create an application draft from a template, configure its components, edit its underlying Terraform code, create a new revision, and finally, delete the application when it's no longer needed.
Before you begin
To perform the tasks in this document, ask your administrator to grant you the necessary roles on the app-enabled folder or management project, as listed in the following table:
| Task | Required roles |
|---|---|
| Create, configure, edit, and version application drafts | Application Design Center Admin (roles/designcenter.admin), orApplication Admin ( roles/designcenter.applicationAdmin), orApplication Editor ( roles/designcenter.applicationEditor) |
| Delete an application | Application Design Center Admin (roles/designcenter.admin), orApplication Admin ( roles/designcenter.applicationAdmin) |
For more information about roles, see Access control with IAM.
Create an application draft
Create an application draft from a template by specifying details and optionally overriding component configurations. You can then deploy the draft to create an application.
Design canvas
From the navigation menu, do one of the following:
To view templates created in your space, click Templates.
To view templates shared from another space, click Shared templates.
Click the Template ID that you want to use.
From the design canvas, click Configure an app. Then click Create new application.
In the Application name area, do the following to name and describe your application:
In the Name field, enter a unique identifier in this space. For example, use a unique name and environment combination like
web-app-staging. This is a required field.You can use up to 63 characters, including lowercase letters, numbers, and hyphens. The name must start with a lowercase letter and can't end with a hyphen. Names can't be changed.
In the Display name field, enter a name to display in the Google Cloud console.
In the Description field, enter the purpose of this application.
To set a default project for any components with an empty Project ID field, select a project from the Deployment project list. In a folder-level boundary, the project must have the following qualifications:
- The project must be inside the selected app-enabled folder.
- The project must not be a management project.
If a component already has a project specified in its Project ID field, that project is used instead of this setting.
From the Region list, select the region where components are deployed. The component region is applied based on the following:
If the application scope is Global (default), the region is applied to components that don't already have a configured region.
If the application scope is Regional, the region is applied to all components.
From the Environment list, select the environment where you want to deploy this application. For example, you might want to verify that your deployment works as expected in
TEST.From the Criticality list, select the degree of impact on your business. For example,
LOWorHIGH.To specify owners, in the Owners area, click Add owner and enter a Display name and email for the following:
In the Business owners area, enter an owner who is responsible for quality and user expectations.
In the Developer owners area, enter an owner who is responsible for development and coding.
In the Operator owners area, enter an owner who is responsible for operating the application.
From the Scope list, select one of the following:
Global (default): The application contains a global resource, or resources are in multiple regions.
Regional: All resources are in a single region.
This is a required field. For more information, see Compare global and regional applications.
Click Create Application. The application details are displayed.
gcloud CLI
Identify the application template revision URI for the template that you want to use to create the application.
gcloud design-center spaces application-templates describe APPLICATION_TEMPLATE \ --project=PROJECT \ --location=LOCATION \ --space=SPACE \ --format='yaml(name,latestRevision)'Replace the following:
APPLICATION_TEMPLATE: The template ID for the application template that you want to use as the basis for your application.PROJECT: Your management project ID.LOCATION: The application template region.SPACE: Your space ID.
For more information, see gcloud design-center spaces application-templates describe.
Copy the
latestRevisionoutput.Create an application draft based on your template.
gcloud design-center spaces applications create APPLICATION \ --project=PROJECT \ --location=LOCATION \ --space=SPACE \ --source-application-template-revision=SOURCE_APPLICATION_TEMPLATE_REVISION \ --scope-type=SCOPE_TYPEReplace the following:
APPLICATION: The application ID for the application draft that you want to create.PROJECT: Your management project ID.LOCATION: The application region.SPACE: Your space ID.SOURCE_APPLICATION_TEMPLATE_REVISION: Your application template URI. For example,projects/PROJECT/locations/LOCATION/spaces/SPACE/applicationTemplates/APPLICATION_TEMPLATE/revisions/REVISIONSCOPE_TYPE: The scope for your application. One ofregionalorglobal. If the application scope is 'global, the region is applied to components that don't already have a configured region. If the application scope isregional`, the region is applied to all components.
For more information, see gcloud design-center spaces applications create.
Configure components and connections
For each component in the application, you can specify configuration details such as the project where the resource is created, and the location where it's deployed.
You can also modify connection details if the default configuration doesn't meet your requirements. For example, you might modify environment variable key names, change connection ports, or add additional roles to service accounts.
You must configure the required details for each supported resource.
To configure components and connections, do the following:
Design canvas
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 inside 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.
When you connect components on the design canvas, default configuration values are used to create the connection. To add or modify connection details, do the following.
In the design canvas, click the connection between two components. The Connection panel opens and displays connection parameters.
Do one of the following:
To modify an existing connection parameter, click Edit.
To add a new connection parameter, click Add parameter.
Update the Key and Value fields. For example, you might want to modify the following details:
- The environment variable key names to align with your application requirements.
- The connection port value.
- The roles added to a service account.
Click Save.
gcloud CLI
Describe the application to view component parameters, and identify required parameters for your application.
gcloud design-center