Coder Social home page Coder Social logo

azure-cli-extension-noelbundick's Introduction

Noel's grab bag of Azure CLI goodies

This repo contains things that I like or find useful, offered up with absolutely zero guarantee that it will work for anyone else

Azure Active Directory

  • az ad app list-mine: List only the applications you own
  • az ad sp create-for-ralph: Create a service principal and store the password in Key Vault (thread)
  • az ad sp list-mine: List only the service principals you own. Optionally filter by expiration

Log Analytics

  • az loganalytics workspace create
  • az loganalytics workspace delete
  • az loganalytics workspace show
  • az loganalytics workspace update
  • az loganalytics workspace keys list

Self-Destruct Mode

Set an expiration time when creating a resource or resource group, and a Logic App will automatically delete it when the time's up.

  • az * create --self-destruct: Global argument that enables automatic deletion. You can specify self-destruct dates like 1d, 6h, 2h30m, 30m, etc
  • az self-destruct arm: Enable automatic deletion on a resource that already exists
  • az self-destruct configure: One-time configuration
  • az self-destruct disarm: Disable automatic deletion for a resource
  • az self-destruct list: List items that are scheduled for deletion

Works on management-plane resources only (resource groups, storage accounts, VMs). Guaranteed to be broken for data-plane operations like blobs

Usage

az self-destruct configure
az group create -n myRG -l eastus --self-destruct 1h

Virtual Machines

  • az vm auto-shutdown enable
  • az vm auto-shutdown disable
  • az vm auto-shutdown show

Development

Use the scripts/hack.sh script

source scripts/hack.sh

or, do it the long way with your directories

export AZURE_EXTENSION_DIR=~/.azure/devcliextensions
pip install --upgrade --target ~/.azure/devcliextensions/noelbundick ~/code/noelbundick/azure-cli-extension-noelbundick/src/noelbundick

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.