Deleting a VPC
You can delete an empty Virtual Private Cloud (VPC) that you no longer need. With Cockpit, you can choose to delete the VPC only, or to delete it and all its associated resources at the same time.
Deleting a VPC Using Cockpit v1
Deleting a VPC Only
Before you begin: Delete or detach all resources associated with the VPC:
|
-
Click VPC > VPCs.
-
Click the VPC you want to delete.
The VPC is selected. -
Click Delete .
A confirmation dialog box appears. -
Click Delete to validate.
The VPC is deleted.
Deleting a VPC and its Associated Resources
-
Click VPC > VPCs.
-
Click the VPC you want to delete.
The VPC is selected. -
Click Teardown .
A confirmation dialog box appears. -
Click Teardown to validate.
The External IPs (EIPs) and DHCP options set associated with resources in the VPC are disassociated.
The following resources are deleted with the VPC:-
Instances
This action automatically deletes BSU volumes with the
DeleteOnTermination
attribute set totrue
that are attached to the instances.To prevent data loss, you can:
- Create backups of the volumes using snapshots. For more information, see Creating a Snapshot of a Volume.
- Set theDeleteOnTermination
attribute tofalse
for each volume to prevent its deletion. For more information, see Modifying an Instance Attribute. -
Internet gateways, virtual private gateways, and NAT gateways
-
Custom route tables and their routes
-
Flexible network interfaces (FNIs)
-
Load balancers
-
Security groups
-
Subnets
-
VPC peering connections
Routes in the route tables of the peered VPC are not deleted.
A summary of the deleted resources and their IDs appears.
-
Deleting a Net Using Cockpit v2-beta
Deleting a Net Only
Before you begin: Delete or unlink all resources associated with the Net:
|
-
Click inside the Nets dashboard to make checkboxes appear.
-
Check the box of the Net you want to delete.
The Net is selected and an action menu appears.You can delete multiple Nets by selecting several at a time.
-
Click
Delete.
A confirmation dialog box appears. -
Click Delete Net to validate.
The DHCP options set associated with the Net is disassociated and the Net is deleted.
Deleting a Net and its Associated Resources
-
Click inside the Nets dashboard to make checkboxes appear.
-
Check the box of the Net you want to tear down.
The Net is selected and an action menu appears. -
Click
Tear Down Net.
A confirmation dialog box appears. -
In the confirmation dialog box, type "DELETE" in the text field and click Tear Down Net to validate.
The DHCP options set associated with the Net is disassociated.
The following resources are deleted with the Net:-
Virtual machines (VMs)
This action automatically deletes BSU volumes with the
DeleteOnVmDeletion
attribute set totrue
that are attached to the virtual machines.To prevent data loss, you can:
- Create backups of the volumes using snapshots. For more information, see Creating a Snapshot of a Volume.
- Set theDeleteOnVmDeletion
attribute tofalse
for each volume to prevent its deletion. For more information, see Modifying an Instance Attribute. -
Internet services, virtual gateways, and NAT services
-
Custom route tables and their routes
-
Network interface cards (NICs)
-
Load balancers
-
Security groups
-
Subnets
-
Net peerings
-
Net access points
-
VPN connections
-
Public IPs
A summary of the deleted resources and their IDs appears.
-
Deleting a Net Using OSC CLI
Before you begin: Delete or detach all resources associated with the Net:
|
See the DeleteNet command sample in the documentation of the OUTSCALE API. |
Deleting a VPC Using AWS CLI
Before you begin: Delete or detach all resources associated with the VPC:
|
To delete a VPC, use the delete-vpc command following this syntax:
$ aws ec2 delete-vpc \
--profile YOUR_PROFILE \
--vpc-id vpc-12345678 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
vpc-id
: The ID of the VPC. -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The specified VPC is deleted.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.