itye1970
itye1970

Reputation: 1995

Automatically create a storage account but an encrypted one?

When i deploy an ARM template via visual studio for artifact storage account drop down option there is the option to However we have a policy in place which disallows creating non encrypted storage accounts, is there a way I can automatically create encrypted storage accounts instead and be able to select it via the drop down menu in visual studio?

Upvotes: 0

Views: 42

Answers (1)

itye1970
itye1970

Reputation: 1995

i worked it out. go to Deploy-AzureResourceGroup.ps1 and add this line replacing the one that is already there , approx line 100. Now when you deploy using visual studio you can select automatically create a storage account and it will be encrypted!

NEW line

$StorageAccount = New-AzureRmStorageAccount -StorageAccountName $StorageAccountName -Type 'Standard_LRS'-EnableEncryptionService "Blob,File" -AssignIdentity -ResourceGroupName $StorageResourceGroupName -Location "$ResourceGroupLocation"

Original line

$StorageAccount = New-AzureRmStorageAccount -StorageAccountName $StorageAccountName -Type 'Standard_LRS' -ResourceGroupName $StorageResourceGroupName -Location "$ResourceGroupLocation"

Upvotes: 1

Related Questions