More Info:

Ensure that your Microsoft Azure virtual machine scale sets are configured to receive instance termination notifications through the Azure Metadata service and have a predefined delay timeout configured for the “Terminate” operation (event). The termination notifications are delivered through Scheduled Events, an Azure Metadata feature which sends termination notifications, and can also be used to delay impactful operations such as reboots and redeployments. The delay associated with the “Terminate” event will depend on the delay limit specified in the VM scale set model configuration.

Risk Level

Medium

Address

Security

Compliance Standards

CBP

Triage and Remediation

Remediation

Sure, Here are the step by step instructions to remediate the misconfiguration “Enable Instance Termination Notifications For Virtual Machine Scale Sets” in AZURE using the AZURE console:

  1. Open the AZURE portal and log in to your account.
  2. Navigate to the Virtual Machine Scale Sets blade.
  3. Select the Virtual Machine Scale Set for which you want to enable the instance termination notifications.
  4. In the Virtual Machine Scale Set blade, click on the “Auto Scale” option from the left-hand side menu.
  5. In the “Auto Scale” blade, click on the “Notifications” tab.
  6. In the “Notifications” tab, click on the “Add notification” button.
  7. In the “Add notification” blade, select “Email” as the notification type.
  8. Enter the email address of the recipient(s) who will receive the notification in the “Email addresses” field.
  9. In the “Email subject” field, enter a subject line for the notification email.
  10. In the “Email body” field, enter the message you want to include in the notification email.
  11. Click on the “OK” button to save the notification settings.

That’s it! You have now enabled the instance termination notifications for your Virtual Machine Scale Set in AZURE. Whenever an instance is terminated, the configured recipient(s) will receive an email notification.