Fix azure_rm_virtualmachine (#4174).
This commit is contained in:
parent
c91de38322
commit
57921c0b4d
1 changed files with 2 additions and 1 deletions
|
@ -1142,9 +1142,10 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
valid_name = False
|
||||
|
||||
# Attempt to find a valid storage account name
|
||||
storage_account_name_base = self.name[:20].lower()
|
||||
for i in range(0, 5):
|
||||
rand = random.randrange(1000, 9999)
|
||||
storage_account_name = self.name[:20] + str(rand)
|
||||
storage_account_name = storage_account_name_base + str(rand)
|
||||
if self.check_storage_account_name(storage_account_name):
|
||||
valid_name = True
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue