A blueprint packages your Terraform configurations as an Open Container Initiative (OCI) image stored in Artifact Registry to define your SaaS application and infrastructure. App Lifecycle Manager versions and provisions these images across your environments.

<br />

This document assumes that you're familiar with Terraform (see
[What is Terraform?](https://developer.hashicorp.com/terraform/intro) in the
HashiCorp documentation). For instructions on packaging and uploading your
configuration, see
[Create and upload a blueprint](https://docs.cloud.google.com/app-lifecycle-manager/create-upload-blueprint.md.txt).

## Blueprint requirements

App Lifecycle Manager uses Infrastructure Manager to deploy the Terraform
configurations onto Google Cloud. For details about requirements and
constraints, see
[Constraints on Terraform configurations](https://docs.cloud.google.com/infrastructure-manager/docs/infra-manager-terraform.md.txt#constraints).

To use the Terraform configuration, App Lifecycle Manager uses a package of the
Terraform configuration. This package is an OCI (Open Container Initiative)
image that is stored in Artifact Registry.

You can provide an OCI image that contains the Terraform configuration.
Otherwise, you provide the Terraform configuration and App Lifecycle Manager
creates the OCI image. For details about how you can provide the Terraform configuration, see the following section
[How to provide a blueprint](https://docs.cloud.google.com/app-lifecycle-manager/blueprints.md.txt#provide_blueprint).

## Terraform variables in blueprints

Your Terraform configurations can use variables to customize
deployments. App Lifecycle Manager provides flexible ways to manage these variables,
see [manage variables](https://docs.cloud.google.com/app-lifecycle-manager/variables.md.txt).

## How to provide a blueprint

You can provide the blueprint as a Terraform configuration or an OCI image
that packages the Terraform configuration.

You can provide a blueprint to App Lifecycle Manager in the following ways:

- Terraform configuration stored in an external repository.
- Terraform configuration stored in a zip archive.
- Using the Terraform configuration and Cloud Build, build the OCI image yourself and push it to Artifact Registry.
- Automate the build of the OCI image using the Terraform configuration and Cloud Build. This automated method is useful for CI/CD pipelines.

## How App Lifecycle Manager uses the blueprint

When you use App Lifecycle Manager, the blueprint is stored in Artifact Registry with the
[Docker format](https://docs.cloud.google.com/artifact-registry/docs/supported-formats.md.txt). The blueprint is
deployed onto Google Cloud using Infrastructure Manager.

For details about the repository in Artifact Registry, see
[Create a repository for App Lifecycle Manager](https://docs.cloud.google.com/app-lifecycle-manager/create-repository.md.txt).

### Upload a blueprint

You can provide the blueprint as a Terraform configuration or an OCI image
that packages the Terraform configuration.

You upload the blueprint to App Lifecycle Manager when you create a unit kind. You
can select the blueprint in one the following ways:

- Upload the Terraform configuration as a zip archive.
- Link an external repository.
- Select an existing image from Artifact Registry.

For more details, see
[Create a unit kind](https://docs.cloud.google.com/app-lifecycle-manager/design-saas-offering.md.txt#create_a_unit_kind).

### Provision the blueprint

App Lifecycle Manager provisions the infrastructure described in the blueprint
when it [creates a unit](https://docs.cloud.google.com/app-lifecycle-manager/deploy-saas-offering.md.txt#deploy_the_saas_offering).

App Lifecycle Manager uses Infrastructure Manager to provision the infrastructure.
Infrastructure Manager uses Cloud Build as part of its workflow. When App Lifecycle Manager creates a unit, information about the status of the deployment
is available from all three services:

- App Lifecycle Manager
- Infrastructure Manager
- Cloud Build

For more details about how Infrastructure Manager deploys
Terraform configurations, see
[Infrastructure Manager overview](https://docs.cloud.google.com/infrastructure-manager/docs/overview.md.txt).

### Control versioning

App Lifecycle Manager controls versioning of the blueprint by versioning the
OCI image with Artifact Registry, and by using a release in App Lifecycle Manager to
point to a specific version of the blueprint in Artifact Registry.

## What's next

- Try the [quickstart](https://docs.cloud.google.com/app-lifecycle-manager/quickstart.md.txt) to get started using App Lifecycle Manager.
- Create a registry in Artifact Registry to store blueprints for App Lifecycle Manager.

- To learn more about App Lifecycle Manager, see
  [App Lifecycle Manager overview](https://docs.cloud.google.com/app-lifecycle-manager/overview.md.txt).