copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2025-02-05 |
vpc |
{{site.data.keyword.attribute-definition-list}}
{: #delete-cluster-network}
You can delete a cluster network interface after all instances attached to it are deleted. {: shortdesc}
{: #delete-cluster-network-prerequisites}
Review Planning considerations and Known issues and limitations.
You can delete a cluster network with the UI, CLI, API, or Terraform.
{: #delete-cluster-network-ui} {: ui}
To delete a cluster network in the {{site.data.keyword.cloud_notm}} console, follow these steps:
-
From your browser, open the {{site.data.keyword.cloud_notm}} console and log in to your account.
-
Select the Navigation Menu
, then click Infrastructure
> Cluster networks.
-
In the Cluster networks for VPC table, locate the cluster network interface that you want to delete, then click Delete in the Actions menu
.
Alternatively, you can Delete a cluster network from the Actions menu on the cluster network's details page.
{: #delete-cluster-network-cli} {: cli}
To delete a cluster network in the CLI, follow these steps:
-
Log in to your account with the CLI. After you enter the password, the system prompts for the account and region that you want to use:
ibmcloud login --sso
{: pre}
-
To delete one or more cluster networks, enter the following command:
ibmcloud is cluster-network-delete (CLUSTER_NETWORK1 CLUSTER_NETWORK2...) [--output JSON] [-f, --force] [-q, --quiet]
{: pre}
Where:
CLUSTER_NETWORK1 CLUSTER_NETWORK2
: IDs or names of the cluster networks, separated by a space.-output
: Specify output format, only JSON is supported. One of:JSON
.-force, -f
: Force the operation without confirmation.-q, --quiet
: Suppress verbose output.
{: #command-examples-cluster-network-delete}
To delete cluster network cli-cn-1
. You are prompted for confirmation. This action cannot be undone.
ibmcloud is cluster-network-delete cli-cn-1
{: codeblock}
{: #delete-cluster-network-api} {: api}
To delete a cluster network with the API, follow these steps:
-
Set up your API environment with the right variables.
-
Store any additional variables to be used in the API commands; for example:
version
(string): The API version, in formatYYYY-MM-DD
. -
When all variables are initiated, run the following command delete the cluster network:
curl -X DELETE "$vpc_api_endpoint/v1/cluster_networks/$cluster_network_id?version=$tomorrow&generation=2&maturity=development" -H "Authorization: Bearer $iam_token"
{: codeblock}
To view the complete set of cluster network APIs, see the VPC API reference.
{: #delete-cluster-network-terraform} {: terraform}
Use the terraform destroy
command to delete a cluster network. The following example deletes ibm_is_cluster_network
.
terraform destroy --target ibm_is_cluster_network
{: codeblock}
You can also delete a resource that was created with a .tf file. For example, if you created a cluster with the following .tf file (terraform apply -auto-approve
), you can delete it using terraform destroy auto-approve
.
// Provision is_cluster_network resource instance
resource "ibm_is_cluster_network" "is_cluster_network_instance" {
name = var.is_cluster_network_name // change to update
profile = "h100"
resource_group = "fee82deba12e4c0fb69c3b09d1f12345"
subnet_prefixes {
cidr = "10.0.0.0/24"
}
vpc = "r006-4727d842-f94f-4a2d-824a-9bc9b02c523b"
zone = "us-south-1"
}
{: codeblock}