Deployment Modes

When deploying Bicep templates through Bluebricks, you can choose between two deployment modes: Complete and Incremental. Each mode has different behavior for resource lifecycle management.

Complete Mode (Default)

How it works

  • Creates or updates resources defined in the template

  • Deletes any resources in the resource group that are not in the template

  • Provides full lifecycle management (create, update, destroy)

When to use Complete Mode

Standard Bluebricks deployments:

  • Bluebricks auto-generates a unique resource group per deployment (e.g., rg-myapp-a1b2c)

  • The blueprint owns the entire resource group

  • Safe cleanup on destroy operations

  • Full control over all resources in the scope

Benefits:

  • Clean destroy behavior removes all resources when blueprint is uninstalled

  • Prevents orphaned resources

  • Simplifies cost management

Example Configuration

Bluebricks creates a dedicated resource group, deploys resources, and can safely clean up everything on uninstall.

Incremental Mode

How it works

  • Creates or updates resources defined in the template

  • Never deletes resources (even if removed from template)

  • Resources remain in Azure when removed from Bicep template

  • Requires manual cleanup for decommissioned resources

When to use Incremental Mode

Shared resource group scenarios:

  • Multiple teams or blueprints deploy to the same resource group

  • Need to preserve existing resources not managed by this blueprint

  • Adding resources to existing infrastructure

User-provided resource groups:

  • User specifies an existing resource group name

  • Resource group contains resources from other sources

  • Cannot take full ownership of the resource group

Example Configuration

Deploys to existing resource group without affecting other resources. Manual cleanup required on uninstall.

Decision Matrix

Choose the right deployment mode based on your scenario:

Scenario
Mode
Resource Group Strategy

Standard Bluebricks deployment

Complete

Auto-generated

User-provided shared RG

Incremental

User-provided

User-provided RG (sole owner)

Complete

User-provided (use with caution)

Multiple teams, same RG

Incremental

User-provided

Resource Group Management

Complete Mode with Auto-Generated Resource Groups

Configuration:

  • Do not provide a resourceGroup parameter

  • Bluebricks generates unique RG name based on deployment

  • Full lifecycle management enabled

Workflow:

  1. User deploys blueprint

  2. Bluebricks creates rg-<blueprint>-<hash>

  3. Resources deployed to dedicated RG

  4. On uninstall: All resources cleaned up automatically

Incremental Mode with User-Provided Resource Groups

Configuration:

  • Provide resourceGroup parameter as required property

  • User specifies existing RG name during deployment

  • Manual cleanup process required

Workflow:

  1. User deploys blueprint and specifies existing RG

  2. Resources added to specified RG

  3. Other resources in RG remain untouched

  4. On uninstall: Resources remain, manual cleanup needed

Important Considerations

Complete Mode Risks

When a user provides an existing resource group name and Complete mode is active:

  • All resources in that RG not defined in the template will be deleted

  • This includes resources from other teams, manual deployments, or other blueprints

Mitigation:

  • Use Incremental mode when deploying to user-provided resource groups

  • Reserve Complete mode for Bluebricks-managed (auto-generated) resource groups

Incremental Mode Trade-offs

Orphaned Resources:

  • Resources removed from template remain in Azure

  • Increases cost over time if not manually cleaned

  • Requires decommission process

Cost Management:

  • Bluebricks calculates cost based on blueprint definitions

  • Orphaned resources not reflected in Bluebricks cost tracking

  • Manual reconciliation required

Referencing External Resources

Both modes support referencing resources from other resource groups without managing them.

Example: VM with Existing VNet

The VNet exists in virtualNetworkResourceGroup, but the NIC is created in the deployment's resource group. Complete mode only affects resources in the deployment's resource group.

Cost Management

Complete Mode

  • Bluebricks tracks all resources in deployment

  • Cost calculation accurate

  • Uninstall frees up environment budget immediately

Incremental Mode

  • Bluebricks tracks resources at deployment time

  • Orphaned resources not reflected in cost tracking

  • Manual reconciliation required for accurate costs

  • Budget freed only after manual resource cleanup

Summary

Complete mode (default) provides full lifecycle management and safe destroy operations for standard Bluebricks deployments with auto-generated resource groups.

Incremental mode is used when deploying to shared or user-provided resource groups where you cannot take full ownership. Manual cleanup required for removed resources.

Reference external resources from other resource groups regardless of mode to maintain separation of concerns.

See also

Last updated

Was this helpful?