Open imrannayer opened 1 year ago
@imrannayer can you share your debug log?
@edwardmedia any update on this?
applies to primary instances as well
availability_type and gce_zone are missing in the api response
b/272346276
Adding a note that as a temporary workaround users can use lifecycle ignore_changes to ignore the availability_type
and gce_zone
perma-diffs.
The API should now return availability_type.
I've been looking into this in response to a customer issue, and FWIW I can see that GET requests for primary instances return the availabilityType
field but that isn't the case for read pool instances (and neither instance type returns the gceZone
).
Primary instance:
GET /v1/projects/redacted/locations/us-central1/clusters/alloydb-cluster-all/instances/primary-instance-1
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Thu, 09 Nov 2023 12:07:53 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"name": "projects/redacted/locations/us-central1/clusters/alloydb-cluster-all/instances/primary-instance-1",
"uid": "f73c5058-1e99-43c0-baf6-d7ce947b2695",
"createTime": "2023-11-09T11:35:17.556146829Z",
"updateTime": "2023-11-09T11:53:17.875659511Z",
"state": "READY",
"instanceType": "PRIMARY",
"machineConfig": {
"cpuCount": 2
},
"availabilityType": "ZONAL",
"ipAddress": "10.35.0.2",
"reconciling": false,
"writableNode": {
"zoneId": "us-central1-b"
},
"queryInsightsConfig": {
"recordApplicationTags": false,
"recordClientAddress": false,
"queryStringLength": 1024,
"queryPlansPerMinute": 5
}
}
Read pool instance:
GET /v1/projects/redacted/locations/us-central1/clusters/alloydb-cluster-all/instances/read-instance-1
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Thu, 09 Nov 2023 11:49:33 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"name": "projects/redacted/locations/us-central1/clusters/alloydb-cluster-all/instances/read-instance-1",
"uid": "0244997a-be1e-49a6-a74f-4eb53f4ef314",
"createTime": "2023-11-09T11:43:18.523217489Z",
"updateTime": "2023-11-09T11:49:27.158284795Z",
"state": "READY",
"instanceType": "READ_POOL",
"machineConfig": {
"cpuCount": 8
},
"readPoolConfig": {
"nodeCount": 1
},
"ipAddress": "10.35.0.5",
"reconciling": false,
"queryInsightsConfig": {
"recordApplicationTags": false,
"recordClientAddress": false,
"queryStringLength": 1024,
"queryPlansPerMinute": 5
}
}
And as a result the permadiff is either one or two fields:
still an issue. any update on this?
Marking for re-forwarding.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.3.6 on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
If there is no change in values provider should not update resource
Actual Behavior
Provider is updating values of
availability_type
andgce_zone
on every run irrespective of change.Steps to Reproduce
Rerun code multiple times. It will update values of
availability_type
andgce_zone
terraform apply
2.terraform apply
Important Factoids
References
0000
b/354771977