Skip to content

Automate the cleanup of unused or idle resources within your Oracle Cloud Infrastructure (OCI)

License

Notifications You must be signed in to change notification settings

rclevenger-hm/oci-automated-resource-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Automated Resource Cleanup

Automate the cleanup of unused or idle resources within your Oracle Cloud Infrastructure (OCI) environment. This serverless function identifies and terminates resources that match predefined criteria, helping you optimize costs and maintain a streamlined cloud environment.

## Key Features

- **Resource Discovery:** Identify resources that have been idle for a certain period or match specific criteria.
  
- **Automated Cleanup:** Terminate or deallocate the identified resources based on your cleanup policies.

- **Customizable Criteria:** Define your own criteria for identifying idle resources, such as instance uptime or lack of incoming traffic.

## Getting Started

Follow these steps to set up and deploy the Automated Resource Cleanup function:

1. **OCI Configuration:** Place your OCI configuration file (`config`) in the `.oci/` directory.

2. **Function Setup:** Inside the `function/` directory, find `cleanup_resources.py`, which contains the logic for resource discovery and cleanup. Configure the script according to your requirements.

3. **Dependencies:** Ensure you have the required Python dependencies listed in `function/requirements.txt`.

4. **Scheduling:** Set up a scheduling mechanism to run the function at specific intervals. You can use OCI's built-in cron scheduling feature or an external scheduler.

5. **Deployment:** Deploy the function on OCI using the appropriate tools or scripts for your environment.

## Usage

1. Configure the criteria for resource cleanup in `cleanup_resources.py`.

2. Set up the scheduling mechanism to run the function at specified intervals.

3. Deploy the function and let it automatically identify and cleanup unused resources.

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request.

## License

This project is licensed under the [MIT License](LICENSE).

---

Automate resource management in your OCI environment. Optimize costs and streamline your cloud operations with "Automated Resource Cleanup."

About

Automate the cleanup of unused or idle resources within your Oracle Cloud Infrastructure (OCI)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages