3

I'm using Azure Management Fluent library to create storage account. Something like that:

var storageAccount = await azure.StorageAccounts.Define(accountName)
           .WithRegion(azureDefaults.Location)
           .WithExistingResourceGroup(azureDefaults.StorageResourceGroup)
           .WithGeneralPurposeAccountKindV2()
           .WithOnlyHttpsTraffic()
           .WithBlobEncryption()
           .CreateAsync();

However I also need to specify CORS settings. How can I do this with Fluent configuration?

I know there is a way to do this in old-style library, but I'd like to avoid using 2 libraries for creating a single storage account.

trailmax
  • 34,305
  • 22
  • 140
  • 234

1 Answers1

0

I haven't tried this myself, but there is a library for CorsSettings Class, it's under the Microsoft.Azure.Management.AppService.Fluent.Models Namespace. This could be used after you define your storage account, more about it can be found here