<s> import azurerm <EOL> import json <EOL> try : <EOL> with open ( '<STR_LIT>' ) as configFile : <EOL> configData = json . load ( configFile ) <EOL> except FileNotFoundError : <EOL> print ( "<STR_LIT>" ) <EOL> sys . exit ( ) <EOL> 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 ( <EOL> tenant_id , <EOL> app_id , <EOL> app_secret <EOL> ) <EOL> resource_groups = azurerm . list_resource_groups ( access_token , subscription_id ) <EOL> for rg in resource_groups [ "<STR_LIT:value>" ] : <EOL> print ( rg [ "<STR_LIT:name>" ] + '<STR_LIT:U+002CU+0020>' + rg [ "<STR_LIT:location>" ] + '<STR_LIT:U+002CU+0020>' + rg [ "<STR_LIT>" ] [ "<STR_LIT>" ] ) </s>
