Blueprints in SaaS Runtime

To use SaaS Runtime, you need to use a Terraform configuration to define the SaaS application and infrastructure that you want to deploy.

In SaaS Runtime, a blueprint is the term used for the packaged Terraform configuration that defines the infrastructure and application that you deploy. The packaged Terraform configurations are Open Container Initiative (OCI) images that are stored in Artifact Registry.

This page describes:

  • The requirements for the Terraform configurations when using SaaS Runtime.
  • How you can provide the Terraform configurations to SaaS Runtime.
  • How SaaS Runtime uses the Terraform configuration.

This page assumes that you are familiar with Terraform. To learn more about Terraform, start with What is Terraform?.

For details about creating an OCI image using a Terraform configuration, See Create and upload a blueprint.

Blueprint requirements

SaaS Runtime uses Infrastructure Manager to deploy the Terraform configurations onto Google Cloud. For details about requirements and constraints, see Constraints on Terraform configurations.

To use the Terraform configuration, SaaS Runtime 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 SaaS Runtime creates the OCI image. For details about how you can provide the Terraform configuration, see the following section How to provide a blueprint.

Terraform variables in blueprints

Your Terraform configurations can use variables to customize deployments. SaaS Runtime provides flexible ways to manage these variables, see manage variables.

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 SaaS Runtime 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 SaaS Runtime uses the blueprint

When you use SaaS Runtime, the blueprint is stored in Artifact Registry with the Docker format. The blueprint is deployed onto Google Cloud using Infrastructure Manager.

For details about the repository in Artifact Registry, see Create a repository for SaaS Runtime.

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 SaaS Runtime 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.

Provision the blueprint

SaaS Runtime provisions the infrastructure described in the blueprint when it creates a unit.

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

  • SaaS Runtime
  • Infrastructure Manager
  • Cloud Build

For more details about how Infrastructure Manager deploys Terraform configurations, see Infrastructure Manager overview

Control versioning

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

What's next