Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.19 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.19 KB

Pulumi.Azure.Extensions

NuGet codecov

Additional extensions for Microsoft Azure resources with Pulumi Azure.

The following extensions are defined:

Storage

BlobCollection

Type: azure-extensions:storage:BlobCollection

When you want to publish all files from a Blazor WASM website to an Azure Storage Static Website, use the code below:

string sourceFolder = "C:\Users\xxx\Documents\GitHub\BlazorApp\publish\wwwroot";
var blobCollection = new BlobCollection("static-website-files", new BlobCollectionArgs
{
    // Required
    Source = sourcefolder,
    Type = BlobTypes.Block,
    StorageAccountName = storageAccount.Name,
    StorageContainerName = "$web",
    AccessTier = BlobAccessTiers.Hot
});

Notes:

  • empty files are skipped
  • there is no need to specify the ContentType for each file, this is automatically resolved using MimeTypeMap.