Open roaks3 opened 3 weeks ago
I just ran into this today with TPG 5.30.0 and the following example
resource "google_cloud_quotas_quota_preference" "ssd_storage" {
parent = "projects/${var.project_id}"
service = "compute.googleapis.com"
quota_id = "SSD-TOTAL-GB-per-project-region"
dimensions = { region = "us-east4" }
contact_email = "foo@bar.com"
quota_config {
preferred_value = 100000
}
}
received similar permadiff
# google_cloud_quotas_quota_preference.ssd_storage will be updated in-place
~ resource "google_cloud_quotas_quota_preference" "ssd_storage" {
~ dimensions = {
+ "region" = "us-east4"
}
id = "projects/redacted-proj-id/locations/global/quotaPreferences/"
+ quota_id = "SSD-TOTAL-GB-per-project-region"
+ service = "compute.googleapis.com"
# (4 unchanged attributes hidden)
+ quota_config {
+ preferred_value = "100000"
}
}
Terraform state shows incorrect values for several arguments.
{
"mode": "managed",
"type": "google_cloud_quotas_quota_preference",
"name": "ssd_storage",
"provider": "provider[\"registry.terraform.io/hashicorp/google\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"contact_email": "<redacted>",
"create_time": "",
"dimensions": {},
"etag": "",
"id": "projects/<redacted>/locations/global/quotaPreferences/",
"ignore_safety_checks": "QUOTA_SAFETY_CHECK_UNSPECIFIED",
"justification": null,
"name": "",
"parent": "projects/<redacted>",
"quota_config": [],
"quota_id": "",
"reconciling": false,
"service": "",
"timeouts": null,
"update_time": ""
},
"sensitive_attributes": [],
"private": "<redacted>"
}
]
}
Community Note
Terraform Version & Provider Version(s)
Terraform vX.X.X on
Affected Resource(s)
google_cloud_quotas_quota_preference
Terraform Configuration
Debug Output
No response
Expected Behavior
terraform apply
creates the Quota preferenceterraform apply
shows no changesActual Behavior
terraform apply
creates the Quota preferencenext
terraform apply
shows diff:Steps to reproduce
terraform apply
Important Factoids
These fields should most likely be changed to
ignore_read: true
, as I assume they aren't returned in the API.However, the workaround is to use ignore_changes:
References
No response
b/361347182