Skip to content

CatalystCode/self-destroy-instance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Self destroy instance

Self destroy linux instance in Azure Virtual Machine Scale Sets

Prerequisites

To use this script, first you need to create an Azure Service Principal through Azure CLI or Azure portal.

How to use

Define the following environment variables

Using Docker

Inside the Dockerfile or use the -e option

TENANT_ID = {Directory Id}
CLIENT_ID = {Serivce Principal Id}
CLIENT_SECRET = {Service Principal Secret}
SUBSCRIPTION_ID = {Subscripton Id}
RESOURCE_GROUP = {Resource group name} // Until it will be included in the VM Instance metadata

Using as a simple script inside the os

export TENANT_ID = {Directory Id}
export CLIENT_ID = {Serivce Principal Id}
export CLIENT_SECRET = {Service Principal Secret}
export SUBSCRIPTION_ID = {Subscripton Id}
export RESOURCE_GROUP = {Resource group name} // Until it will be included in the VM Instance metadata

About

Self destroy instance in Azure Virtual Machine Scale Sets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages