deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
26 stars 9 forks source link

Refactored CRUD read function pattern for printers, extension atts and scripts #139

Closed ShocOne closed 5 months ago

ShocOne commented 5 months ago

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.