
Delete unused Azure network interfaces
WORKFLOW
This workflow finds unused Azure network interfaces by locating all network interfaces that are not attached to a virtual machine. It then terminates these network interfaces.
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 Network Interfaces.
- One or more unused Azure Network Interfaces (NIC).
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
, unused Network Interfaces will immediately be 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