-
Notifications
You must be signed in to change notification settings - Fork 51
Account Setup script fails in Cloud Shell #368
Comments
I managed to go a little further by upgrading the dependencies, but it still seems like the [...]
Created Resource Group.
Traceback (most recent call last):
File "account_setup.py", line 501, in <module>
storage_account_id = create_storage_account(creds, subscription_id, **kwargs)
File "account_setup.py", line 99, in create_storage_account
sku=Sku(SkuName.standard_lrs),
TypeError: __init__() takes 1 positional argument but 2 were given with: etiennebr#1 |
I am having the same issue, have you found a solution yet? |
I haven't found a solution, so I created my {
"batchAccount": {
"key": "6GZRr5UKmYdjdLKcju... long key",
"url": "https://my_account.my_location.batch.azure.com",
"name": "batch_account_name"
},
"storageAccount": {
"key": "u/K2LPaiZxnX7SAGJCfq8... long key",
"endpointSuffix": "core.windows.net",
"name": "my_storage_name"
}
} |
Thank you for the response, I guess I will try doing the same. |
If you don't mind having the same string for the resource group, batch account and storage account, here's a little script you can copy the Azure Cloud Shell. Note that the # parameters
$name = "<<replace with valid name>>" # name of the resource group, storage account, and batch account
$location = "westus2"
# create the resources
az group create -l $location -n $name
az storage account create -n $name -l $location -g $name
az batch account create -n $name -l $location -g $name --storage-account $name
# query the keys
$ACCOUNT_ENV_NAME = (az account show --query environmentName) -replace '"',''
$STORAGE_SUFFIX = Get-AzEnvironment | ?{$_.name -eq $ACCOUNT_ENV_NAME} | Select -ExpandProperty "StorageEndpointSuffix"
$BATCH_ACCOUNT_KEY = (az batch account keys list -n $name -g $name --query primary) -replace '"',''
$BATCH_ACCOUNT_ENDPOINT = (az batch account show -n $name -g $name --query accountEndpoint) -replace '"',''
$STORAGE_ACCOUNT_KEY = (az storage account keys list -n $name --query [0].value) -replace '"',''
# generate the output json
@{
"batchAccount"= @{
"key"= $BATCH_ACCOUNT_KEY;
"url"= "https://$BATCH_ACCOUNT_ENDPOINT";
"name"= $NAME;
};
"storageAccount"= @{
"key"= $STORAGE_ACCOUNT_KEY;
"endpointSuffix"= $STORAGE_SUFFIX;
"name"= $NAME;
};
}| ConvertTo-Json
Bonus: this works in your local powershell client if you have the |
Same issue. |
yep, same issue here |
I have an issue when setting up my account on Azure Cloud Shell using the instructions in the README. I have an Azure Batch Service account, I tried restarting the Cloud Shell, but I always get this error
TypeError: signed_session() takes 1 positional argument but 2 were given
.The text was updated successfully, but these errors were encountered: