Forge Home

azure_delete_empty_loadbalancers

This workflow finds empty Azure load balancers by locating load balancers that have no backend configurations. It then terminates these load balancers.

1,287 downloads

973 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.6 (latest)
  • 0.0.5
  • 0.0.4
  • 0.0.3 (deleted)
  • 0.0.2 (deleted)
  • 0.0.1 (deleted)
released Jun 15th 2021

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'binford2k-azure_delete_empty_loadbalancers', '0.0.6'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add binford2k-azure_delete_empty_loadbalancers
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install binford2k-azure_delete_empty_loadbalancers --version 0.0.6

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

binford2k/azure_delete_empty_loadbalancers — version 0.0.6 Jun 15th 2021

This workflow finds empty Azure load balancers by locating load balancers that have no backend configurations. It then terminates these load balancers.

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

Try this 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
    • Click Save
  2. Click Run workflow and wait for the workflow run page to appear.

  3. Supply following parameters to the modal:

    • KEY: dryRun
    • VALUE: True if you don't want to perform actual WRITE operations
  4. Warning: If you run the workflow with the dryRun parameter set to false, 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) or Ctrl + / (Windows) to uncomment.

# triggers:
# - name: schedule
#   source:
#     type: schedule
#     schedule: '0 * * * *'
#   binding:
#     parameters:
#       dryRun: true
  • Configure the schedule trigger:
  • Configure the following parameter bindings:
    • Specify whether dryRun should be set to true or false.
  • Click Save changes