<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> location = '<STR_LIT>' <EOL> access_token = azurerm . get_access_token ( tenant_id , app_id , app_secret ) <EOL> template_uri = '<STR_LIT>' <EOL> raw_params = '<STR_LIT>' <EOL> print ( '<STR_LIT>' ) <EOL> rgname = input ( ) <EOL> rgreturn = azurerm . create_resource_group ( access_token , subscription_id , rgname , location ) <EOL> print ( rgreturn ) <EOL> print ( '<STR_LIT>' ) <EOL> vmss_name = input ( ) <EOL> print ( '<STR_LIT>' ) <EOL> instance_count = input ( ) <EOL> params = raw_params . replace ( '<STR_LIT>' , vmss_name ) <EOL> params = params . replace ( '<STR_LIT>' , instance_count ) <EOL> params = params . replace ( '<STR_LIT>' , location ) <EOL> print ( '<STR_LIT>' ) <EOL> user_name = input ( ) <EOL> params = params . replace ( '<STR_LIT>' , user_name ) <EOL> print ( '<STR_LIT>' ) <EOL> password = input ( ) <EOL> params = params . replace ( '<STR_LIT>' , password ) <EOL> deploy_return = azurerm . deploy_template_uri ( access_token , subscription_id , rgname , '<STR_LIT>' , template_uri , params ) <EOL> print ( deploy_return ) </s>
