Skip to main content

azure-cli-safe

Safe non-interactive Azure CLI operations with guardrails

소스 정보

저장소
Insightpulseai/odoo
최근 소스 활동
2026년 3월 24일 20:24
감지된 SKILL.md 언어
영어
스타
6
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
6 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
azure-cli-safe
description
Safe non-interactive Azure CLI operations with guardrails
microsoft_capability_family
Azure / CLI / Resource Management
# Azure CLI Safe Skill ## Purpose Interact with Azure resources through the `az` CLI in non-interactive mode. Specialized for Container Apps, ACR, and Key Vault operations in the IPAI Odoo stack. ## Preconditions - `az` CLI installed - Logged in via `az login` or OIDC (`az account show` succeeds) - Subscription set (`AZURE_SUBSCRIPTION_ID` or `az account set`) - Target resource group exists ## Critical lesson: REST-first for Container App Jobs **Problem**: `az containerapp create --args "odoo --db_host ..."` fails because Azure CLI's argument parser consumes `--` prefixed flags meant for the container. Multiple workarounds failed: `--command`, YAML escaping, base64 encoding. **Solution**: Use `az rest --method PUT` with the ARM REST API for Container App Job create/update/start operations. The REST API accepts JSON bodies where container commands and args are properly isolated from CLI argument parsing. **Rule**: Any operation that passes `--` prefixed arguments to a container must use `az rest`, not `az containerapp`. ## Allowed operations ### Read-only - `az containerapp show` - `az containerapp list` - `az containerapp logs show` - `az containerapp job show` - `az containerapp job execution show` - `az containerapp job execution list` - `az acr show` - `az acr repository list` - `az keyvault secret show` (metadata only — value via `--query value`) - `az group show` - `az deployment group show` ### Controlled write - `az containerapp update --image` (image swap) - `az containerapp job start` (trigger existing job) - `az acr build` (build + push image) - `az rest --method PUT` (Container App Job create/update) - `az role assignment create` (grant AcrPull to managed identity) ### Health/verification - `curl -s https://<fqdn>/web/health` (Container App health) - `az containerapp job execution show --query status` (job completion) ## Disallowed operations - `az containerapp exec` — requires TTY, not skill-compatible - `az ssh` — interactive, requires TTY - `az serial-console` — interactive - `az group delete` — broad destructive, requires explicit approval - `az containerapp delete` — destructive without `--yes` - `az ad sp create-for-rbac` — bootstrap only, not runtime - `az login` — bootstrap only - Any command writing secrets to files ## Output contract - All queries use `-o json` (forced by wrapper) - Job status polling returns structured: `{ "status": "Succeeded|Failed|Running" }` - Health checks return HTTP status code ## Verification contract ```bash # After image update: FQDN=$(az containerapp show -n <app> -g <rg> --query "properties.configuration.ingress.fqdn" -o tsv) curl -sf "https://${FQDN}/web/health" # After job execution: az containerapp job execution show -n <job> -g <rg> \ --job-execution-name <exec> --query "properties.status" -o tsv # Expected: "Succeeded" ```
GitHub에서 보기