Skip to content

Commit

Permalink
uniquestring added
Browse files Browse the repository at this point in the history
  • Loading branch information
ldraney committed Dec 24, 2024
1 parent 494bda5 commit a7b5b14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
resource_group_name:
description: 'The name of the resource group to deploy to'
required: true
storage_account_name:
description: 'The name of the storage account to create'
base_name:
description: 'Base name for the storage account (will have a unique suffix)'
required: true
location:
description: 'The Azure location for the storage account'
Expand All @@ -32,6 +32,6 @@ jobs:
az deployment group create \
--resource-group ${{ github.event.inputs.resource_group_name }} \
--template-file modules/storage-account/main.bicep \
--parameters storageAccountName=${{ github.event.inputs.storage_account_name }} \
location=${{ github.event.inputs.location }}
--parameters baseName=${{ github.event.inputs.base_name }} \
location=${{ github.event.inputs.location }}
4 changes: 3 additions & 1 deletion modules/storage-account/main.bicep
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
param storageAccountName string
param baseName string
param location string = resourceGroup().location
param skuName string = 'Standard_LRS'
param kind string = 'StorageV2'

var storageAccountName = toLower('${baseName}${uniqueString(resourceGroup().id)}')

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
name: storageAccountName
location: location
Expand Down

0 comments on commit a7b5b14

Please sign in to comment.