Skip to content

Commit

Permalink
fix(azure): fix deployments for stacks with kv stores and no buckets (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jyecusch authored Feb 27, 2024
1 parent ae9b0d8 commit d7f3ff0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cloud/azure/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d7f3ff0

Please sign in to comment.