From d7f3ff01a29e4af1706223be3f3c429852d72001 Mon Sep 17 00:00:00 2001 From: Jye Cusch Date: Tue, 27 Feb 2024 20:01:11 +1100 Subject: [PATCH] fix(azure): fix deployments for stacks with kv stores and no buckets (#591) --- cloud/azure/deploy/deploy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud/azure/deploy/deploy.go b/cloud/azure/deploy/deploy.go index 2ff1e0b40..ec7a146e2 100644 --- a/cloud/azure/deploy/deploy.go +++ b/cloud/azure/deploy/deploy.go @@ -244,11 +244,11 @@ func (a *NitricAzurePulumiProvider) Pre(ctx *pulumi.Context, nitricResources []* } } - // Create a storage account if buckets + // Create a storage account if buckets or key/value stores are required. // Unlike AWS and GCP which have centralized storage management, Azure allows for multiple storage accounts. // This means we need to create a storage account for each stack, before buckets can be created. - if hasResourceType(nitricResources, resourcespb.ResourceType_Bucket) { - logger.Info("Stack declares one or more buckets, creating stack level Azure Storage Account") + if hasResourceType(nitricResources, resourcespb.ResourceType_Bucket) || hasResourceType(nitricResources, resourcespb.ResourceType_KeyValueStore) { + logger.Info("Stack declares bucket(s) or key/value store(s), creating stack level Azure Storage Account") a.storageAccount, err = createStorageAccount(ctx, a.resourceGroup, tags.Tags(a.stackId, ctx.Stack(), commonresources.Stack)) if err != nil { return errors.WithMessage(err, "storage account create")