QuotaPreference represents the preferred quota configuration specified for a project, folder or organization. There is only one QuotaPreference resource for a quota value targeting a unique set of dimensions.
To get more information about QuotaPreference, see:
resource "google_cloud_quotas_quota_preference" "preference" {
parent = "projects/my-project-name"
name = "compute_googleapis_com-CPUS-per-project_us-east1"
dimensions = { region = "us-east1" }
service = "compute.googleapis.com"
quota_id = "CPUS-per-project-region"
contact_email = "testuser@gmail.com"
quota_config {
preferred_value = 200
}
}
The following arguments are supported:
service
-
(Required)
The name of the service to which the quota preference is applied.
quota_id
-
(Required)
The id of the quota to which the quota preference is applied. A quota id is unique in the service.
Example: CPUS-per-project-region
.
quota_config
-
(Required)
The preferred quota configuration.
Structure is documented below.
parent
-
(Required)
The parent of the quota preference. Allowed parents are "projects/[project-id / number]" or "folders/[folder-id / number]" or "organizations/[org-id / number]".
The quota_config
block supports:
preferred_value
-
(Required)
The preferred value. Must be greater than or equal to -1. If set to -1, it means the value is "unlimited".
state_detail
-
(Output)
Optional details about the state of this quota preference.
granted_value
-
(Output)
Granted quota value.
trace_id
-
(Output)
The trace id that the Google Cloud uses to provision the requested quota. This trace id may be used by the client to contact Cloud support to track the state of a quota preference request. The trace id is only produced for increase requests and is unique for each request. The quota decrease requests do not have a trace id.
annotations
-
(Optional)
The annotations map for clients to store small amounts of arbitrary data. Do not put PII or other sensitive information here. See https://google.aip.dev/128#annotations.
An object containing a list of "key: value" pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
request_origin
-
(Output)
The origin of the quota preference request.
name
-
(Optional)
The resource name of the quota preference. Required except in the CREATE requests.
dimensions
-
(Optional)
The dimensions that this quota preference applies to. The key of the map entry is the name of a dimension, such as "region", "zone", "network_id", and the value of the map entry is the dimension value. If a dimension is missing from the map of dimensions, the quota preference applies to all the dimension values except for those that have other quota preferences configured for the specific value.
NOTE: QuotaPreferences can only be applied across all values of "user" and "resource" dimension. Do not set values for "user" or "resource" in the dimension map.
Example: {"provider": "Foo Inc"}
where "provider" is a service specific dimension.
justification
-
(Optional)
The reason / justification for this quota preference.
contact_email
-
(Optional)
An email address that can be used for quota related communication between the Google Cloud and the user in case the Google Cloud needs further information to make a decision on whether the user preferred quota can be granted.
The Google account for the email address must have quota update permission for the project, folder or organization this quota preference is for.
ignore_safety_checks
-
(Optional)
The list of quota safety checks to be ignored.
Default value is QUOTA_SAFETY_CHECK_UNSPECIFIED
.
Possible values are: QUOTA_SAFETY_CHECK_UNSPECIFIED
, QUOTA_DECREASE_BELOW_USAGE
, QUOTA_DECREASE_PERCENTAGE_TOO_HIGH
.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{parent}}/locations/global/quotaPreferences/{{name}}
etag
-
The current etag of the quota preference. If an etag is provided on update and does not match the current server's etag of the quota preference, the request will be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags for more details on etags.
create_time
-
Create time stamp.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: 2014-10-02T15:01:23Z
and 2014-10-02T15:01:23.045123456Z
.
update_time
-
Update time stamp.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: 2014-10-02T15:01:23Z
and 2014-10-02T15:01:23.045123456Z
.
reconciling
-
Is the quota preference pending Google Cloud approval and fulfillment.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.QuotaPreference can be imported using any of these accepted formats:
{{parent}}/locations/global/quotaPreferences/{{name}}
In Terraform v1.5.0 and later, use an import
block to import QuotaPreference using one of the formats above. For example:
import {
id = "{{parent}}/locations/global/quotaPreferences/{{name}}"
to = google_cloud_quotas_quota_preference.default
}
When using the terraform import
command, QuotaPreference can be imported using one of the formats above. For example:
$ terraform import google_cloud_quotas_quota_preference.default {{parent}}/locations/global/quotaPreferences/{{name}}