Triage and Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” for GCP using GCP console, please follow the below steps:
- Open the GCP console and navigate to the Cloud CDN page.
- Select the CDN endpoint you want to remediate.
- Click on the “Edit” button at the top of the page.
- Scroll down to the “Backend services” section and click on the “Edit” button next to it.
- Click on the “Advanced” tab.
- Under “Failover policy”, select the “Enabled” option.
- Click on the “Save” button to save the changes.
Using CLI
Using CLI
To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” for GCP using GCP CLI, follow the below steps:
- Open the GCP Cloud Shell in the GCP Console.
-
Run the following command to enable the failover policy for the regional backend services in Cloud CDN:
Replace
[BACKEND_SERVICE_NAME]
with the name of the backend service that you want to update. -
Verify that the failover policy has been enabled by running the following command:
This command should output the failover policy for the backend service. Note: If the output shows that the failover policy is not enabled, you may need to wait a few minutes for the changes to propagate.
-
Repeat steps 2 and 3 for all the regional backend services in Cloud CDN.
Note: You can list all the regional backend services in Cloud CDN by running the following command:
This command lists all the regional backend services that are used by Cloud CDN. Replace
cdn-backend
with the name of the backend service that you want to filter.
Using Python
Using Python
To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” in GCP using Python, follow these steps:
- Import the necessary libraries:
- Set up credentials:
- Create a client object for the Cloud CDN API:
- Get the list of existing backend services:
- For each backend service, check if the failover policy is enabled. If not, enable it:
- Verify that the failover policy has been enabled for all backend services.