Editing a Let's Encrypt certificate
After issuing a Let's Encrypt certificate and adding it to Certificate Manager, you can change its name or description. To edit a certificate:
- In the management console
, select the folder you added the certificate to. - Navigate to Certificate Manager.
- Select the certificate you need to edit.
- Click
Edit. - Change the name or description of the certificate.
- Click Save.
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 specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
View the command description:
yc certificate-manager certificate update --help -
View the list of certificates:
yc certificate-manager certificate listResult:
+----------------------+---------------+-------------+-----------+---------+------------+ | ID | NAME | DOMAINS | NOT AFTER | TYPE | STATUS | +----------------------+---------------+-------------+-----------+---------+------------+ | fpq6gvvm6piu******** | mymanagedcert | example.com | | MANAGED | VALIDATING | +----------------------+---------------+-------------+-----------+---------+------------+ -
Run this command:
yc certificate-manager certificates update \ --id fpq6gvvm6piu******** \ --new-name myupdatedmanagedcert \ --description "description of myupdatedmanagedcert"Where:
--id: Certificate ID.--new-name: New name for the certificate.--description: Certificate description.
Result:
id: fpq6gvvm6piu******** folder_id: b1g7gvsi89m3******** created_at: "2020-09-15T08:49:11.533Z" ... - example.com status: VALIDATING updated_at: "2020-09-15T09:10:06.981875Z"
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.
-
Open the Terraform configuration file and edit the fragment describing the certificate:
Certificate description example
... 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, 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 edited certificate and its settings using the management console
yc certificate-manager certificate get <certificate_name>
To edit a certificate, use the update REST API method for the Certificate resource or the CertificateService/Update gRPC API call.