Infrastructure Manager (Infra Manager) automates the deployment and management of Google Cloud infrastructure resources using Terraform.
Infra Manager allows you to deploy programmatically to Google Cloud, allowing you to use this service rather than maintaining a different toolchain to work with Terraform on Google Cloud.
A Terraform configuration defines the infrastructure. The configuration is deployed onto Google Cloud by Infra Manager, enabling you to manage resources using Infrastructure as Code (IaC).
Infra Manager does not manage the deployment of applications onto your resources. To manage application deployment, you can use Google Cloud products like Cloud Build and Cloud Deploy. You can also use third-party tools or your own toolchain.
To work with Infra Manager, you should be familiar with Terraform. To learn more about Terraform, start with HashiCorp's What is Terraform?.
To learn more about Terraform with Google Cloud, see Terraform on Google Cloud.
Infra Manager and Infrastructure as Code
Infra Manager allows you to use IaC to manage the lifecycle of Google Cloud resources:
- Terraform is defined declaratively in a Terraform configuration. This means that the configuration describes the end state of your infrastructure.
- You can version the Terraform configuration, either in a public Git repository or in a Cloud Storage bucket. Use Object Versioning to version configurations in a storage bucket.
- Use Infra Manager to update your infrastructure deployment
with revisions. For each revision, Infra Manager
stores the following:
- The configuration used to do the revision
- The list of Google Cloud resources created by the revision
- The state file created as part of each deployment and revision
How Infra Manager works
The following is a description of what happens in a simple scenario when you use Infra Manager to deploy infrastructure.
- The infrastructure resources to deploy onto Google Cloud are defined in a
- You can create this file yourself, or use a configuration that is already written for Google Cloud. See Terraform and Infrastructure Manager for details.
- You can store the Terraform configuration in a Cloud Storage bucket, a public Git repository, or on your local machine.
- When you use Infra Manager to deploy resources from a Terraform
configuration, you create a deployment. To create a deployment,
- Validates the request. For example, it ensures that in your command you specified the location of the Terraform configuration.
- Creates a Cloud Build job using a container image. This image is
owned and maintained by Google Cloud. The Cloud Build job automates
the following tasks:
- Downloads the Terraform module from the storage bucket or public Git repository.
- Initializes Terraform (
- Validates the Terraform configuration (
- Actuates the configuration (
terraform apply, or
terraform destroyif you are deleting a deployment)
- Streams Cloud Build logs into a storage bucket created by Infra Manager.
- Creates a Cloud Storage bucket and stores metadata about the deployment. For more information about the deployment and metadata, see Deployment and revision overview.
When the deployment is complete, the Google Cloud resources are provisioned as the configuration described them.
You can query Infra Manager deployment for:
- The status of the deployment.
- The list of resources that are deployed as part of the deployment.
- Details about individual resources that are part of a deployment.
- Learn more about Terraform with Google Cloud.
- Create a deployment.
- Update a deployment.
- View the state of a deployment.
- Delete a deployment.