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) command line interface yet, install and initialize it.
The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID>
command. You can specify a different folder 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 documentation on the Terraform
If you do not have Terraform yet, install it and configure its Yandex Cloud provider.
To delete a service connection created with Terraform:
-
Open the Terraform configuration file and delete the fragment with the
yandex_vpc_private_endpoint
resource description: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, change to the folder where you edited the configuration file.
-
Make sure the configuration file is correct using the command:
terraform validate
If the configuration is correct, the following message is returned:
Success! The configuration is valid.
-
Run the command:
terraform plan
The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.
-
Apply the configuration changes:
terraform apply
-
Confirm the changes: type
yes
in the terminal and press Enter.
You can check 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.