Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(azure): fix deployments for stacks with kv stores and no buckets #591

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading