Terraform and Infrastructure Manager

To work with Infrastructure Manager (Infra Manager), you should be familiar with Terraform. To learn more about Terraform, start with What is Terraform?.

Infra Manager deploys infrastructure resources and configurations that are defined in a Terraform configuration. These configurations can consist of multiple files and directories, but their entrypoint must be a Terraform root module.

Infra Manager uses the term blueprint to refer to a Terraform configuration.

To learn more about Terraform with Google Cloud, see Terraform on Google Cloud.

Terraform modules for Google Cloud

For a set of modules to provision Google Cloud resources, see Terraform blueprints and modules for Google Cloud.

You can also create your own Terraform modules for Google Cloud. For more details, see Creating Modules.

Supported Terraform versions

Infra Manager supports the following Terraform versions:

Terraform version Date available Deprecation date End of support date Auto-migrate to version
1.2.3 8/21/2023 1/8/2026 2/8/2026 1.5.7
1.3.10 3/14/2024 TBD TBD TBD
1.4.7 3/14/2024 TBD TBD TBD
1.5.7 3/14/2024 TBD TBD TBD

You can use the flag --tf-version-constraint to specify the version of Terraform that Infra Manager uses to create a deployment.

Before you use Infrastructure Manager to deploy a Terraform configuration, ensure that the configuration has the following constraints:

If you don't specify a version of Terraform, the latest supported version is used by default.

When updating a deployment, you can upgrade to a later Terraform version, but you cannot downgrade to an earlier supported version. For information about Terraform version deprecation, see the Terraform version management policy documentation.

To view the version of Terraform that was used to create a specific deployment or revision, see View details of a deployment and View details of a revision.

Constraints on Terraform configurations

To use Infrastructure Manager to deploy a Terraform configuration, the configuration has the following constraints:

Terraform configuration values and sensitive data

Don't include personally identifiable or sensitive information in Terraform configuration values.

The documentation for the Google Cloud provider indicates configuration values that can potentially include sensitive information.

For example, the resource google_storage_bucket_object allows creation of a Cloud Storage object using the content argument. This argument is labeled as sensitive on the google_storage_bucket_object page of the Google Cloud Provider documentation.

You can use these labels to help guide you as you create Terraform configurations or as you review an existing Terraform configuration before use.

See the Google Cloud Privacy Notice for information on how Google Cloud processes personal information it collects or generates during the provision and administration of the Cloud Services.

Use the Terraform provider for Google Cloud

Optionally, you can use gcloud CLI to configure deployments and previews to use Infra Manager maintained Terraform providers for Google Cloud.

Infra Manager supports Terraform providers for Google Cloud:

  • google
  • google-beta

Omit this field to use the HashiCorp-maintained Terraform provider for Google Cloud.

To learn how to specify the use of a Infra Manager maintained Terraform provider, see Deploy infrastructure using Infrastructure Manager, Update a deployment, or Preview a deployment.

Check supported versions of the provider

To check the versions of a Terraform provider for Google Cloud that Infra Manager supports, view the manifest.json in the Infra Manager maintained Cloud Storage bucket associated with the region of your deployment in the format:

https://storage.googleapis.com/LOCATION-im-providers/hashicorp/PROVIDER_VERSION/manifest.json

You can find a complete list of supported versions within the versions field of the manifest.json file.

For example, if your deployment is located in the africa-south1 region and you are using the google-beta provider, navigate to https://storage.googleapis.com/africa-south1-im-providers/hashicorp/google-beta/manifest.json to view available regions.

What's next