Terraform support for Cloud Quotas

Terraform is an Infrastructure as code (IaC) tool that you can use to provision resources and permissions for Cloud Quotas. To learn how to use Terraform to provision infrastructure on Google Cloud, refer to the Terraform on Google Cloud documentation.

You can use Terraform to do the following with Cloud Quotas:

  • Retrieve the QuotaInfo data source of a quota for a project, folder or organization.
  • List QuotaInfos data source of all quotas for a given project, folder or organization.
  • Create a new, or update an existing, QuotaPreference quota configuration that specifies the preferred value for a quota.

Before you begin

Before you begin, you need access to Terraform:

To use Terraform with Cloud Quotas, create a configuration file to describe your infrastructure, and then apply the configuration file to create an execution plan and perform operations to provision your infrastructure.

Terraform resources and data sources

The following table lists Cloud Quotas configuration samples that appear in the Terraform registry.

Cloud Quotas resources and data sources Terraform registry sample
Data source: QuotaInfo of a quota for a project, folder or organization google_cloud_quotas_quota_info
Data source: QuotaInfos of all quotas for a given project, folder or organization google_cloud_quotas_quota_infos
Resource: QuotaPreference google_cloud_quotas_quota_preference

What's next

Learn more about Terraform: