Skip to content

Commit

Permalink
Add possibility to specify CORS rules for file services.
Browse files Browse the repository at this point in the history
Implementation of the feature is aligned with how CORS rules configuration
has been implemented for the BLOB service.

Closes Azure#3861
  • Loading branch information
headcr4sh committed Nov 29, 2024
1 parent 426a9ba commit 4e06944
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions avm/res/storage/storage-account/file-service/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ param shareDeleteRetentionPolicy object = {
days: 7
}

@description('Optional. Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.')
param corsRules array = []

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?
Expand All @@ -35,6 +38,9 @@ resource fileServices 'Microsoft.Storage/storageAccounts/fileServices@2023-04-01
name: name
parent: storageAccount
properties: {
cors: {
corsRules: corsRules
}
protocolSettings: protocolSettings
shareDeleteRetentionPolicy: shareDeleteRetentionPolicy
}
Expand Down
2 changes: 1 addition & 1 deletion avm/res/storage/storage-account/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.14",
"version": "0.15",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit 4e06944

Please sign in to comment.