Deleting a Let's Encrypt certificate
To delete a Let's Encrypt certificate:
- In the management console
, select the folder the certificate was added to. - In the list of services, select Certificate Manager.
- Find the certificate to be deleted in the list.
- Click
- In the menu that opens, click Delete.
- In the window that opens, click Delete.
If you don't have the Nebius Israel command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the command:
yc certificate-manager certificates delete --help
-
View the list of certificates:
yc certificate-manager certificate list
Command result:
+----------------------+----------------------+-------------+-----------+---------+------------+ | ID | NAME | DOMAINS | NOT AFTER | TYPE | STATUS | +----------------------+----------------------+-------------+-----------+---------+------------+ | fpq6gvvm6piu******** | myupdatedmanagedcert | example.com | | MANAGED | VALIDATING | +----------------------+----------------------+-------------+-----------+---------+------------+
-
Run this command:
yc certificate-manager certificates delete \ --id fpq6gvvm6piu********
Where
--id
: Certificate ID.Command result:
id: fpq6gvvm6piu******** folder_id: b1g7gvsi89m34qmcm3ke created_at: "2020-09-15T08:49:11.533Z" ... - example.com status: VALIDATING updated_at: "2020-09-15T09:10:06.981Z"
If you do not have Terraform yet, install it and configure the Nebius Israel provider.
For more information about Terraform, see the documentation.
-
Open the Terraform configuration file and delete the fragment with the certificate description:
Sample certificate description... resource "yandex_cm_certificate" "le-certificate" { name = "managed-certificate-for-dns" description = "this is a certificate for tls" domains = ["my-domain.ru"] managed { challenge_type = "DNS_CNAME" } } ...
-
Apply the changes:
-
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 if the certificate has been deleted either from the management console
yc certificate-manager certificate list
To delete a certificate, use the delete REST API method for the Certificate resource or the CertificateService/Delete gRPC API call.