一键导入
configure-component
Configure an individual application component by mapping it to an Azure service with SKU, region, and service-specific settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure an individual application component by mapping it to an Azure service with SKU, region, and service-specific settings
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate Azure infrastructure as Bicep code from planning data
Generate Azure infrastructure as Terraform code from planning data
Generate a Mermaid architecture diagram derived from application components and infrastructure context data
Document source control, CI/CD platform, environments, deployment process, and quality gates for the application
Read all planning data, propose relevant ADR topics, and generate Architecture Decision Records following the project template
Gather network topology, landing zones, existing resources, and connectivity requirements for Azure infrastructure planning
| name | configure-component |
| description | Configure an individual application component by mapping it to an Azure service with SKU, region, and service-specific settings |
This skill configures a single application component by mapping it to a specific Azure service and capturing the configuration details. It generates infra/application-architecture/components/{component-id}.json for each configured component.
These JSON files are used by the IaC generation skills (/generate-code-bicep and /generate-code-terraform) to produce infrastructure code.
The configured component will be displayed in the UI when the user runs npx @zureltd/az-infra-harness and navigates to the Application Architecture section.
Run this skill when:
/configure-componentPrerequisite: infra/application-definition/application-components.md must exist with at least one component defined. Run /application-components first if it doesn't.
The {component-id} used in the filename is derived from the component name in application-components.md:
api-backend, "Web Frontend" → web-frontend, "Customer Database" → customer-databaseBefore starting the interactive flow, read existing context data to provide smart defaults:
infra/context/infrastructure-context.md — extract the preferred Azure region from network topologyinfra/context/platform-context.md — extract shared services (Key Vault, Log Analytics) that may inform settingsinfra/application-definition/non-functional-requirements.md — extract scale/availability requirements to suggest appropriate SKUsinfra/application-architecture/components/*.json — check what region and patterns already-configured components use for consistencyUse these as suggestions (clearly labelled) during the interactive flow. For example:
eastus2, suggest that as the default regionIf the user has Azure CLI (az) available, run discovery commands to suggest existing resources:
# Check if logged in
az account show --query "{subscription:name, id:id}" -o tsv 2>/dev/null
# List existing Container App Environments (for compute components)
az containerapp env list --query "[].{name:name, location:location, rg:resourceGroup}" -o table 2>/dev/null
# List existing SQL Servers (for data components)
az sql server list --query "[].{name:name, location:location, rg:resourceGroup}" -o table 2>/dev/null
# List existing Redis caches
az redis list --query "[].{name:name, location:location, sku:sku.name}" -o table 2>/dev/null
# List available regions
az account list-locations --query "[?metadata.regionType=='Physical'].{name:name, displayName:displayName}" -o table 2>/dev/null
If az is not available or not logged in: Skip silently and proceed with manual questions.
If resources are found: Present them as context: "I found an existing Container Apps Environment in eastus2 — would you like to deploy to the same region?"
Read infra/application-definition/application-components.md to get the list of defined components.
If the file doesn't exist or is empty:
I need a list of application components before I can configure them. Please run /application-components first to define your application's components.
Stop the skill.
Also check infra/application-architecture/components/ for any already-configured component JSON files.
Present the list of components to the user and indicate which are already configured.
Here are your application components:
1. **API Backend** (Compute) — [description] ✅ Already configured
2. **Web Frontend** (Compute) — [description] ⬜ Not yet configured
3. **Customer Database** (Data) — [description] ⬜ Not yet configured
4. **Application Gateway** (Networking) — [description] ⬜ Not yet configured
Which component would you like to configure? (Enter the number or name)
Wait for the user's selection before proceeding.
This skill MUST comply with the shared Interaction & Validation Standard:
.opencode/skills/_shared/interaction-validation-standard.md
Use the TodoWrite tool to create a task list at the start with these high-priority items (adjust based on component type):
First, suggest appropriate Azure services based on the component type:
For Compute components:
For the **[Component Name]** component ([description]), which Azure service would you like to use?
Common options for compute:
- **Azure Container Apps** — serverless containers with auto-scaling (recommended for APIs, workers)
- **Azure App Service** — PaaS web hosting (recommended for web frontends, simple APIs)
- **Azure Kubernetes Service (AKS)** — full container orchestration (for complex microservices)
- **Azure Functions** — serverless event-driven compute (for short-running tasks)
- **Azure Container Instances** — simple container hosting (for batch jobs)
Which would you like to use?
For Data components:
For the **[Component Name]** component ([description]), which Azure service would you like to use?
Common options for data:
- **Azure SQL Database** — managed relational database (SQL Server compatible)
- **Azure Database for PostgreSQL Flexible Server** — managed PostgreSQL
- **Azure Cosmos DB** — globally distributed NoSQL database
- **Azure Cache for Redis** — managed Redis cache
- **Azure Service Bus** — enterprise messaging (queues and topics)
- **Azure Storage Account** — blob, file, queue, and table storage
- **Azure Event Hubs** — event streaming at scale
Which would you like to use?
For Networking components:
For the **[Component Name]** component ([description]), which Azure service would you like to use?
Common options for networking:
- **Azure Application Gateway** — L7 load balancer with WAF
- **Azure Front Door** — global CDN + load balancing
- **Azure API Management** — API gateway with policies, developer portal
- **Azure Load Balancer** — L4 load balancer (internal or public)
- **Azure Firewall** — network-level traffic filtering
Which would you like to use?
After the user selects an Azure service, ask about the SKU. Present the relevant options for that specific service:
Example for Container Apps:
Which pricing tier would you like for Container Apps?
- **Consumption** — pay per use, scale to zero (recommended for variable workloads)
- **Dedicated** — dedicated compute with reserved capacity (for predictable, high-volume workloads)
Example for Azure SQL Database:
Which service tier would you like for Azure SQL Database?
- **General Purpose** — balanced compute and storage (most common)
- **Business Critical** — high performance with in-memory OLTP
- **Serverless** — auto-pause during inactivity, pay per vCore-second
- **Hyperscale** — very large databases (100TB+)
Which Azure region should this component be deployed to?
If you're not sure, the most common choices are:
- East US 2 (eastus2)
- West Europe (westeurope)
- North Europe (northeurope)
- UK South (uksouth)
Or specify another region if required.
Validation: Must match a valid Azure region name or common alias.
Ask for the most important configuration settings for the chosen service. Focus on the settings that affect IaC generation.
For Container Apps (Consumption):
For Container Apps, please provide:
1. **Minimum replicas**: How many instances should always be running? (e.g., 0 for scale-to-zero, 1 to keep warm, 2 for HA)
2. **Maximum replicas**: Maximum number of instances during peak load? (e.g., 10)
3. **CPU**: vCPU allocation per replica? (e.g., 0.5, 1.0)
4. **Memory**: Memory per replica? (e.g., 1Gi, 2Gi)
5. **Ingress**: Should this component accept external traffic (external) or only internal traffic (internal)?
6. **Private endpoint**: Should this component be accessible only via private endpoint (internal VNet)?
For Azure SQL Database:
For Azure SQL Database, please provide:
1. **Compute tier**: Serverless or Provisioned?
2. **vCores**: How many vCores? (e.g., 2, 4, 8 for Provisioned; min/max for Serverless)
3. **Storage**: Maximum storage size? (e.g., 32 GB, 128 GB)
4. **Backup retention**: How many days of backup retention? (default: 7)
5. **Geo-redundancy**: Enable geo-redundant backups? (yes/no)
6. **Private endpoint**: Should the database only be accessible via private endpoint?
For other services: Ask for the equivalent critical settings based on the service type. Focus on what will actually vary in the Bicep/Terraform code.
Before generating the JSON, summarize any missing information:
Open Items:
- [Missing Item 1]
- [Missing Item 2]
Resolve all open items. Only proceed when there are zero open items.
Once all information is gathered, create the JSON file with this structure:
{
"azureService": "Container Apps",
"sku": "Consumption",
"region": "eastus2",
"settings": {
"minReplicas": 2,
"maxReplicas": 10,
"cpu": 1.0,
"memory": "2Gi",
"ingress": "external",
"privateEndpoint": true
}
}
JSON formatting rules:
azureService: full Azure service name (e.g., "Container Apps", "Azure SQL Database")sku: tier/SKU name as it appears in Azure portalregion: Azure region short name (e.g., "eastus2", "westeurope")settings: service-specific key-value pairs; keys in camelCase; values must be correct types (numbers, strings, booleans)Before saving:
azureService, sku, region, settingssettings contains at least 2 service-specific valuesTarget location: infra/application-architecture/components/{component-id}.json
Pre-save checks:
infra/application-architecture/components/ existsError handling:
✅ Configured [Component Name] successfully!
📄 File location: infra/application-architecture/components/[component-id].json
Azure Service: [Azure Service]
SKU: [SKU]
Region: [Region]
🌐 To view in the UI:
1. Ensure the Az Infra Harness is running: `npx @zureltd/az-infra-harness`
2. Refresh your browser
3. Navigate to the Application Architecture section
Would you like to configure another component? Remaining unconfigured components:
- [Component 2]
- [Component 3]
Say "yes" to continue, or "done" when you've configured all the components you need.
If the user wants to configure another component, return to Step 2 with the updated list.
When all components are configured (none remaining with ⬜ status), display:
The next step is to run /architecture-diagram to generate the architecture diagram for your application.
If the user says "done" but some components are still unconfigured, acknowledge and stop without suggesting the next step.
/application-components firstAgent: "Here are your application components:
Which component would you like to configure?"
User: "1"
Agent: "For the API Backend (Compute), which Azure service would you like to use? [Shows Compute options]"
User: "Container Apps"
Agent: "Which pricing tier? Consumption or Dedicated?"
User: "Consumption"
[Conversation continues through region and settings]
Agent: "✅ Configured API Backend successfully!
📄 File location: infra/application-architecture/components/api-backend.json
Would you like to configure another component?"
infra/application-architecture/components/api-backend.jsoninfra/application-definition/application-components.md.opencode/skills/_shared/interaction-validation-standard.mdDATA-STRUCTURE.mdinfra/application-architecture/components/{component-id}.jsonazureService, sku, region, settings)