Skip to content

This repository contains extensions to Pulumi Azure (e.g. BlobCollection)

License

Notifications You must be signed in to change notification settings

StefH/Pulumi.Azure.Extensions

Repository files navigation

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.

About

This repository contains extensions to Pulumi Azure (e.g. BlobCollection)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages