Deleting a service connection
Warning
The VPC Private Endpoints feature is at the Preview stage. To request access to the feature, contact your account manager.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID>
command. You can also set a different folder for any specific command using the --folder-name
or --folder-id
parameter.
-
View the description of the CLI command for deleting a service connection (private endpoint):
yc vpc private-endpoint delete --help
-
Get a list of all service connections:
yc vpc private-endpoint list
Result:
+----------------------+-------------+--------------------------------+ | ID | NAME | DESCRIPTION | +----------------------+-------------+--------------------------------+ | enpd7rq************* | s3-vpc-link | Private Endpoint to the Object | | | | Storage | +----------------------+-------------+--------------------------------+
-
Select the
ID
orNAME
of the service connection. -
Delete the service connection:
yc vpc private-endpoint delete <connection_ID>
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To delete a service connection created with Terraform:
-
Open the Terraform configuration file and delete the section describing the
yandex_vpc_private_endpoint
resource:resource "yandex_vpc_private_endpoint" "vpc-endpoint" { name = "<service_connection_name>" description = "<service_connection_description>" network_id = "<cloud_network_ID>" # Service connection to Object Storage object_storage {} # Creating additional DNS resource records dns_options { private_dns_records_enabled = <true_or_false> } endpoint_address { subnet_id = "<subnet_ID>" } }
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validate
If the configuration is correct, you will get this message:
Success! The configuration is valid.
-
Run this command:
terraform plan
You will see a detailed list of resources. No changes will be made at this step. If the configuration contains any errors, Terraform will show them.
-
Apply the changes:
terraform apply
-
Type
yes
and press Enter to confirm the changes.
You can check the updates in the management console
yc vpc private-endpoint list
To delete a service connection, use the delete REST API method for the PrivateEndpoint resource or the PrivateEndpointService/Delete gRPC API call.