We have tried to create an storage account using ARM Template in VS CODE with your configuration as well and works successfully.
Below are the workaround we followed;
However, for 'copy'(to copy the storage account already created) it
simply does not work
It seems you have created one storage account with the same name and trying to create the storage account with the same name again which has been created already.
If that is the case ,Please make sure to Create storage account with globally unique name accordingly to get it work.
template.json
:-
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"storageAccountName": {
"type": "string"
},
"accountType": {
"type": "string"
},
"kind": {
"type": "string"
},
"accessTier": {
"type": "string"
},
"minimumTlsVersion": {
"type": "string"
},
"supportsHttpsTrafficOnly": {
"type": "bool"
},
"publicNetworkAccess": {
"type": "string"
},
"allowBlobPublicAccess": {
"type": "bool"
},
"allowSharedKeyAccess": {
"type": "bool"
},
"allowCrossTenantReplication": {
"type": "bool"
},
"defaultOAuth": {
"type": "bool"
},
"networkAclsBypass": {
"type": "string"
},
"networkAclsDefaultAction": {
"type": "string"
},
"dnsEndpointType": {
"type": "string"
},
"keySource": {
"type": "string"
},
"encryptionEnabled": {
"type": "bool"
},
"keyTypeForTableAndQueueEncryption": {
"type": "string"
},
"infrastructureEncryptionEnabled": {
"type": "bool"
},
"isContainerRestoreEnabled": {
"type": "bool"
},
"isBlobSoftDeleteEnabled": {
"type": "bool"
},
"blobSoftDeleteRetentionDays": {
"type": "int"
},
"isContainerSoftDeleteEnabled": {
"type": "bool"
},
"containerSoftDeleteRetentionDays": {
"type": "int"
},
"changeFeed": {
"type": "bool"
},
"isVersioningEnabled": {
"type": "bool"
},
"isShareSoftDeleteEnabled": {
"type": "bool"
},
"shareSoftDeleteRetentionDays": {
"type": "int"
}
},
"variables": {},
"resources": [
{
"name": "[parameters('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-09-01",
"location": "[parameters('location')]",
"properties": {
"accessTier": "[parameters('accessTier')]",
"minimumTlsVersion": "[parameters('minimumTlsVersion')]",
"supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]",
"publicNetworkAccess": "[parameters('publicNetworkAccess')]",
"allowBlobPublicAccess": "[parameters('allowBlobPublicAccess')]",
"allowSharedKeyAccess": "[parameters('allowSharedKeyAccess')]",
"allowCrossTenantReplication": "[parameters('allowCrossTenantReplication')]",
"defaultToOAuthAuthentication": "[parameters('defaultOAuth')]",
"networkAcls": {
"bypass": "[parameters('networkAclsBypass')]",
"defaultAction": "[parameters('networkAclsDefaultAction')]",
"ipRules": []
},
"dnsEndpointType": "[parameters('dnsEndpointType')]",
"encryption": {
"keySource": "[parameters('keySource')]",
"services": {
"blob": {
"enabled": "[parameters('encryptionEnabled')]"
},
"file": {
"enabled": "[parameters('encryptionEnabled')]"
},
"table": {
"enabled": "[parameters('encryptionEnabled')]"
},
"queue": {
"enabled": "[parameters('encryptionEnabled')]"
}
},
"requireInfrastructureEncryption": "[parameters('infrastructureEncryptionEnabled')]"
}
},
"dependsOn": [],
"sku": {
"name": "[parameters('accountType')]"
},
"kind": "[parameters('kind')]",
"tags": {}
},
{
"name": "[concat(parameters('storageAccountName'), '/default')]",
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2021-09-01",
"properties": {
"restorePolicy": {
"enabled": "[parameters('isContainerRestoreEnabled')]"
},
"deleteRetentionPolicy": {
"enabled": "[parameters('isBlobSoftDeleteEnabled')]",
"days": "[parameters('blobSoftDeleteRetentionDays')]"
},
"containerDeleteRetentionPolicy": {
"enabled": "[parameters('isContainerSoftDeleteEnabled')]",
"days": "[parameters('containerSoftDeleteRetentionDays')]"
},
"changeFeed": {
"enabled": "[parameters('changeFeed')]"
},
"isVersioningEnabled": "[parameters('isVersioningEnabled')]"
},
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]"
]
},
{
"name": "[concat(parameters('storageAccountName'), '/default')]",
"type": "Microsoft.Storage/storageAccounts/fileservices",
"apiVersion": "2021-09-01",
"properties": {
"shareDeleteRetentionPolicy": {
"enabled": "[parameters('isShareSoftDeleteEnabled')]",
"days": "[parameters('shareSoftDeleteRetentionDays')]"
}
},
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]",
"[concat(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '/blobServices/default')]"
]
}
],
"outputs": {}
}
For a Note we have used this api version
for the storage account in resource.
"resources": [
{
"name": "[parameters('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-09-01",
"location": "[parameters('location')]",
Deplyment.parameter.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "eastus"
},
"storageAccountName": {
"value": "something22175"
},
"accountType": {
"value": "Standard_LRS"
},
"kind": {
"value": "StorageV2"
},
"accessTier": {
"value": "Hot"
},
"minimumTlsVersion": {
"value": "TLS1_2"
},
"supportsHttpsTrafficOnly": {
"value": true
},
"publicNetworkAccess": {
"value": "Enabled"
},
"allowBlobPublicAccess": {
"value": true
},
"allowSharedKeyAccess": {
"value": true
},
"allowCrossTenantReplication": {
"value": true
},
"defaultOAuth": {
"value": false
},
"networkAclsBypass": {
"value": "AzureServices"
},
"networkAclsDefaultAction": {
"value": "Allow"
},
"dnsEndpointType": {
"value": "Standard"
},
"keySource": {
"value": "Microsoft.Storage"
},
"encryptionEnabled": {
"value": true
},
"keyTypeForTableAndQueueEncryption": {
"value": "Account"
},
"infrastructureEncryptionEnabled": {
"value": false
},
"isContainerRestoreEnabled": {
"value": false
},
"isBlobSoftDeleteEnabled": {
"value": true
},
"blobSoftDeleteRetentionDays": {
"value": 7
},
"isContainerSoftDeleteEnabled": {
"value": true
},
"containerSoftDeleteRetentionDays": {
"value": 7
},
"changeFeed": {
"value": false
},
"isVersioningEnabled": {
"value": false
},
"isShareSoftDeleteEnabled": {
"value": true
},
"shareSoftDeleteRetentionDays": {
"value": 7
}
}
}
NOTE 1:- Make sure the we have following ARM EXTENSION installed and updated.

OUTPUT DETAILS:-


NOTE 2:- For the intellisense If you are trying to redeploy the same try to refresh the VS CODE and deploy it again,It should work.
For more information please refer the below links:-