
Delete empty Azure Load Balancers
WORKFLOW
This workflow finds empty Azure load balancers by locating load balancers that have no backend configurations. It then terminates these load balancers.
Integrations used
Source
View on GitHubCode
Relay uses YAML to define the steps in a workflow.
Graph
Each step in the workflow is visualized below.

Prerequisites
Before you run this workflow, you will need the following:
- An Azure Subscription
- An Azure Service Principal with permissions to manage load balancers.
- One or more Azure Load Balancers with zero back end configurations.
Run the workflow
Follow these steps to run the workflow:
1. Add your Azure credentials as a Connection:
- Click Setup
- Find the Connection named
my-azure-account
and click Edit(✎). Use the following values:- KEY:
CLIENT ID
- VALUE: Enter your Azure Client ID associated with the service principal
- KEY:
SECRET
- VALUE: Enter your Azure Secret associated with the service principal
- KEY:
TENANT ID
- VALUE: Enter your Azure Tenant ID associated with the service principal
- KEY:
SUBSCRIPTION ID
- VALUE: Enter your Azure Subscription ID
- KEY:
- Click Save
- Click Run workflow and wait for the workflow run page to appear.
Supply following parameters to the modal:
- KEY:
dryRun
- VALUE: True if you don't want to perform actual WRITE operations
- KEY:
Warning: If you run the workflow with the
dryRun
parameter set tofalse
, resources will be immediately terminated.
Run the workflow on a schedule
Follow these steps to run this workflow on a schedule:
- Un-comment out the Trigger block in the workflow file:
TIP: If you're using the Relay code editor, highlight the
triggers
section and type⌘ + /
(Mac) orCtrl + /
(Windows) to uncomment.
# triggers:
# - name: schedule
# source:
# type: schedule
# schedule: '0 * * * *'
# binding:
# parameters:
# dryRun: true
- Configure the
schedule
trigger:- Supply the run interval in cron format.
- Configure the following parameter bindings:
- Specify whether
dryRun
should be set totrue
orfalse
.
- Specify whether
- Click Save changes