Deleting an MFA policy
To delete an MFA policy:
- Log in to Yandex Identity Hub
. - In the left-hand panel, select
Security settings. - Navigate to the MFA policies tab.
- In the MFA policy list, click
in the policy row and select Delete. - In the window that opens, confirm the operation.
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 options.
-
View the MFA policy list using this command:
yc organization-manager mfa-enforcement list \ --organization-id <organization_ID>Where
organization_idis the organization ID. -
See the description of the CLI command for deleting an MFA policy:
yc organization-manager mfa-enforcement delete --help -
To delete an MFA policy, run this command:
yc organization-manager mfa-enforcement delete \ --id <policy_ID>Where
--idis the ID of the MFA policy you need to delete.
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 delete the fragment with the MFA policy description:
resource "yandex_organizationmanager_mfa_enforcement" "example_mfa_policy" { name = "<policy_name>" organization_id = "<organization_ID>" acr_id = "<authentication_factor_type>" ttl = "<lifetime>" status = "<policy_status>" apply_at = "<activation_time>" enroll_window = "<creation_deadline>" description = "<policy_description>" }For more information about
yandex_organizationmanager_mfa_enforcementproperties, see this provider guide. -
Apply the changes:
-
In the terminal, go to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is correct, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou 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
yesand press Enter to confirm the changes.
Terraform will delete the MFA policy. You can check the deletion of the MFA policy using the Cloud Center UI
or the CLI command:yc organization-manager mfa-enforcement list --organization-id <organization_ID> -
Use the Delete REST API method for the MfaEnforcement resource or the MfaEnforcementService/Delete gRPC API call.