返回顶部
a

azure-bicep-deployAzure Bicep部署

Deploy and validate Azure Bicep files and ARM templates. Use for: (1) Deploying Bicep (.bicep) or ARM (JSON) templates to Azure, (2) Validating Bicep/ARM templates for syntax errors, (3) Creating Azure resources via Bicep, (4) Managing multi-environment deployments (dev/staging/prod) via parameters. Supports Azure Container Apps commonly used workloads. Prerequisites: Azure CLI (az) installed, Azure CLI authenticated (az login), Bicep CLI installed (az bicep install), appropriate Azure subscript

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.1.0
安全检测
已通过
315
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

azure-bicep-deploy

Azure Bicep 部署

前提条件(必需)

使用此技能前,请确保:

  1. 1. 已安装 Azure CLI
bash az --version

安装地址:https://docs.microsoft.com/cli/azure/install-azure-cli

  1. 2. 已认证 Azure CLI
bash az login # 交互式登录 az login --tenant <租户ID> # 指定租户 az account show # 验证登录状态
  1. 3. 已选择正确的订阅(如有多个)
bash az account list # 列出订阅 az account set --subscription <订阅ID> # 切换订阅
  1. 4. 已安装 Bicep CLI
bash az bicep install # 安装 Bicep az bicep version # 验证安装

或使用内置功能:az deployment group create 会自动编译 Bicep

部署 Bicep 文件

bash
az deployment group create \
--resource-group <资源组名称> \
--template-file \
--parameters <参数文件>.json

部署 ARM 模板

bash
az deployment group create \
--resource-group <资源组名称> \
--template-file .json \
--parameters <参数文件>.json

验证模板(假设部署)

bash
az deployment group what-if \
--resource-group <资源组名称> \
--template-file

仅验证语法(Bicep)

bash
az bicep build --file

多环境部署

为每个环境使用参数文件:

params/
├── dev.bicepparam # 或 dev.json
├── staging.bicepparam # 或 staging.json
└── prod.bicepparam # 或 prod.json

按环境部署:

bash
az deployment group create \
--resource-group <资源组>-dev \
--template-file main.bicep \
--parameters @params/dev.json

Azure 容器应用

有关详细的容器应用模式,请参阅 references/container-apps.md,包括:

  • - 基本容器部署
  • 入口配置
  • 缩放规则
  • 修订/版本

创建新资源

当需要通过 Bicep 创建 Azure 资源时:

  1. 1. 检查 references/ 中是否有符合需求的现有模板
  2. 对于容器应用:使用 assets/container-app/ 中的示例
  3. 对于其他资源:使用 az bicep build-params --file 生成或参考 Azure 快速入门模板

脚本

从参考资料复制脚本或直接使用:

快速部署(复制粘贴单行命令):
bash
az deployment group create --resource-group <资源组> --template-file main.bicep --parameters @params/dev.json

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 azure-bicep-deploy-1776087184 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 azure-bicep-deploy-1776087184 技能

通过命令行安装

skillhub install azure-bicep-deploy-1776087184

下载

⬇ 下载 azure-bicep-deploy v2.1.0(免费)

文件大小: 7.15 KB | 发布时间: 2026-4-15 11:49

v2.1.0 最新 2026-4-15 11:49
Prerequisites are now clearly detailed section for users.

- Added an explicit "Prerequisites (Required)" section outlining Azure CLI/bicep installation, authentication, and subscription selection steps.
- Moved and expanded prerequisite details from the short description into a new, easy-to-follow setup checklist.
- Improved clarity on Azure CLI commands for login and subscription management.
- No technical or command changes; documentation only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部