def main():
<EOL>if len(sys.argv) != <NUM_LIT:2>:<EOL><INDENT>sys.exit('<STR_LIT>' + sys.argv[<NUM_LIT:0>] + '<STR_LIT>')<EOL><DEDENT>rgname = sys.argv[<NUM_LIT:1>]<EOL>if '<STR_LIT>' in os.environ and '<STR_LIT>' in os.environ:<EOL><INDENT>access_token = azurerm.get_access_token_from_cli()<EOL>subscription_id = azurerm.get_subscription_from_cli()<EOL><DEDENT>else: <EOL><INDENT>try:<EOL><INDENT>with open('<STR_LIT>') as configfile:<EOL><INDENT>configdata = json.load(configfile)<EOL><DEDENT><DEDENT>except FileNotFoundError:<EOL><INDENT>sys.exit('<STR_LIT>')<EOL><DEDENT>tenant_id = configdata['<STR_LIT>']<EOL>app_id = configdata['<STR_LIT>']<EOL>app_secret = configdata['<STR_LIT>']<EOL>subscription_id = configdata['<STR_LIT>']<EOL>access_token = azurerm.get_access_token(tenant_id, app_id, app_secret)<EOL><DEDENT>rgreturn = azurerm.delete_resource_group(access_token, subscription_id, rgname)<EOL>print(rgreturn)<EOL>
Main routine.