Terminating an Instance
You can permanently terminate (delete) instances that you no longer need. Any attached VNICs and volumes are automatically detached when the instance terminates. Eventually, the instance's public and private IP addresses are released and become available for other instances. By default, the instance's boot volume is deleted when you terminate the instance, however you can preserve the boot volume associated with the instance, so that you can attach it to a different instance as a data volume, or use it to launch a new instance.
If your instance has NVMe storage, terminating it securely erases the NVMe drives and the data that was on those drives becomes completely unrecoverable. Make sure you back up important data before terminating an instance. For more information, see Protecting Data on NVMe Devices.
Required IAM Policy
To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment you should work in.
For administrators: The policy in Let users launch Compute instances includes the ability to terminate an instance (with or without an attached block volume).
If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.
Using the Console
- Open the . Under Core Infrastructure, go to Compute and click Instances.
- In the list of instances, find the instance you want to terminate.
- Click the name of the instance to display the instance details.
Click Terminate, and then respond to the confirmation prompt.
If you want to preserve the boot volume associated with the instance, clear the Permanently delete the attached Boot Volume check box.
Terminated instances temporarily remain in the list of instances with the status Terminated.
Using the API
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
Use the TerminateInstance operation to terminate an instance.