Skip to content
Closed
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
7 changes: 5 additions & 2 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ metadata description = '''This module contains the resources required to deploy
@maxLength(16)
param solutionName string = 'macae'

@description('Optional. Deployment timestamp used to generate unique resource names per deployment.')
param deploymentTime string = utcNow()

@maxLength(5)
@description('Optional. A unique text value for the solution. This is used to ensure resource names are unique for global resources. Defaults to a 5-character substring of the unique string generated from the subscription ID, resource group name, and solution name.')
param solutionUniqueText string = take(uniqueString(subscription().id, resourceGroup().name, solutionName), 5)
@description('Optional. A unique text value for the solution. This is used to ensure resource names are unique for global resources. Defaults to a 5-character substring of the unique string generated from the subscription ID, resource group name, solution name, and deployment time.')
param solutionUniqueText string = take(uniqueString(subscription().id, resourceGroup().name, solutionName, deploymentTime), 5)
Comment on lines +15 to +20

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploymentTime defaults to utcNow(), which makes solutionUniqueText (and therefore solutionSuffix) change on every deployment. Because solutionSuffix is used in many resource names throughout this template, redeploying to the same resource group will attempt to create a brand-new set of resources rather than updating the existing ones, potentially causing unexpected duplication and data loss. Consider keeping the current deterministic default and making the timestamp/one-off suffix opt-in (e.g., default deploymentTime to empty and only include it in uniqueString when explicitly provided, or add a separate boolean/seed parameter to control this behavior).

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +20

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description marks this as non-breaking, but changing the default input to solutionUniqueText will change the default names of most deployed resources (since names are derived from solutionSuffix). That is effectively a breaking change for existing environments because subsequent deployments won’t target the previously-created resources. Either update the PR description to call this out, or adjust defaults to preserve existing resource names unless the user explicitly opts into per-deployment uniqueness.

Copilot uses AI. Check for mistakes.

@metadata({ azd: { type: 'location' } })
@description('Required. Azure region for all services. Regions are restricted to guarantee compatibility with paired regions and replica locations for data redundancy and failover scenarios based on articles [Azure regions list](https://learn.microsoft.com/azure/reliability/regions-list) and [Azure Database for MySQL Flexible Server - Azure Regions](https://learn.microsoft.com/azure/mysql/flexible-server/overview#azure-regions).')
Expand Down
Loading