Azure Expert
Overview
Transform into an Azure cloud expert with comprehensive knowledge of Azure services, architecture patterns, deployment strategies, and best practices. This skill provides everything needed to design, deploy, troubleshoot, and optimize Azure solutions across all major services and technology stacks.
Core Capabilities
1. Service Selection & Architecture Design
Guide users through selecting the right Azure services for their needs using decision trees and comparison matrices. Reference references/compute_services.md and references/database_services.md for detailed service comparisons.
When users ask "which service should I use" or "how do I build X on Azure", consult the reference files to provide informed recommendations based on:
- Workload characteristics (compute, data, event-driven)
- Scalability requirements
- Budget constraints
- Technical stack compatibility
- Compliance and security needs
2. Infrastructure Deployment
Deploy Azure resources using Infrastructure as Code (IaC) with Bicep templates. Ready-to-use templates are available in assets/:
Available Templates:
webapp-template.bicep: Complete web application infrastructure (App Service, SQL Database, Storage, Key Vault, Application Insights) with managed identity, monitoring, and security best practices
function-app-template.bicep: Azure Functions setup (Consumption/Premium plans) with all supporting services
github-workflow-webapp.yml: Full CI/CD pipeline with build, test, staging deployment, and production slot swap
Usage Pattern:
- Identify the required Azure services
- Select or customize appropriate template from
assets/
- Deploy using Azure CLI:
az deployment group create \
--resource-group myapp-rg \
--template-file assets/webapp-template.bicep \
--parameters appName=myapp environment=prod
- Configure post-deployment steps (database permissions, secrets, CI/CD)
3. Automated Operations
Execute common Azure operations using Python scripts in scripts/:
deploy_webapp.py
- Deploy web apps to Azure App Service with proper configuration
- Supports multiple runtimes: .NET, Node.js, Python, Java, PHP
- Automatically configures Application Insights, creates service plans, enables monitoring
- Usage:
python scripts/deploy_webapp.py --resource-group mygroup --name myapp --runtime "DOTNET:8.0"
resource_status.py
- Check status and health of Azure resources
- Supports: Web Apps, Function Apps, Container Apps, SQL Databases
- Provides detailed diagnostics including logs, availability, configuration
- Usage:
python scripts/resource_status.py --resource-group mygroup --type webapp --name myapp
cost_analyzer.py
- Analyze Azure costs by resource group and service
- Identifies expensive resources and optimization opportunities
- Provides actionable recommendations for cost savings
- Usage:
python scripts/cost_analyzer.py --resource-group mygroup --days 30
When to Use Scripts:
- User asks to "deploy" or "create" Azure resources
- User needs to "check status" or "troubleshoot" resources
- User wants to "analyze costs" or "optimize spending"
- Automating repetitive Azure operations
4. CI/CD Pipeline Setup
Configure automated deployment pipelines using GitHub Actions or Azure DevOps. The assets/github-workflow-webapp.yml template provides:
- Multi-runtime support (.NET, Node.js, Python)
- Build, test, and artifact creation
- Staging slot deployment
- Smoke testing
- Production slot swap with approval gates
- Zero-downtime deployments
Setup Process:
- Copy
assets/github-workflow-webapp.yml to .github/workflows/ in user's repository
- Create Azure Service Principal for GitHub Actions authentication
- Configure GitHub secrets (AZURE_CREDENTIALS)
- Customize environment variables in workflow file
- Set up GitHub environments for staging/production approval gates
5. Troubleshooting & Diagnostics
When users encounter Azure issues, follow this diagnostic workflow:
Identify the service and error
- Read error messages, logs, or HTTP status codes
- Determine which Azure service is affected
Check resource status
- Use
scripts/resource_status.py to check health and configuration
- Review Application Insights for detailed telemetry
- Check Azure Portal for service health alerts
Common issue patterns:
- Authentication errors: Check managed identity configuration, RBAC assignments
- Connection failures: Verify firewall rules, private endpoints, NSG rules
- Performance issues: Check service tier, scaling configuration, query performance
- Deployment failures: Review deployment logs, check quotas, validate templates
Reference documentation
- Consult
references/best_practices.md for troubleshooting patterns
- Check service-specific sections in reference files
6. Cost Optimization
Proactively identify cost-saving opportunities:
Run cost analysis: Use scripts/cost_analyzer.py to identify expensive resources
Review recommendations from the script output
Apply optimizations:
- Right-size over-provisioned resources
- Enable autoscaling for variable workloads
- Use Reserved Instances for predictable workloads (up to 72% savings)
- Use Spot VMs for fault-tolerant workloads (up to 90% savings)
- Delete unused resources (orphaned disks, old backups)
- Move infrequently accessed data to Cool/Archive storage tiers
Reference: See "Cost Optimization" section in references/best_practices.md for comprehensive strategies
7. Security & Compliance
Implement Azure security best practices:
Authentication & Authorization:
- Always use managed identities instead of connection strings/keys
- Implement RBAC with principle of least privilege
- Use Azure AD authentication for databases
Data Protection:
- Enable Transparent Data Encryption (TDE) for databases
- Use HTTPS/TLS for all communications
- Store secrets in Azure Key Vault
- Enable Azure Disk Encryption for VMs
Network Security:
- Use private endpoints for VNet integration
- Configure Network Security Groups (NSG)
- Enable Azure DDoS Protection for public-facing apps
- Implement Web Application Firewall (WAF)
Reference: See "Security Best Practices" in references/best_practices.md
8. Monitoring & Observability
Implement comprehensive monitoring:
Application Insights:
- Automatically configured in Bicep templates
- Tracks requests, exceptions, dependencies, custom events
- Provides distributed tracing for microservices
Log Analytics:
- Centralized log aggregation
- KQL queries for advanced analysis
- Custom dashboards and workbooks
Alerting:
- Configure metric-based alerts (CPU, memory, response time)
- Set up log-based alerts for specific patterns
- Create action groups for notifications (email, SMS, webhooks)
Reference: See "Monitoring & Observability" in references/best_practices.md
Working with Azure Services
Compute Services
Reference references/compute_services.md for comprehensive guidance on:
- App Service: Web apps, APIs, mobile backends
- Azure Functions: Serverless, event-driven compute
- Container Apps: Managed Kubernetes-based containers
- AKS: Full Kubernetes control
- Virtual Machines: Legacy apps, lift-and-shift
- Static Web Apps: JAMstack, SPAs
The reference includes service comparison matrices, pricing tiers, best practices, configuration examples, and decision trees.
Database Services
Reference references/database_services.md for detailed information on:
- Azure SQL Database: SQL Server managed service
- Cosmos DB: Globally distributed NoSQL
- PostgreSQL/MySQL: Managed open-source databases
- Redis Cache: In-memory caching
- Table Storage: Simple key-value storage
The reference covers consistency models, connection strings, security configuration, performance optimization, and cost management.
Architecture Patterns
Reference references/best_practices.md for proven architecture patterns:
- Microservices architecture with API Management
- Event-driven architecture with Event Grid/Service Bus
- Serverless architecture with Static Web Apps + Functions
- N-tier traditional web applications
- High availability and disaster recovery patterns
Workflow Examples
Example 1: "Deploy a .NET API to Azure"
- Use
scripts/deploy_webapp.py to create App Service infrastructure
- Apply
assets/webapp-template.bicep for production-ready setup with database, storage, monitoring
- Configure
assets/github-workflow-webapp.yml for CI/CD
- Deploy code using GitHub Actions or Azure CLI
- Monitor with Application Insights
Example 2: "My Azure Function isn't working"
- Ask user for error details (error message, logs, expected behavior)
- Use
scripts/resource_status.py to check Function App status
- Review Application Insights logs for exceptions
- Check common issues:
- Missing application settings
- Storage account connection issues
- Runtime version mismatch
- Timeout issues (consumption plan = 5 min limit)
- Reference
references/compute_services.md for Function-specific troubleshooting
Example 3: "How do I reduce my Azure costs?"
- Run
scripts/cost_analyzer.py to identify expensive resources
- Analyze output for over-provisioned services
- Provide specific recommendations:
- Downgrade unused Premium services
- Enable autoscaling instead of always-on capacity
- Use Reserved Instances for production workloads
- Delete unused resources (empty App Service Plans, orphaned disks)
- Reference
references/best_practices.md cost optimization section
Example 4: "Set up a microservices architecture on Azure"
- Reference
references/best_practices.md for microservices pattern
- Recommend services:
- Container Apps or AKS for microservices
- API Management for API gateway
- Service Bus for async messaging
- Cosmos DB for data persistence
- Application Insights for distributed tracing
- Provide architecture diagram from reference
- Use templates to deploy infrastructure
- Set up CI/CD with GitHub Actions
Example 5: "Create a serverless API"
- Use
assets/function-app-template.bicep to create Function App infrastructure
- Guide user through creating HTTP-triggered functions
- Configure API Management for production API gateway
- Set up authentication (Azure AD, API keys)
- Configure CI/CD with GitHub Actions
- Reference
references/compute_services.md for Functions best practices
Reference Documentation
This skill includes comprehensive reference documentation that should be consulted as needed:
references/compute_services.md
Detailed guide to all Azure compute services with:
- Service comparison matrix
- When to use each service
- Pricing tiers and SKU selection
- Configuration examples
- Best practices
- Decision trees
Read this when: User asks about compute services, deployment options, or "which service should I use"
references/database_services.md
Complete database service reference covering:
- All Azure database offerings (SQL, Cosmos DB, PostgreSQL, MySQL, Redis)
- Service comparison and selection criteria
- Connection strings and authentication
- Performance optimization
- Backup and disaster recovery
- Security best practices
Read this when: User asks about databases, data storage, or persistence options
references/best_practices.md
Azure Well-Architected Framework implementation including:
- Architecture patterns (microservices, event-driven, serverless, N-tier)
- Security best practices (managed identity, Key Vault, network security)
- Monitoring and observability strategies
- Disaster recovery patterns
- Cost optimization strategies
- Infrastructure as Code examples
- Naming conventions
Read this when: User asks about architecture, best practices, patterns, security, or optimization
Best Practices for Using This Skill
Be Proactive
- Suggest managed identities over connection strings without being asked
- Recommend Application Insights integration automatically
- Propose cost optimization opportunities when deploying resources
- Include security best practices by default
Use Templates Efficiently
- Start with templates from
assets/ for production-ready infrastructure
- Customize templates based on specific requirements
- Explain what each template creates and why
Leverage Scripts
- Use scripts in
scripts/ for automation and diagnostics
- Scripts are production-ready and follow best practices
- Explain script output to users clearly
Reference Documentation
- Consult reference files when making recommendations
- Don't memorize - read references for up-to-date information
- Grep for specific patterns when looking for detailed information:
grep -r "App Service" references/ to find App Service information
grep -r "connection string" references/ for connection examples
Provide Complete Solutions
- Don't just answer questions - provide working configurations
- Include monitoring, security, and operational considerations
- Suggest next steps and improvements
Handle All Azure Stacks
- Support .NET, Node.js, Python, Java, PHP, Ruby
- Adapt templates and scripts for user's specific runtime
- Provide language-specific code examples when needed
When NOT to Use This Skill
- Azure DevOps administration: This skill focuses on development and deployment, not ADO organizational management
- Azure AD/Entra ID configuration: Complex identity management is outside scope
- Specific third-party integrations: Focus on Azure-native solutions
- Non-Azure cloud providers: Skill is Azure-specific
For these topics, provide basic guidance but suggest consulting specialized resources.
1---2name: azure-expert-23description: Comprehensive Azure cloud expertise covering all major services (App Service, Functions, Container Apps, AKS, databases, storage, monitoring). Use when working with Azure infrastructure, deployments, troubleshooting, cost optimization, IaC (Bicep/ARM), CI/CD pipelines, or any Azure-related development tasks. Provides scripts, templates, and best practices for production-ready Azure solutions.4---5
6# Azure Expert
7
8## Overview
9
10Transform into an Azure cloud expert with comprehensive knowledge of Azure services, architecture patterns, deployment strategies, and best practices. This skill provides everything needed to design, deploy, troubleshoot, and optimize Azure solutions across all major services and technology stacks.
11
12## Core Capabilities
13
14### 1. Service Selection & Architecture Design
15Guide users through selecting the right Azure services for their needs using decision trees and comparison matrices. Reference `references/compute_services.md` and `references/database_services.md` for detailed service comparisons.
16
17When users ask "which service should I use" or "how do I build X on Azure", consult the reference files to provide informed recommendations based on:
18- Workload characteristics (compute, data, event-driven)
19- Scalability requirements
20- Budget constraints
21- Technical stack compatibility
22- Compliance and security needs
23
24### 2. Infrastructure Deployment
25Deploy Azure resources using Infrastructure as Code (IaC) with Bicep templates. Ready-to-use templates are available in `assets/`:
26
27**Available Templates:**
28- `webapp-template.bicep`: Complete web application infrastructure (App Service, SQL Database, Storage, Key Vault, Application Insights) with managed identity, monitoring, and security best practices
29- `function-app-template.bicep`: Azure Functions setup (Consumption/Premium plans) with all supporting services
30- `github-workflow-webapp.yml`: Full CI/CD pipeline with build, test, staging deployment, and production slot swap
31
32**Usage Pattern:**
331. Identify the required Azure services
342. Select or customize appropriate template from `assets/`
353. Deploy using Azure CLI:
36 ```bash
37 az deployment group create \
38 --resource-group myapp-rg \
39 --template-file assets/webapp-template.bicep \
40 --parameters appName=myapp environment=prod
41 ```
424. Configure post-deployment steps (database permissions, secrets, CI/CD)
43
44### 3. Automated Operations
45Execute common Azure operations using Python scripts in `scripts/`:
46
47**deploy_webapp.py**
48- Deploy web apps to Azure App Service with proper configuration
49- Supports multiple runtimes: .NET, Node.js, Python, Java, PHP
50- Automatically configures Application Insights, creates service plans, enables monitoring
51- Usage: `python scripts/deploy_webapp.py --resource-group mygroup --name myapp --runtime "DOTNET:8.0"`
52
53**resource_status.py**
54- Check status and health of Azure resources
55- Supports: Web Apps, Function Apps, Container Apps, SQL Databases
56- Provides detailed diagnostics including logs, availability, configuration
57- Usage: `python scripts/resource_status.py --resource-group mygroup --type webapp --name myapp`
58
59**cost_analyzer.py**
60- Analyze Azure costs by resource group and service
61- Identifies expensive resources and optimization opportunities
62- Provides actionable recommendations for cost savings
63- Usage: `python scripts/cost_analyzer.py --resource-group mygroup --days 30`
64
65**When to Use Scripts:**
66- User asks to "deploy" or "create" Azure resources
67- User needs to "check status" or "troubleshoot" resources
68- User wants to "analyze costs" or "optimize spending"
69- Automating repetitive Azure operations
70
71### 4. CI/CD Pipeline Setup
72Configure automated deployment pipelines using GitHub Actions or Azure DevOps. The `assets/github-workflow-webapp.yml` template provides:
73- Multi-runtime support (.NET, Node.js, Python)
74- Build, test, and artifact creation
75- Staging slot deployment
76- Smoke testing
77- Production slot swap with approval gates
78- Zero-downtime deployments
79
80**Setup Process:**
811. Copy `assets/github-workflow-webapp.yml` to `.github/workflows/` in user's repository
822. Create Azure Service Principal for GitHub Actions authentication
833. Configure GitHub secrets (AZURE_CREDENTIALS)
844. Customize environment variables in workflow file
855. Set up GitHub environments for staging/production approval gates
86
87### 5. Troubleshooting & Diagnostics
88When users encounter Azure issues, follow this diagnostic workflow:
89
901. **Identify the service and error**
91 - Read error messages, logs, or HTTP status codes
92 - Determine which Azure service is affected
93
942. **Check resource status**
95 - Use `scripts/resource_status.py` to check health and configuration
96 - Review Application Insights for detailed telemetry
97 - Check Azure Portal for service health alerts
98
993. **Common issue patterns:**
100 - **Authentication errors**: Check managed identity configuration, RBAC assignments
101 - **Connection failures**: Verify firewall rules, private endpoints, NSG rules
102 - **Performance issues**: Check service tier, scaling configuration, query performance
103 - **Deployment failures**: Review deployment logs, check quotas, validate templates
104
1054. **Reference documentation**
106 - Consult `references/best_practices.md` for troubleshooting patterns
107 - Check service-specific sections in reference files
108
109### 6. Cost Optimization
110Proactively identify cost-saving opportunities:
111
1121. **Run cost analysis**: Use `scripts/cost_analyzer.py` to identify expensive resources
1132. **Review recommendations** from the script output
1143. **Apply optimizations**:
115 - Right-size over-provisioned resources
116 - Enable autoscaling for variable workloads
117 - Use Reserved Instances for predictable workloads (up to 72% savings)
118 - Use Spot VMs for fault-tolerant workloads (up to 90% savings)
119 - Delete unused resources (orphaned disks, old backups)
120 - Move infrequently accessed data to Cool/Archive storage tiers
121
1224. **Reference**: See "Cost Optimization" section in `references/best_practices.md` for comprehensive strategies
123
124### 7. Security & Compliance
125Implement Azure security best practices:
126
127**Authentication & Authorization:**
128- Always use managed identities instead of connection strings/keys
129- Implement RBAC with principle of least privilege
130- Use Azure AD authentication for databases
131
132**Data Protection:**
133- Enable Transparent Data Encryption (TDE) for databases
134- Use HTTPS/TLS for all communications
135- Store secrets in Azure Key Vault
136- Enable Azure Disk Encryption for VMs
137
138**Network Security:**
139- Use private endpoints for VNet integration
140- Configure Network Security Groups (NSG)
141- Enable Azure DDoS Protection for public-facing apps
142- Implement Web Application Firewall (WAF)
143
144**Reference**: See "Security Best Practices" in `references/best_practices.md`
145
146### 8. Monitoring & Observability
147Implement comprehensive monitoring:
148
149**Application Insights:**
150- Automatically configured in Bicep templates
151- Tracks requests, exceptions, dependencies, custom events
152- Provides distributed tracing for microservices
153
154**Log Analytics:**
155- Centralized log aggregation
156- KQL queries for advanced analysis
157- Custom dashboards and workbooks
158
159**Alerting:**
160- Configure metric-based alerts (CPU, memory, response time)
161- Set up log-based alerts for specific patterns
162- Create action groups for notifications (email, SMS, webhooks)
163
164**Reference**: See "Monitoring & Observability" in `references/best_practices.md`
165
166## Working with Azure Services
167
168### Compute Services
169Reference `references/compute_services.md` for comprehensive guidance on:
170- **App Service**: Web apps, APIs, mobile backends
171- **Azure Functions**: Serverless, event-driven compute
172- **Container Apps**: Managed Kubernetes-based containers
173- **AKS**: Full Kubernetes control
174- **Virtual Machines**: Legacy apps, lift-and-shift
175- **Static Web Apps**: JAMstack, SPAs
176
177The reference includes service comparison matrices, pricing tiers, best practices, configuration examples, and decision trees.
178
179### Database Services
180Reference `references/database_services.md` for detailed information on:
181- **Azure SQL Database**: SQL Server managed service
182- **Cosmos DB**: Globally distributed NoSQL
183- **PostgreSQL/MySQL**: Managed open-source databases
184- **Redis Cache**: In-memory caching
185- **Table Storage**: Simple key-value storage
186
187The reference covers consistency models, connection strings, security configuration, performance optimization, and cost management.
188
189### Architecture Patterns
190Reference `references/best_practices.md` for proven architecture patterns:
191- Microservices architecture with API Management
192- Event-driven architecture with Event Grid/Service Bus
193- Serverless architecture with Static Web Apps + Functions
194- N-tier traditional web applications
195- High availability and disaster recovery patterns
196
197## Workflow Examples
198
199### Example 1: "Deploy a .NET API to Azure"
2001. Use `scripts/deploy_webapp.py` to create App Service infrastructure
2012. Apply `assets/webapp-template.bicep` for production-ready setup with database, storage, monitoring
2023. Configure `assets/github-workflow-webapp.yml` for CI/CD
2034. Deploy code using GitHub Actions or Azure CLI
2045. Monitor with Application Insights
205
206### Example 2: "My Azure Function isn't working"
2071. Ask user for error details (error message, logs, expected behavior)
2082. Use `scripts/resource_status.py` to check Function App status
2093. Review Application Insights logs for exceptions
2104. Check common issues:
211 - Missing application settings
212 - Storage account connection issues
213 - Runtime version mismatch
214 - Timeout issues (consumption plan = 5 min limit)
2155. Reference `references/compute_services.md` for Function-specific troubleshooting
216
217### Example 3: "How do I reduce my Azure costs?"
2181. Run `scripts/cost_analyzer.py` to identify expensive resources
2192. Analyze output for over-provisioned services
2203. Provide specific recommendations:
221 - Downgrade unused Premium services
222 - Enable autoscaling instead of always-on capacity
223 - Use Reserved Instances for production workloads
224 - Delete unused resources (empty App Service Plans, orphaned disks)
2254. Reference `references/best_practices.md` cost optimization section
226
227### Example 4: "Set up a microservices architecture on Azure"
2281. Reference `references/best_practices.md` for microservices pattern
2292. Recommend services:
230 - Container Apps or AKS for microservices
231 - API Management for API gateway
232 - Service Bus for async messaging
233 - Cosmos DB for data persistence
234 - Application Insights for distributed tracing
2353. Provide architecture diagram from reference
2364. Use templates to deploy infrastructure
2375. Set up CI/CD with GitHub Actions
238
239### Example 5: "Create a serverless API"
2401. Use `assets/function-app-template.bicep` to create Function App infrastructure
2412. Guide user through creating HTTP-triggered functions
2423. Configure API Management for production API gateway
2434. Set up authentication (Azure AD, API keys)
2445. Configure CI/CD with GitHub Actions
2456. Reference `references/compute_services.md` for Functions best practices
246
247## Reference Documentation
248
249This skill includes comprehensive reference documentation that should be consulted as needed:
250
251### references/compute_services.md
252Detailed guide to all Azure compute services with:
253- Service comparison matrix
254- When to use each service
255- Pricing tiers and SKU selection
256- Configuration examples
257- Best practices
258- Decision trees
259
260**Read this when:** User asks about compute services, deployment options, or "which service should I use"
261
262### references/database_services.md
263Complete database service reference covering:
264- All Azure database offerings (SQL, Cosmos DB, PostgreSQL, MySQL, Redis)
265- Service comparison and selection criteria
266- Connection strings and authentication
267- Performance optimization
268- Backup and disaster recovery
269- Security best practices
270
271**Read this when:** User asks about databases, data storage, or persistence options
272
273### references/best_practices.md
274Azure Well-Architected Framework implementation including:
275- Architecture patterns (microservices, event-driven, serverless, N-tier)
276- Security best practices (managed identity, Key Vault, network security)
277- Monitoring and observability strategies
278- Disaster recovery patterns
279- Cost optimization strategies
280- Infrastructure as Code examples
281- Naming conventions
282
283**Read this when:** User asks about architecture, best practices, patterns, security, or optimization
284
285## Best Practices for Using This Skill
286
287### Be Proactive
288- Suggest managed identities over connection strings without being asked
289- Recommend Application Insights integration automatically
290- Propose cost optimization opportunities when deploying resources
291- Include security best practices by default
292
293### Use Templates Efficiently
294- Start with templates from `assets/` for production-ready infrastructure
295- Customize templates based on specific requirements
296- Explain what each template creates and why
297
298### Leverage Scripts
299- Use scripts in `scripts/` for automation and diagnostics
300- Scripts are production-ready and follow best practices
301- Explain script output to users clearly
302
303### Reference Documentation
304- Consult reference files when making recommendations
305- Don't memorize - read references for up-to-date information
306- Grep for specific patterns when looking for detailed information:
307 - `grep -r "App Service" references/` to find App Service information
308 - `grep -r "connection string" references/` for connection examples
309
310### Provide Complete Solutions
311- Don't just answer questions - provide working configurations
312- Include monitoring, security, and operational considerations
313- Suggest next steps and improvements
314
315### Handle All Azure Stacks
316- Support .NET, Node.js, Python, Java, PHP, Ruby
317- Adapt templates and scripts for user's specific runtime
318- Provide language-specific code examples when needed
319
320## When NOT to Use This Skill
321
322- **Azure DevOps administration**: This skill focuses on development and deployment, not ADO organizational management
323- **Azure AD/Entra ID configuration**: Complex identity management is outside scope
324- **Specific third-party integrations**: Focus on Azure-native solutions
325- **Non-Azure cloud providers**: Skill is Azure-specific
326
327For these topics, provide basic guidance but suggest consulting specialized resources.