bicep-ptn-aiml-landing-zone Agent工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
bicep-ptn-aiml-landing-zone Agent工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
bicep-ptn-aiml-landing-zone Agent工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 克隆仓库 git clone https://github.com/Azure/bicep-ptn-aiml-landing-zone cd bicep-ptn-aiml-landing-zone # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 bicep-ptn-aiml-landing-zone --help # 基本运行 bicep-ptn-aiml-landing-zone [options] <input> # 详细使用说明请查阅文档 # https://github.com/Azure/bicep-ptn-aiml-landing-zone
# bicep-ptn-aiml-landing-zone 配置说明 # 查看配置选项 bicep-ptn-aiml-landing-zone --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export BICEP_PTN_AIML_LANDING_ZONE_CONFIG="/path/to/config.yml"
The Azure AI Landing Zone is an enterprise-scale, production-ready reference architecture designed to deploy secure and resilient AI applications and agents on Azure. This repository contains the Bicep implementation, the Terraform implementations are available in separate repositories.

The v2 line adds two things that matter most for everyday use:
1. A topology switch — set deploymentMode to one of: - standalone — the AI Landing Zone provisions everything it needs (VNet, private endpoints, Bastion, jumpbox, NAT Gateway, observability). Best for sandboxes, evaluations, and teams without a corporate hub. - ailz-integrated — the AI Landing Zone deploys only the spoke (VNet + private endpoints + AI services) and peers into a hub VNet you already operate, reusing the hub's Firewall, Bastion, Private DNS zones, and Log Analytics workspace. Best for production inside an existing Azure Landing Zone. 2. Granular reuse of existing resources — every platform service can be brought from the outside via an existing*ResourceId parameter (cross-subscription IDs are accepted): Log Analytics, Application Insights, Private DNS zones (per zone, 15 available), hub VNet, jumpbox, Bastion, NAT Gateway, route table.
A handful of other quality-of-life additions:
allowedIpRanges — let named CIDRs reach the data plane of Storage, Key Vault, Cosmos DB, AI Search, ACR, AI Foundry, and App Configuration without disabling private endpoints. Use this when developers need to query the workload from their laptops without routing through Bastion.deployJumpbox, deployBastion, and deployNatGateway are now independent flags. No more all-or-nothing deployVM.hubIntegration.hubVnetResourceId creates the spoke→hub peering for you; hubIntegration.egressNextHopIp routes spoke egress through your hub firewall / NVA.scripts/Invoke-PreflightChecks.ps1 runs automatically as an azd preprovision hook and catches the usual mistakes (CIDR overlap, undersized subnets, missing BYO resource IDs, conflicting flags, and insufficient AI Foundry OpenAI model quota) before they reach ARM. Bypass with PREFLIGHT_SKIP=true.aiFoundryProjectName, aiFoundryProjectDisplayName, and aiFoundryProjectDescription let consumers customize the deployed AI Foundry project instead of using a hardcoded default.additionalAppConfigurationSettings lets a solution accelerator publish its own runtime key-values into the App Configuration store without adding template-specific parameters. See Workload App Configuration passthrough.RETRIEVAL_BACKEND=foundry_iq to stamp the orchestrator settings for a Foundry IQ knowledge base. See Foundry IQ for GPT-RAG for parameters, security expectations, billing, and the post-provision script.prepareHostedAgent provisions the generic project/registry prerequisites and build handoff before an image exists; deployHostedAgent remains the immutable-digest deployment intent and implies preparation. Both flags default to false and never remove or change existing Container Apps or data resources. See Hosted-agent preparation and deployment.Pick a runbook to deploy:
If you're upgrading from v1.x, see the migration guide — it shows what changed in v2 and the parameters you may need to update.
Required Permissions:
Required Tools:
Azure CLI is included as a prerequisite for future pre/post provisioning hooks that may depend on it.
Choose your preferred deployment method based on project requirements and environment constraints.
Quick setup for demos without network isolation.
Initialize the project
azd init -t azure/bicep-ptn-aiml-landing-zone
Sign in to Azure
az login
azd auth login
Add--tenantforazor--tenant-idforazdif you want a specific tenant.
Provision Infrastructure
azd provision > Optional: You can change parameter values in main.parameters.json or set them using azd env set before running azd provision. The latter applies only to parameters that support environment variable substitution.
For deployments that require network isolation.
Before Provisioning
Enable network isolation in your environment:
azd env set NETWORK_ISOLATION true
Optional: Update other parameters inmain.parameters.jsonor viaazd env setbefore provisioning.
Make sure you're signed in with your Azure user account:
az login
azd auth login
Add--tenantforazor--tenant-idforazdif you want a specific tenant.
Provision Infrastructure
azd provision
Using the Jumpbox VM
testvmuserThe default install.ps1 bootstrap clones this repository to C:\github\ai-lz and walks manifest.json#components for additional repos. Downstream solution accelerators that consume this landing zone as a Bicep module / git submodule and need their own application repository present on the jumpbox (for private-network data-plane post-provisioning — Cosmos seeding, AI Search index creation, sample data loading, etc.) declare those repos in their overlay manifest.json:
{
"tag": "v1.0.0",
"ailz_tag": "v1.1.1",
"components": [
{
"name": "voice-app",
"repo": "https://github.com/Contoso/voice-app.git",
"tag": "v0.3.0"
}
]
}
main.bicep derives the URLs/tags/names from _manifest.components at compile time and forwards them to install.ps1 over the CSE commandToExecute. Each entry is cloned into C:\github\<name> on the jumpbox. tag defaults to main; name defaults to the repo URL basename without .git. There are no per-deployment Bicep parameters to wire — manifest.json is the single source of truth, the same one consumers already use to pin their ailz_tag release.
When networkIsolation=true, the Container Registry is deployed as Premium with publicNetworkAccess=Disabled and is only reachable via its private endpoint. az acr build against the shared Microsoft-managed builder will fail. This landing zone therefore provisions an ACR Tasks agent pool attached to the devops-build-agents-subnet so image builds run inside the VNet and push to the registry over its private endpoint. No Docker client is required (and the jumpbox has no Docker installed by design — see issue #14).
Build and push from the jumpbox (or any client that can reach ARM):
$acr = (azd env get-values | Select-String '^AZURE_CONTAINER_REGISTRY_ENDPOINT').Line.Split('=')[1].Trim('"').Split('.')[0]
$pool = (azd env get-values | Select-String '^ACR_TASK_AGENT_POOL').Line.Split('=')[1].Trim('"')
az acr build `
-r $acr `
--agent-pool $pool `
-t myapp:latest `
-f Dockerfile `
.
Pause billing between builds (default tier S1 is billed per hour whether idle or not):
az acr agentpool update -r <acr> -n <pool> --count 0
Resume before the next build:
az acr agentpool update -r <acr> -n <pool> --count 1
The agent pool can be disabled entirely with deployAcrTaskAgentPool=false if builds are handled by a central CI/CD runner that already reaches the registry's private endpoint.
When networkIsolation=true, egress from the jumpbox and workload subnets is forced through the default Azure Firewall. The landing zone codifies the FQDNs required by the default install.ps1 bootstrap and by the ACR Tasks agent pool. The set is split by purpose so you can audit or trim it:
*.azurecr.io, *.data.azurecr.io, and Azure Storage queue/blob/table FQDNs.packages.microsoft.com for Microsoft-supported Linux packages such as msodbcsql18.If your application build needs additional HTTPS endpoints, add them to the additionalAcrTaskBuildFqdns array parameter. The values are appended to the ACR Tasks HTTPS runtime rule only when networkIsolation, deployAzureFirewall, deployAcrTaskAgentPool, and extendFirewallForAcrTaskBuilds are all enabled, and are scoped to the devops-build-agents-subnet.
| Rule | Source subnet | FQDN group | Used by |
|---|---|---|---|
AllowMicrosoftContainerRegistry | * | mcr.microsoft.com, *.data.mcr.microsoft.com | ACA/agents/ACR Tasks pulling Microsoft base images |
AllowEntraIdAuth | * | login.microsoftonline.com, login.windows.net, management.azure.com, graph.microsoft.com, *.applicationinsights.azure.com | Entra ID auth, ARM control plane, App Insights telemetry |
AllowGitHub | * | github.com, *.github.com, raw.githubusercontent.com, codeload.github.com, objects.githubusercontent.com, *.githubusercontent.com | Repo clones, release downloads |
AllowContainerAppsPlatform | * | ACA control-plane/identity FQDNs (*.servicebus.windows.net, *.identity.azure.net, *.azurecontainerapps.io/.dev), Azure Monitor/Log Analytics/App Insights ingestion, CRL/OCSP revocation endpoints, and the Microsoft Foundry Agent Service's agent365.svc.cloud.microsoft observability endpoint | Container Apps managed-identity token fetch, platform diagnostics, TLS certificate revocation checks, and Foundry hosted-agent observability on the AI Foundry Agents subnet (agentSubnetPrefix) |
AllowJumpboxBootstrap | jumpboxSubnetPrefix | Chocolatey, NuGet, VS Installer, download.microsoft.com, aka.ms, go.microsoft.com, *.core.windows.net, *.azureedge.net | choco install, VS Code/PowerShell Core/Azure CLI/AZD MSIs (Python is installed from python.org embeddable zip — see AllowJumpboxDevRuntimes) |
AllowJumpboxDevRuntimes | jumpboxSubnetPrefix | *.python.org, *.pypi.org, *.pythonhosted.org, *.pypa.io, *.npmjs.org | pip install, npm install, jumpbox Python embeddable-zip install + get-pip.py bootstrap |
AllowJumpboxEditors | jumpboxSubnetPrefix | update.code.visualstudio.com, *.vo.msecnd.net, *.vscode-cdn.net | VS Code updates |
AllowJumpboxAcme | jumpboxSubnetPrefix | api.github.com, acme-v02.api.letsencrypt.org | win-acme release discovery + ACME v2 issuance/renewal from jumpbox |
AllowAcrTasks | devopsBuildAgentsSubnetPrefix | *.azurecr.io, *.data.azurecr.io | ACR Tasks agent pool talking to its registry |
Set extendFirewallForJumpboxBootstrap=false to skip the jumpbox-scoped rules when egress is managed centrally by another policy.
The table above lists Application (FQDN) rules. The dedicated ACR Tasks agent pool additionally requires unconditional outbound Network Rules (service tags, not FQDNs) for its own platform bootstrap traffic — this is a requirement of the agent pool control plane itself, independent of what a build script does. When networkIsolation, deployAzureFirewall, and deployAcrTaskAgentPool are all enabled, the landing zone adds a AllowAcrTaskAgentPoolPlatform Network Rule Collection scoped to devopsBuildAgentsSubnetPrefix, allowing outbound TCP 443 to AzureKeyVault, Storage, EventHub, and AzureActiveDirectory, and TCP 443/12000 to AzureMonitor, matching the documented ACR Tasks agent pool network requirements. Without these Network Rules the agent pool fails to provision when VNet-injected (see Azure/GPT-RAG#597).
The following flags support azd env set / ${VAR=default} overrides, in addition to editing main.parameters.json directly. All default to true (unchanged prior behavior):
| Parameter | Env var | Purpose |
|---|---|---|
deployCosmosDb | DEPLOY_COSMOS_DB | Azure Cosmos DB account for globally distributed NoSQL data storage. |
deployContainerApps | DEPLOY_CONTAINER_APPS | Azure Container Apps for running your microservices. |
deployContainerRegistry | DEPLOY_CONTAINER_REGISTRY | Azure Container Registry for Docker container images. |
deployContainerEnv | DEPLOY_CONTAINER_ENV | The Container Apps environment (log ingestion, VNet integration, etc.). |
deployNsgs | DEPLOY_NSGS | Network security groups. |
azd env set DEPLOY_CONTAINER_APPS false
Use only true or false (case-insensitive). Container Apps require the Container Apps Environment; environment-only deployment is supported. Container App API keys additionally require Container Apps, Key Vault, App Configuration, and appRuntimeConfigurationMode=appConfig. In a network-isolated deployment that updates subnets in an existing VNet, NSGs cannot be disabled because doing so would detach existing subnet NSG associations.
These flags select resources for the next incremental deployment. Setting a flag to false does not delete an existing resource or stale App Configuration key created by an earlier deployment; remove decommissioned artifacts explicitly.
deployAiFoundry controls the base AI Foundry account, project, and model deployments. deployAAfAgentSvc controls the Agent Service Standard Setup and its associated AI Search, Storage, Cosmos DB, and Key Vault resources. deploySearchService controls only the workload/RAG Azure AI Search service used by applications.
| Scenario | Parameters |
|---|---|
| Full Foundry Agent Service setup | deployAiFoundry=true, deployAAfAgentSvc=true |
| Foundry inference-only | deployAiFoundry=true, deployAAfAgentSvc=false |
| Workload Search only | deploySearchService=true, independent of deployAAfAgentSvc |
| No Foundry resources | deployAiFoundry=false |
Use DEPLOY_AAF_AGENT_SVC=false when an external app only needs hosted model inference from Foundry and does not need Agent Service capability hosts or their associated state resources.
aiFoundryDisableLocalAuth / AI_FOUNDRY_DISABLE_LOCAL_AUTH controls whether the AI Foundry account accepts API-key authentication. It defaults to true (local auth disabled, Azure AD-only), matching the account's prior inert default. Set AI_FOUNDRY_DISABLE_LOCAL_AUTH=false only if API-key auth is explicitly required.
Hosted-agent infrastructure uses two additive, accelerator-neutral phases:
- prepareHostedAgent=true provisions the shared prerequisites and exposes the project, registry, network, and private-build handoff before an image or digest exists. It does not request agent deployment. - deployHostedAgent=true implies preparation and additionally enables the typed agent payload. It continues to require an immutable sha256:<64 lowercase hex characters> image digest.
Both flags default to false, so existing parameter files and deployments remain unchanged. The flags are not workload topology switches: they do not create an application UI or replacement workload, and they do not modify containerAppsList, Cosmos DB, Storage, Search, App Configuration, or any other existing workload resource.
prepareHostedAgent | deployHostedAgent | Prerequisite RBAC and handoff | Agent payload |
|---|---|---|---|
false | false | Disabled | Disabled |
true | false | Enabled | Disabled; no image digest required |
false | true | Enabled | Enabled; immutable digest required |
true | true | Enabled | Enabled; immutable digest required |
When either flag is enabled, the landing zone adds only:
- Foundry Project Manager for the deployment principal on the Foundry project; - the registry-mode-compatible pull role for the Foundry project managed identity on the selected registry (AcrPull for RBAC-only registries or Container Registry Repository Reader for ABAC-enabled registries); and - a typed output handoff containing the project, registry, agent subnet, and private-build context. Image, startup command, runtime, and protocol values are added only when deployment is requested.
The downstream azure.ai.agent service remains responsible for azd deploy. That data-plane operation creates the immutable agent version, dedicated per-agent identity, invocation endpoint, and the agent identity's registry pull assignment. azure.ai.agent is an azd deployment contract rather than an ARM resource type, so this Bicep template intentionally does not fabricate an agent resource or deployment script. See the official hosted-agent azure.yaml reference and pre-built image workflow.
The typed hostedAgent object is sealed and deliberately has no roles field. Arbitrary role names are rejected by preflight rather than silently ignored. After azd deploy creates the dedicated agent identity, the accelerator must assign explicit least-privilege role definition IDs for any external resources that identity needs.
| Parameter | Default | Purpose |
|---|---|---|
prepareHostedAgent | false | Enables prerequisite RBAC and project/registry/private-build outputs without requiring an image or enabling the agent payload. |
deployHostedAgent | false | Implies preparation and enables the downstream agent deployment payload. |
hostedAgent.name | empty | Stable hosted-agent name; downstream deploys create immutable versions under this name. |
hostedAgent.image | empty | Repository path inside the selected ACR, without tag or digest. |
hostedAgent.version | empty | Required only when deployHostedAgent=true; must be an immutable OCI digest in sha256:<64 lowercase hex> form. |
hostedAgent.startupCommand | empty | Optional container startup command, mapped to startupCommand in azure.ai.agent. |
hostedAgent.runtime | 1 CPU, 1Gi | CPU (0.25–4.0) and memory (0.5Gi–8Gi) mapped to container.resources. |
hostedAgent.protocols | Responses 2.0.0 | Typed responses, invocations, invocations_ws, or a2a contracts. |
hostedAgentContainerRegistryResourceId | empty | Existing ACR resource ID when deployContainerRegistry=false. |
hostedAgentContainerRegistryEndpoint | empty | Existing ACR login endpoint when deployContainerRegistry=false. |
hostedAgentContainerRegistryRoleAssignmentMode | rbac | Existing ACR permissions mode: rbac uses AcrPull; rbac-abac uses Container Registry Repository Reader. Ignored for the landing-zone registry, which is RBAC-only. |
For a fresh deployment, provision the prerequisites first:
azd env set PREPARE_HOSTED_AGENT true
azd env set DEPLOY_HOSTED_AGENT false
azd provision
At this point HOSTED_AGENT_PREPARED=true, HOSTED_AGENT_DEPLOYMENT.enabled=false, and HOSTED_AGENT_DEPLOYMENT.agent=null. The exact Foundry and registry outputs are available so a separate pipeline or VNet-connected build path can build, scan, sign, push, and resolve the immutable digest.
After the image exists, enable deployment intent and pin that digest:
azd env set DEPLOY_HOSTED_AGENT true
azd env set HOSTED_AGENT_NAME sample-agent
azd env set HOSTED_AGENT_IMAGE agents/sample-agent
azd env set HOSTED_AGENT_IMAGE_VERSION sha256:<64-hex-digest>
azd env set HOSTED_AGENT_STARTUP_COMMAND "python main.py"
azd provision
PREPARE_HOSTED_AGENT may remain true or be reset to false; DEPLOY_HOSTED_AGENT=true is always a superset.
After provisioning, map HOSTED_AGENT_DEPLOYMENT (or the exact Foundry and ACR outputs) into the accelerator's azure.ai.agent service and run azd deploy from that accelerator. Preflight rejects mutable image tags and missing Foundry or registry prerequisites. It validates the canonical digest syntax but does not query the registry for manifest existence or signature authenticity; keep those checks in the image build, scan, signing, and promotion pipeline.
Private registry: the landing-zone ACR retains its existing Zero Trust behavior: Premium SKU, private endpoint and DNS integration, and disabled public network access when networkIsolation=true. Building or pushing an image in that mode must happen from a VNet-connected runner, build agent, or jumpbox. Set DEPLOY_ACR_TASK_AGENT_POOL=true when using the landing-zone VNet-injected ACR Tasks pool; its subnet, firewall, private endpoint, and DNS topology remain independently controlled by the existing registry/isolation/pool flags. For an existing ACR, set HOSTED_AGENT_CONTAINER_REGISTRY_ROLE_ASSIGNMENT_MODE=rbac-abac when its role assignment permissions mode is RBAC Registry + ABAC Repository Permissions; the default rbac mode is correct for RBAC Registry Permissions. Its private endpoint, DNS, authentication-as-ARM policy, and network reachability remain the consumer's responsibility. Microsoft currently documents private ACR support for Foundry projects created after June 25, 2026; projects created earlier require the registry to remain reachable over its public endpoint. Verify this platform limitation before a live deployment. See private ACR deployment and RBAC and hosted-agent permissions.
| Output | Description |
|---|---|
DEPLOY_HOSTED_AGENT | Deployment intent; remains false in prepare-only mode. |
HOSTED_AGENT_PREPARED | Effective prerequisite enablement (prepareHostedAgent || deployHostedAgent). It does not claim an agent version exists. |
AZURE_AI_PROJECT_RESOURCE_ID / AZURE_AI_PROJECT_ENDPOINT | Exact Foundry project handoff in prepare and deploy modes. |
AZURE_CONTAINER_REGISTRY_RESOURCE_ID / AZURE_CONTAINER_REGISTRY_ENDPOINT | Exact selected-registry handoff in prepare and deploy modes. |
HOSTED_AGENT_DEPLOYMENT | Consolidated contract. Foundry, registry, network, and private-build values are populated in prepare mode; enabled and agent remain deployment-only. |
The landing zone is workload-agnostic. When a solution accelerator needs its own runtime keys stamped into the App Configuration store, it should not require new typed parameters in this template. Use additionalAppConfigurationSettings to publish any number of extra key-values verbatim:
module ailz 'br/public:avm/ptn/aiml/ai-landing-zone:<version>' = {
params: {
// ...
additionalAppConfigurationSettings: [
{ name: 'MY_WORKLOAD_FLAG', value: 'true' }
{ name: 'MY_WORKLOAD_MODE', value: 'hybrid', label: 'prod' }
]
}
}
Each entry accepts name (required), value (required), label (optional, defaults to appConfigLabel), and contentType (optional, defaults to text/plain). Rules and limits:
- Values are stored in plaintext. Do not pass secrets, connection strings, or keys through this parameter. Use Key Vault references for sensitive data. - Each name + label pair must be unique. If an entry collides with a built-in setting the passthrough value wins (the built-in entry is dropped), so an accelerator can also override a stamped default when it needs to. - App Configuration is only populated on non-network-isolated deployments where the runtime config store is App Configuration. In isolated deployments the post-provision step running on the jumpbox is responsible for stamping config, so pass workload keys through that path instead. - When the consumer selects the containerEnv runtime mode (Issue #89) instead of App Configuration, the same entries are injected into every Container App as environment variables. Only name and value are used in that mode (label and contentType are ignored, since env vars have neither), and the same "passthrough wins on collision" precedence applies.
This is the forward-looking way to configure workload settings such as the GPT-RAG Foundry IQ keys below: accelerators publish their own keys through the passthrough instead of the landing zone growing workload-specific parameters.
Issue #49. The landing zone provisions the Container Apps environment in internal mode under network isolation, so its apps are unreachable from the public Internet by default. Some workloads need a controlled, audited public entry point (a tester, a partner integration, a public demo). The optional publicIngress feature deploys an Application Gateway WAF v2 in front of the internal ACA environment without changing any of the existing internal topology.
⚠️ Cost warning. Enabling this feature deploys WAF_v2 + a Standard Public IP, which incur hourly charges even when idle (~USD 240/month for the gateway alone, region-dependent). KeeppublicIngress.enabled = falseunless actively needed and tear the stack down withazd down(or delete the resources manually) when the access window ends. SettingpublicIngress.enabledback tofalseafter a deploy will NOT delete the resources —azd/ARM incremental deployments only stop managing them.
Default state: disabled. No public-ingress resources are provisioned.
Parameter contract (publicIngressType exported from main.bicep):
publicIngress: {
enabled: bool // master toggle, default false
backendAppIndex: int? // index into containerAppsList; default 0
frontendHostName: string? // e.g., 'app.contoso.com' — required to activate HTTPS
sslCertSecretId: string? // versionless Key Vault secret URI — required to activate HTTPS
allowedSourceAddressPrefixes: string[]? // CIDRs allowed to reach :443; empty list = deny-all
wafMode: ('Prevention' | 'Detection')? // default 'Prevention'
wafCustomRules: object[]? // merged with OWASP CRS 3.2 managed ruleset
capacity: object? // default { minCapacity: 0, maxCapacity: 2 }
sslPolicy: object? // default Azure baseline
}
Resources deployed when enabled = true (only effective with networkIsolation, deployContainerEnv, and at least one entry in containerAppsList):
| Resource | Purpose |
|---|---|
Microsoft.Network/networkSecurityGroups (nsg-<vnet>-AppGatewaySubnet) | Deny-all inbound except GatewayManager (65200-65535) and AzureLoadBalancer. Adds an AllowHttpsFromAllowedSources rule on TCP/443 only when allowedSourceAddressPrefixes is non-empty. **Port 80 is never opened from the Internet.** |
Microsoft.Network/publicIPAddresses | Standard SKU, Static, zone-redundant when useZoneRedundancy=true. |
Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies | OWASP CRS 3.2, mode Prevention (or Detection), wafCustomRules merged in. |
Microsoft.ManagedIdentity/userAssignedIdentities | Dedicated UAI for the gateway. |
Microsoft.Authorization/roleAssignments (Key Vault Secrets User) | Granted to the AGW UAI on the landing-zone Key Vault when deployKeyVault=true. External Key Vaults must be granted manually. |
Microsoft.Network/applicationGateways | WAF_v2 SKU, autoscale 0..2, zone-redundant, attached to the existing AppGatewaySubnet (192.168.3.0/27). Backend pool targets the Container App's internal FQDN over HTTPS:443 with pickHostNameFromBackendAddress=true. |
| Diagnostic settings | Streamed to the existing Log Analytics workspace (allLogs + AllMetrics). |
Two operational states:
1. Skeleton mode (enabled=true and either sslCertSecretId or frontendHostName empty) - Gateway exists with a single HTTP:80 listener routed to the backend. - NSG denies all Internet inbound (port 80 is never opened by the NSG). - The skeleton is inert: no client can reach it from the Internet until the operator transitions to live mode.
2. Live mode (enabled=true with both sslCertSecretId and frontendHostName set, plus allowedSourceAddressPrefixes non-empty) - HTTPS:443 listener using the Key Vault certificate (the AGW UAI reads it via Key Vault Secrets User). - HTTP:80 becomes a permanent HTTP→HTTPS redirect. - NSG allows TCP/443 from the supplied source CIDRs only.
Post-deploy runbook (provider-agnostic DNS + jumpbox ACME):
1. Workstation (DNS provider side): choose your DNS provider/registrar and prepare your hostname (example: app.contoso.com). No provider-specific integration is required in this landing zone. 2. Jumpbox (certificate issuance/import side): use the built-in ACME client installed by install.ps1 at C:\tools\win-acme\wacs.exe (DNS-01 flow), then import the resulting certificate into the landing-zone Key Vault. The jumpbox MI has Key Vault Certificates Officer for this workflow. 3. Workstation (DNS provider side): create/update the public DNS A record for the hostname pointing at PUBLIC_INGRESS_PUBLIC_IP (deployment output). 4. Capture the versionless Key Vault secret URI for the certificate (https://<kv>.vault.azure.net/secrets/<name>), then set operator parameters in main.parameters.json (or via azd env set followed by an edit since publicIngress is an aggregate object):
"publicIngress": {
"value": {
"enabled": true,
"frontendHostName": "app.contoso.com",
"sslCertSecretId": "https://<kv>.vault.azure.net/secrets/<name>",
"allowedSourceAddressPrefixes": ["203.0.113.0/24"]
}
}
5. Run azd provision again. The HTTPS listener, redirect rule, and NSG allow rule are now in place. 6. Validate end-to-end: curl -v https://app.contoso.com/ should return the Container App's response; curl -v http://app.contoso.com/ should redirect to HTTPS.
Teardown: run azd down to remove the entire deployment, or delete the gateway/PIP/WAF policy/NSG/UAI manually. As stated above, flipping enabled back to false and re-provisioning will not delete the resources due to ARM incremental deployment semantics.
Outputs surfaced by main.bicep:
| Output | Description |
|---|---|
PUBLIC_INGRESS_ENABLED | Whether the stack was effectively deployed (also requires networkIsolation + deployContainerEnv + non-empty containerAppsList). |
PUBLIC_INGRESS_PUBLIC_IP | The gateway's public IPv4 address (point your DNS A record at this). |
PUBLIC_INGRESS_GATEWAY_RESOURCE_ID | Application Gateway resource ID. |
PUBLIC_INGRESS_NSG_RESOURCE_ID | NSG attached to the AGW subnet. |
PUBLIC_INGRESS_WAF_POLICY_RESOURCE_ID | WAF policy resource ID (for adding custom rules outside the template). |
PUBLIC_INGRESS_IDENTITY_PRINCIPAL_ID | Principal ID of the AGW UAI (use to grant access to external Key Vaults). |
PUBLIC_INGRESS_LIVE | true only when both sslCertSecretId and frontendHostName are set (live mode). |
In addition, the landing zone now surfaces a small set of outputs that consumers (and this module) depend on: APP_GATEWAY_SUBNET_RESOURCE_ID, VNET_RESOURCE_ID, KEY_VAULT_RESOURCE_ID, KEY_VAULT_NAME, LOG_ANALYTICS_RESOURCE_ID, and CONTAINER_APP_INTERNAL_FQDN.
高质量的AI工作流项目
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,bicep-ptn-aiml-landing-zone Agent工作流 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | bicep-ptn-aiml-landing-zone |
| 原始描述 | 开源AI工作流:AI Landing Zone Bicep templates for deploying a secure, modular baseline for AI 。⭐9 · Bicep |
| Topics | AIBicepLanding Zone |
| GitHub | https://github.com/Azure/bicep-ptn-aiml-landing-zone |
| License | MIT |
| 语言 | Bicep |
收录时间:2026-05-30 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端