# Functions
CloseOrLogError closes the given io.Closer and logs any error.
ConvertToStringSlice helps convert interface slice to string slice.
GetAnyBoolEnv returns the first non-empty boolean value from the environment variables.
GetAnyIntEnv returns the first non-empty integer value from the environment variables.
GetAnyStringEnv returns the first non-empty string value from the environment variables.
ListResourcesAttributeValue generates a list of strings from a Terraform resource list (which is list of maps).
MapDiff compares the difference between two maps and returns the elements that are in the plan but not in the state (toCreate), the elements that are in the plan and in the state but are different (toUpdate), and the elements that are in the state but not in the plan (toDelete).
MapResourcesByAttribute generates a map of resources from a resource list, using a specified attribute as the key and the resource as the value.
OrderedListFromMap generates a list from a map's values.
OrderedListFromMapByKeyValues generates a list from a map's values.
SetDiff compares two slices of elements and returns the elements that are in the plan but not in the state (toCreate), the elements that are in the plan and in the state but are different (toUpdate), and the elements that are in the state but not in the plan (toDelete).