Created
October 20, 2022 08:33
-
-
Save Panzerbjrn/882fd80538b592f21024be7bd0d157e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@description('The Azure region into which the resources should be deployed.') | |
param location string = resourceGroup().location | |
param CustomerID string | |
@description('The type of environment.') | |
@allowed([ | |
'Trial' | |
'Small' | |
'Medium' | |
'Large' | |
]) | |
param environmentType string | |
@description('A unique suffix to add to resource names that need to be globally unique.') | |
@maxLength(14) | |
param resourceNameSuffix string = uniqueString(resourceGroup().id) | |
var StorageAccountName = 'sa${CustomerID}${resourceNameSuffix}' | |
var containerName = 'cont${CustomerID}' | |
// Define the SKUs for each component based on the environment type. | |
var environmentConfigurationMap = { | |
Trial: { | |
StorageAccount: { | |
sku: { | |
name: 'Standard_LRS' | |
} | |
} | |
} | |
Small: { | |
StorageAccount: { | |
sku: { | |
name: 'Standard_LRS' | |
} | |
} | |
} | |
Medium: { | |
StorageAccount: { | |
sku: { | |
name: 'Standard_ZRS' | |
} | |
} | |
} | |
Large: { | |
StorageAccount: { | |
sku: { | |
name: 'Standard_ZRS' | |
} | |
} | |
} | |
} | |
resource StorageAccount 'Microsoft.Storage/storageAccounts@2021-02-01' = { | |
name: StorageAccountName | |
location: location | |
kind: 'StorageV2' | |
sku: environmentConfigurationMap[environmentType].StorageAccount.sku | |
} | |
resource container 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-06-01' = { | |
name: '${StorageAccount.name}/default/${containerName}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment