Added new read CRUD function logic that leverages a centralised helper function for reading resources into state. This is to accommodate large terraform resource deployment changes. (create, update etc)
This function incorporates exponential backoff with jitter to efficiently manage retry attempts in the face of transient errors or temporary server unavailability, ensuring robust error handling and resource state synchronisation.
Note: If the resource cannot be found (indicated by 404 or 410 HTTP status codes in the error message) after the retry context finishes, the function marks the resource for deletion from the Terraform state by clearing its ID. This signifies to Terraform that the resource no longer exists and should be removed from the state file.
Added new read CRUD function logic that leverages a centralised helper function for reading resources into state. This is to accommodate large terraform resource deployment changes. (create, update etc)
This function incorporates exponential backoff with jitter to efficiently manage retry attempts in the face of transient errors or temporary server unavailability, ensuring robust error handling and resource state synchronisation.
Note: If the resource cannot be found (indicated by 404 or 410 HTTP status codes in the error message) after the retry context finishes, the function marks the resource for deletion from the Terraform state by clearing its ID. This signifies to Terraform that the resource no longer exists and should be removed from the state file.