Manage resources

As a SaaS producer or platform administrator, you can use App Lifecycle Manager to inspect and update SaaS offerings, unit kinds, and units after deployment to adjust regions, labels, default releases, and maintenance pinning. These updates change configuration metadata without triggering infrastructure provisioning. To roll out infrastructure changes, see Update a SaaS offering. For conceptual background, see the App Lifecycle Manager overview.

Before you begin

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  2. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  3. Enable the App Lifecycle Manager API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  4. Install the Google Cloud CLI.

  5. Configure the gcloud CLI to use your federated identity.

    For more information, see Sign in to the gcloud CLI with your federated identity.

  6. To initialize the gcloud CLI, run the following command:

    gcloud init

Required roles

To get the permissions that you need to view and update App Lifecycle Manager resources, ask your administrator to grant you the following IAM roles on your project:

For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Inspect resources

Before editing a resource, inspect its configuration, locations, and labels to verify which properties you can modify. Select one of the following options:

Console

  1. In the Google Cloud console, go to the SaaS offerings page:

    Go to SaaS offerings

  2. Click a SaaS offering name, or select Unit kinds or Units in the navigation menu and click a resource name.

gcloud

List SaaS offerings by using the gcloud app-lifecycle-manager saas list command:

gcloud app-lifecycle-manager saas list --location=LOCATION

Replace LOCATION with the resource location, such as global or us-central1.

Describe a specific SaaS offering by using the gcloud app-lifecycle-manager saas describe command:

gcloud app-lifecycle-manager saas describe \
    SAAS_OFFERING_NAME --location=LOCATION

Replace the following:

  • SAAS_OFFERING_NAME: the name of the SaaS offering
  • LOCATION: the resource location, such as global or us-central1

List unit kinds by using the gcloud app-lifecycle-manager unit-kinds list command:

gcloud app-lifecycle-manager unit-kinds list --location=LOCATION

Replace LOCATION with the resource location, such as global or us-central1.

List units by using the gcloud app-lifecycle-manager units list command:

gcloud app-lifecycle-manager units list --location=LOCATION

Replace LOCATION with a regional location, such as us-central1. Units are stored only in regional locations and are not replicated to global.

To inspect an individual unit kind or unit, use the gcloud app-lifecycle-manager unit-kinds describe command or gcloud app-lifecycle-manager units describe command.

Edit a SaaS offering

You can update the available regions, labels, and connected Application Design Center composite template for a SaaS offering. The resource name and parent location are immutable. Select one of the following options:

Console

  1. In the Google Cloud console, go to the SaaS offerings page:

    Go to SaaS offerings

  2. In the Name column, click the SaaS offering that you want to update.

  3. On the SaaS offering details page, click Edit.

  4. In the Region list, select or clear regions and click OK, or in the Labels section, add, edit, or remove key-value pairs.

  5. Click Save.

gcloud

Update a SaaS offering's regions or labels by using the gcloud app-lifecycle-manager saas update command:

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --add-locations=name=REGION \
    --update-labels=KEY=VALUE

Replace the following:

  • SAAS_OFFERING_NAME: the name of the SaaS offering
  • LOCATION: the location of the SaaS offering
  • REGION: a Google Cloud region to add, such as europe-west1
  • KEY: the label key to add or update
  • VALUE: the label value to add or update

To remove locations or labels, pass --remove-locations=name=REGION or --remove-labels=KEY.

Connect a new template

If no App Design Center composite template is connected to your SaaS offering, connect an existing template or create a new one:

Console

  1. On the SaaS offering details page under Connected application template, click Connect existing template to select an existing template, or click Create new template to design one in App Design Center.
  2. Follow the prompts to connect the template to your SaaS offering.

gcloud

Connect a composite template in the source region by passing its full resource name to --application-template with gcloud app-lifecycle-manager saas update:

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID

Replace the following:

  • SAAS_OFFERING_NAME: the name of the SaaS offering
  • LOCATION: the source region of the SaaS offering
  • PROJECT_ID: the Google Cloud project ID
  • SPACE: the App Design Center space ID
  • TEMPLATE_ID: the composite template ID

Update a connected template

