Disposable resources are cloud resources that are not needed for the long-term operation of an application or service, and can be easily created and deleted on-demand. Examples of disposable resources include temporary storage, spot instances, and disposable virtual machines. Disposable resources can help to reduce costs and improve flexibility, but they also incur charges when they are in use or attached to other resources. Therefore, when a company decommissioned its testing environment, it should detach and delete disposable resources first to avoid charges12
Emptying the logging directory is not the best option to avoid charges, because logging directory is a folder that stores the records of events and activities that occur in an application or service. Logging directory can help to monitor and troubleshoot the performance and issues of the application or service, but it does not directly affect the charges of the cloud resources. Emptyingthe logging directory may also result in the loss of valuable information and insights that can be used for future improvement or analysis.
Deleting infrastructure as code templates is not the best option to avoid charges, because infrastructure as code templates are files that define and configure the cloud resources using code or scripts. Infrastructure as code templates can help to automate and standardize the deployment and management of the cloud resources, but they do not directly affect the charges of the cloud resources. Deleting infrastructure as code templates may also make it harder to recreate or modify the cloud resources in the future.
Disabling alerts and alarms is not the best option to avoid charges, because alerts and alarms are notifications that are triggered by certain conditions or thresholds that are set for the cloud resources. Alerts and alarms can help to notify and respond to the changes or issues of the cloud resources, but they do not directly affect the charges of the cloud resources. Disabling alerts and alarms may also make it difficult to detect and resolve any problems or anomalies that may occur in the cloud resources.
[References: 1: https://docs.microsoft.com/en-us/azure/virtual-machines/disposable-vm 2: https://www.comptia.org/training/books/cloud-essentials-clo-002-study-guide, page 46, , , ]