Open manikantavasupalli opened 2 years ago
@manikantavasupalli Can you help confirm your subscription ID is available? Thank you very much!
Yes it's available... and as I said above, ansible 1st block was able to create a resource group in the same subscription, and then the 2nd block only getting failed to create a storage account in the resource group
@Fred-sun
We also found the following workaround solution:
This time ansible code block was able to create a resource group and then a storage account inside the resource group.
@manikantavasupalli I'm sorry to reply you so late! I have repeatedly tried to copy your question, but I have not been able to reproduce it. Could you please provide more detailed information? Such as the version you installed, the test environment, and the complete use case! Thank you very much!
@Fred-sun Thanks for spending time on it. Versions have added in the issue description. Use case is to create resource group and then create storage account in it using ansible blocks as shown in the issue description. This pipeline runs on a Jenkin tool where worker node is an ubuntu machine. We are also testing from the same jenkin job.
@manikantavasupalli Can you try updating azcollection by force? Thank you very much!
ansible versions are higher than 2.9
Update command:
ansible-galaxy collection install azure.azcollection --force
Hi, im not sure if you have the same problem like me, but the workaround was the same for me with the portal. I am not sure why this happen to us since some months, because we never had this kind of problem before, but it seems azure changed something.
reproduce steps: new azure subscription and first storage account in that subscription workaround was: create a dummy storage account in portal, after that the automation and ansible module worked fine solution: active azure ressource provider for storage for that subscription (if multiple, use Select-AzSubscription before) Register-AzResourceProvider -ProviderNamespace microsoft.storage
new-AzResourceGroup -Name test -Location germanywestcentral
ResourceGroupName : test Location : germanywestcentral ProvisioningState : Succeeded Tags : ResourceId : /subscriptions/xxxxxxxxxx/resourceGroups/test
New-AzStorageAccount -ResourceGroupName test -Name st32312631 -Location germanywestcentral -SkuName Standard_LRS New-AzStorageAccount: Subscription xxxxxxxxxxxxx was not found.
Register-AzResourceProvider -ProviderNamespace microsoft.storage
ProviderNamespace : Microsoft.Storage RegistrationState : Registering ResourceTypes : {storageAccounts/storageTaskAssignments, storageAccounts/encryptionScopes, deletedAccounts, locations/deletedAccounts…} Locations : {East US, East US 2, West US, West Europe…}
New-AzStorageAccount -ResourceGroupName test -Name st32312631 -Location germanywestcentral -SkuName Standard_LRS
StorageAccountName ResourceGroupName PrimaryLocation SkuName Kind AccessTier CreationTime
st32312631 test germanywestcentral Standard_LRS StorageV2 Hot Succeeded True
Maybe it helps you or others.
I'm sorry, but I still can't repeat your question. Thank you!
@manikantavasupalli Will there be another case where your subscription is restricted by the policy and you cannot create a subscription account, thank you!
ISSUE TYPE
COMPONENT NAME
SUMMARY
We are trying to create an azure resource_group followed by the creation of a storage account within that resource group using the block as shown below. Block1 is able to create the resource group and block2 is failing to create the storage account. This part is working for more than a year now and we started getting this issue in the past week only.
ENVIRONMENT
Ansible install method: Ansible has been installed using pip module
Ansible Versions:
MarkupSafe-2.1.1 PyJWT-2.6.0 PySocks-1.7.1 PyYAML-6.0 adal-1.2.7 ansible-4.0.0 ansible-core-2.11.1 applicationinsights-0.11.10 argcomplete-1.12.3 azure-cli-core-2.35.0 azure-cli-telemetry-1.0.6 azure-common-1.1.11 azure-core-1.26.0 azure-graphrbac-0.61.1 azure-identity-1.7.0 azure-keyvault-1.0.0a1 azure-mgmt-apimanagement-0.2.0 azure-mgmt-authorization-0.51.1 azure-mgmt-automation-1.0.0 azure-mgmt-batch-5.0.1 azure-mgmt-cdn-3.0.0 azure-mgmt-compute-26.1.0 azure-mgmt-containerinstance-1.4.0 azure-mgmt-containerregistry-2.0.0 azure-mgmt-containerservice-9.1.0 azure-mgmt-core-1.3.2 azure-mgmt-cosmosdb-0.15.0 azure-mgmt-datafactory-2.0.0 azure-mgmt-datalake-nspkg-2.0.0 azure-mgmt-datalake-store-0.5.0 azure-mgmt-devtestlabs-3.0.0 azure-mgmt-dns-2.1.0 azure-mgmt-eventhub-2.0.0 azure-mgmt-hdinsight-0.1.0 azure-mgmt-iothub-0.7.0 azure-mgmt-keyvault-1.1.0 azure-mgmt-loganalytics-1.0.0 azure-mgmt-managedservices-1.0.0 azure-mgmt-managementgroups-0.2.0 azure-mgmt-marketplaceordering-0.1.0 azure-mgmt-monitor-3.0.0 azure-mgmt-network-19.1.0 azure-mgmt-notificationhubs-2.0.0 azure-mgmt-nspkg-2.0.0 azure-mgmt-privatedns-0.1.0 azure-mgmt-rdbms-1.9.0 azure-mgmt-recoveryservices-0.4.0 azure-mgmt-recoveryservicesbackup-0.6.0 azure-mgmt-redis-13.0.0 azure-mgmt-resource-10.2.0 azure-mgmt-search-3.0.0 azure-mgmt-servicebus-0.5.3 azure-mgmt-sql-3.0.1 azure-mgmt-storage-19.0.0 azure-mgmt-trafficmanager-0.50.0 azure-mgmt-web-0.41.0 azure-nspkg-2.0.0 azure-storage-0.35.1 bcrypt-4.0.1 certifi-2022.9.24 cffi-1.15.1 charset-normalizer-2.1.1 cryptography-38.0.1 humanfriendly-10.0 idna-3.4 importlib-metadata-4.13.0 isodate-0.6.1 jinja2-3.1.2 jmespath-1.0.1 knack-0.9.0 msal-1.20.0 msal-extensions-0.3.1 msrest-0.6.21 msrestazure-0.6.4 oauthlib-3.2.2 packaging-21.3 paramiko-2.11.0 pkginfo-1.8.3 portalocker-1.7.1 psutil-5.9.3 pycparser-2.21 pygments-2.13.0 pynacl-1.5.0 pyopenssl-22.1.0 pyparsing-3.0.9 python-dateutil-2.8.2 requests-2.28.1 requests-oauthlib-1.3.1 resolvelib-0.5.4 six-1.16.0 tabulate-0.9.0 typing-extensions-4.4.0 urllib3-1.26.12 xmltodict-0.13.0 zipp-3.10.0
Ansible deployment target: AzureCloud
Operating System: Ubuntu: it's a Jenkin node(container)
STEPS TO REPRODUCE
Just execute the ansible playbook with tags
EXPECTED RESULTS
Resource group and storage account has to be created without fail...
ADDITIONAL INFORMATION
It used to been working in condition for the past 1 and half years and the issue was found in the last 10 days only and there is no recent change in the ansible code block.