Additional extensions for Microsoft Azure resources with Pulumi Azure.
The following extensions are defined:
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.