You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the recommended approach for promoting applications from development to production using Azure Developer CLI? We've been exploring patterns for "build once, deploy everywhere" workflows and would love community input on best practices.
🔍 Current Challenge
Many teams need to:
Deploy and validate applications in development environments
Promote the same build artifacts to production
Handle environment-specific infrastructure (dev: public access, prod: private networking)
Maintain consistency while ensuring production security
💡 Our Current Approach
We've been experimenting with enhancing the azd pipeline config generated workflow to support dev-to-prod promotion:
Infrastructure: Environment-Aware with envType
Using conditional Bicep deployment based on environment type:
// Deploy VNet only for productionmodulenetwork'./network.bicep' = if (envType == 'prod') {
name: 'networkDeployment'// ...
}
// Storage with environment-specific accesspublicNetworkAccess: envType == 'prod' ? 'Disabled' : 'Enabled'
Pipeline: Package Preservation
Modified the GitHub Actions workflow to preserve build artifacts:
# Development
azd up # (envType defaults to 'dev')# Production
azd env new myproj-prod
azd env set AZURE_ENV_TYPE prod
azd up
🎯 Key Questions for Discussion
Is this the intended pattern for azd? Should customers be enhancing azd pipeline config output, or is there a better built-in approach?
Environment-specific infrastructure: Is using envType parameters in Bicep the recommended way to handle dev/prod infrastructure differences?
Package preservation: The azd deploy --from-package command consumes the package file. Is copying the package the right approach, or is there a better way to reuse build artifacts?
Environment naming: Should there be conventions or built-in support for environment naming patterns (e.g., myapp-dev → myapp-prod)?
Multi-environment workflows: Should there be a native multi-environment promotion support in azd, something like azd promote --from-env dev --to-env prod?
📝 Example Implementation
We've created a working example that demonstrates this pattern:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
🤔 The Question
What's the recommended approach for promoting applications from development to production using Azure Developer CLI? We've been exploring patterns for "build once, deploy everywhere" workflows and would love community input on best practices.
🔍 Current Challenge
Many teams need to:
💡 Our Current Approach
We've been experimenting with enhancing the
azd pipeline config
generated workflow to support dev-to-prod promotion:Infrastructure: Environment-Aware with
envType
Using conditional Bicep deployment based on environment type:
Pipeline: Package Preservation
Modified the GitHub Actions workflow to preserve build artifacts:
Environment Management
🎯 Key Questions for Discussion
Is this the intended pattern for azd? Should customers be enhancing
azd pipeline config
output, or is there a better built-in approach?Environment-specific infrastructure: Is using
envType
parameters in Bicep the recommended way to handle dev/prod infrastructure differences?Package preservation: The
azd deploy --from-package
command consumes the package file. Is copying the package the right approach, or is there a better way to reuse build artifacts?Environment naming: Should there be conventions or built-in support for environment naming patterns (e.g.,
myapp-dev
→myapp-prod
)?Multi-environment workflows: Should there be a native multi-environment promotion support in azd, something like
azd promote --from-env dev --to-env prod
?📝 Example Implementation
We've created a working example that demonstrates this pattern:
azd init -t https://github.com/puicchan/azd-dev-prod-appservice-storage
🤝 Community Input Needed
How do you handle dev-to-prod promotion with azd?
We'd love to hear from the community about the best path forward for these scenarios!
Looking forward to the discussion and learning from the community's experiences! 🙏
Beta Was this translation helpful? Give feedback.
All reactions