When a App Design Center composite template is already connected, you can update the template revision, edit the template in the design canvas, update dependencies, or disconnect the template:

Console

  1. On the SaaS offering details page under Connected application template, click Manage template.
  2. Select one of the following options:
    • Update template revision: Choose a newer template revision to update to and trigger template resynchronization.
    • Configure in canvas: Open the template in the App Design Center canvas to modify its components and configurations.
    • Edit dependencies: Open the template details to update its dependencies.
    • Disconnect template: Remove the association between the template and the SaaS offering without deleting imported resources.

gcloud

Switch a connected template revision in the source region by passing the full revision resource name to --application-template-revision with gcloud app-lifecycle-manager saas update:

gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template-revision=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID/revisions/REVISION_ID

Replace the following:

  • SAAS_OFFERING_NAME: the name of the SaaS offering
  • LOCATION: the source region of the SaaS offering
  • PROJECT_ID: the Google Cloud project ID
  • SPACE: the App Design Center space ID
  • TEMPLATE_ID: the composite template ID
  • REVISION_ID: the template revision ID

Changing the template revision triggers template resynchronization rather than a metadata-only update.

Edit a unit kind

You can update a unit kind's default release and labels in the Google Cloud console or by using the Google Cloud CLI. The unit kind name, parent SaaS offering, and dependencies are immutable. For unit kinds imported from a composite template, manage dependencies and variable mappings in App Design Center. Select one of the following options:

Console

  1. In the Google Cloud console, go to the Unit kinds page:

    Go to Unit kinds

  2. In the Name column, click the unit kind that you want to update.

  3. On the Unit kind details page, click Edit.

  4. In the Default release list, select a release or No default release, and update labels in the Labels section.

  5. Click Save.

gcloud

Update a unit kind by using the gcloud app-lifecycle-manager unit-kinds update command:

gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --location=LOCATION \
    --default-release=RELEASE_NAME \
    --update-labels=KEY=VALUE

Replace the following:

  • UNIT_KIND_NAME: the name of the unit kind
  • LOCATION: the location of the unit kind
  • RELEASE_NAME: the default release name for units
  • KEY: the label key to add or update
  • VALUE: the label value to add or update

To unset the default release, pass the --clear-default-release flag directly after UNIT_KIND_NAME:

gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --clear-default-release \
    --location=LOCATION

Edit a unit

You can update a unit's labels, tenant association, and maintenance pinning settings without triggering infrastructure provisioning. The unit name, unit kind, and management mode are immutable after creation. To associate a unit with a tenant or reassign its tenant, see Associate a unit with a tenant or pass --tenant to gcloud app-lifecycle-manager units update. Select one of the following options:

Console

  1. In the Google Cloud console, go to the Units page:

    Go to Units

  2. In the Name column, click the unit that you want to update.

  3. On the Unit details page, click Edit.

  4. In the Labels section, update key-value pairs, or in the Pin Unit section, enter a future date and time in the Pinned Until field (or to unpin the unit, click Clear date).

  5. Click Save.

gcloud

Update a unit's labels or pin its current release by using the gcloud app-lifecycle-manager units update command:

gcloud app-lifecycle-manager units update UNIT_NAME \
    --location=LOCATION \
    --update-labels=KEY=VALUE \
    --maintenance-pinned-until-time=PINNED_UNTIL_TIME

Replace the following:

  • UNIT_NAME: the name of the unit
  • LOCATION: the location of the unit
  • KEY: the label key to add or update
  • VALUE: the label value to add or update
  • PINNED_UNTIL_TIME: an RFC 3339 timestamp in the future until which rollouts skip upgrading the unit, such as 2099-12-31T23:59:59Z

To unpin a unit, pass a timestamp in the past, such as --maintenance-pinned-until-time=1970-01-01T00:00:00Z.

Verify resource updates

Confirm your changes on the resource's details page in the Google Cloud console, or describe the updated resource by using the gcloud CLI:

gcloud app-lifecycle-manager units describe UNIT_NAME \
    --location=LOCATION

Replace the following:

  • UNIT_NAME: the name of the unit
  • LOCATION: the location of the unit

What's next