Hello, and welcome to this video demonstrating how to remove a VCN, or Virtual Cloud Network,
from Oracle Cloud Infrastructure.
In this video we will look at how to remove a VCN using the web console.
On the web console we are looking at our dashboard.
To get a list of VCNs, we click on the navigation menu, then Networking, and Virtual Cloud Networks.
We see two VCNs listed in our compartment, morDemoVCN1 and morDemoVCN2.
There are a number of ways we can remove, or terminate, a VCN, so we will use these
two VCNs to explore a couple of scenarios.
So first we will terminate morDemoVCN2.
Clicking on its name, we are shown its details.
We can see the compartment it was built in, and the CIDR block range used for assigning
IP addresses.
You can find out more information about Virtual Cloud Networks in the documentation at this
link.
We can see the Terminate button, but before we use this lets looks more at this VCN.
Under the Resources section, Subnets is already selected and we are shown a list of two subnets
created under this VCN, morDemoVCN-sub2 and morDemoVCN2-sub1.
Also under Resources, we can see other networking components associated with this VCN, such
as Route Tables, Security Lists, etc.
In order to Terminate a VCN any configured components must be removed or de-associated
from the VCN first.
Lets see how this is done.
To remove the subnet morDemoVCN-sub2, we click on the three dots menu beside it.
Then take the Terminate option.
A confirmation dialog is shown, and we click Terminate.
The subnet is now removed from the list, and we could do this for the other subnet if we
wished.
But lets try to remove the VCN now.
Scrolling up, we click on the Terminate button.
A Terminate Virtual Cloud Network dialog opens.
We are presented with a list of resources which will be checked to see if any are associated
with this VCN.
There is a Help link in the dialog which will provide more information about the process
of terminating the VCN.
After a few minutes the information loading completes and the dialog now has a list of
components that will need to be terminated in order to terminate the VCN.
We are shown a warning that anything terminated cannot be restored afterwards.
We click on Terminate All to continue.
The dialog updates to confirm the VCN is terminated, and we click Close.
We are returned to the VCN details, and would need to refresh the screen to see it is gone.
Instead we use the breadcrumbs menu and select Virtual Cloud Networks.
Our list now only shows morDemoVCN1.
The VCN is a very important component of your Oracle Cloud infrastructure, as other provisioned
elements are dependent on it.
For example, compute instances, load balancers, mount targets, network security groups.
Compute instances cannot be created without first having a virtual cloud network in place.
Similarly, terminating a VCN requires first de-associating any dependencies other components
have on it.
Our second VCN is being used by a compute instance so lets see what steps are needed
to terminate this VCN.
We click on the navigation menu, then Compute, and Instances.
We see an instance named morDemoInst-100.
Clicking the instance name, the details confirm that this instance is associated with the
VCN morDemoVCN1, and is using subnet morDemoVCN1-sub1, a component of that VCN.
We return to our VCN, using the navigation menu, Networking, and Virtual Cloud Networks.
We click on our VCN name to view its details.
For the subnet, clicking on the three dots menu, then Terminate, we get our confirmation
dialog again.
Clicking Terminate, we get a warning that this is not possible because the subnet is
associated with the VNIC of an instance.
If we try to terminate we will be presented with this warning again.
We click Cancel.
We must remove this association, so we navigate back to our instance with the menu, Compute
and Instances.
We click on the instance name.
Stopping the instance is not sufficient, to remove the association with the subnet, we
must terminate the instance.
We click the More Actions dropdown and select Terminate.
In the confirmation dialog, we click Terminate Instance.
The status of the instance changes to Terminating, and after some minutes Terminated.
The instance has been removed, and so its association with the subnet.
We navigate with the menu, Networking, and Virtual Cloud Networks back to our list of
VCNs.
Clicking on the three dots menu, we select Terminate.
This time we do not get the error message and the dialog creates the component list
of items to be removed.
When the list is complete, we select Terminate All, and are shown the Virtual Cloud Network
Termination is complete.
Oracle provides an extensive number of resources which you can use to learn more about this
subject and others.
Use the links here to find more content about this video, as well as Oracle Linux and using
Linux on Oracle Cloud Infrastructure.
Thats the end of the video.
Thanks for watching.