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 yet, install and initialize it.
The folder used by default is the one specified when creating the CLI 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 options.
-
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 listResult:
+----------------------+-------------+--------------------------------+ | ID | NAME | DESCRIPTION | +----------------------+-------------+--------------------------------+ | enpd7rq************* | s3-vpc-link | Private Endpoint to the Object | | | | Storage | +----------------------+-------------+--------------------------------+ -
Select the
IDorNAMEof 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_endpointresource: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, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand 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.