@soderlind: I need a bash script that read a list of domains from disk and use az cli to remove the domains from azure front door. I have several azure front doors in the resource group.
GitHub Copilot: Here's a step-by-step plan for the bash script:
- Define the script shebang to specify that the script should be run using bash.
- Read the file line by line using a while loop.
- Inside the loop, use the
az network front-door frontend-endpoint delete
command to delete the domain from each Azure Front Door in the resource group.
- The command requires the names of the resource group, the Front Door, and the endpoint (domain). You'll need to loop over each Front Door in the resource group.
- To get the list of Front Doors, use the
az network front-door list
command with the resource group name.
- Parse the output of the list command to extract the names of the Front Doors.