azurecli
/azurecli
Wspiera pracę z Azure CLI: automatyzacja poleceń, zapytania JMESPath, szablony zasobów i skrypty DevOps przy zarządzaniu zasobami chmurowymi.
- Autor
- G1Joshi ↗
- Repozytorium
- Agent-Skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 01.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Wspiera pracę z Azure CLI: automatyzacja poleceń, zapytania JMESPath, szablony zasobów i skrypty DevOps przy zarządzaniu zasobami chmurowymi.
Oryginalny opis (EN)
Expert Azure CLI (az) assistance covering command automation, JMESPath queries, resource templates, and DevOps scripts. Use when scripting Azure management tasks and deploying cloud resources.
Jak działa
- When to Use
- Quick Start
- Core Concepts
- Common Patterns
- Best Practices
- Troubleshooting
- References
Podgląd SKILL.md
---
name: azurecli
description: Expert Azure CLI (az) assistance covering command automation, JMESPath queries, resource templates, and DevOps scripts. Use when scripting Azure management tasks and deploying cloud resources.
---
# Azure CLI (`az`)
The Azure CLI provides cross-platform command-line management for Azure infrastructure, featuring tight integration with Bicep templates and automated cloud provisioning.
## When to Use
- **Automating Azure Cloud Operations**: Scripting resource deployment, role assignments, and monitoring via `az`.
- **CI/CD Azure DevOps & GitHub Actions**: Deploying infrastructure and applications using service principals or OIDC.
- **JMESPath Querying of Azure Resources**: Extracting specific cloud parameters using `--query`.
- **Container Registry & AKS Cluster Management**: Authenticating Docker clients and managing Kubernetes credentials.
## Quick Start
```bash
# Login
az login
# Set Subscription
az account set --subscription "My Subscription"
# Create AKS Cluster
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 1 --generate-ssh-keys
```
## Core Concepts
### Resource Group Creation & Infrastructure Deployment
Deploying resources with Bicep / ARM templates:
```bash
# Set default subscription and location
az account set --subscription "Production-Subscription"
az configure --defaults location=eastus
# Create Resource Group
az group create --name rg-production-platform --location eastus
# Deploy infrastructure via Bicep template
az deployment group create \
--resource-group rg-production-platform \
--template-file main.bicep \
--parameters environment=prod adminEmail=sysadmin@example.com
```
### Querying and Filtering with JMESPath (--query)
Extracting resource properties without installing jq:
```bash
# List all running VMs with their private IPs and OS type
az vm list \
--show-details \
--query "[?powerState=='VM running'].{Name:name, IP:privateIps, OS:osType, Size:hardwareProfile.vmSize}" \
--output table
# Get public IP address of an Application Gateway
APP_GATEWAY_IP=$(az network public-ip show \
--resource-group rg-production-platform \
--name pip-appgw \
--query ipAddress \
--output tsv)
```
### AKS Credential Injection & ACR Authentication
Connecting to container services seamlessly:
```bash
# Log in to Azure Container Registry via native Docker
az acr login --name myproductionacr
# Fetch kubectl credentials for AKS cluster
az aks get-credentials \
--resource-group rg-production-platform \
--name aks-prod-cluster \
--overwrite-existing
```
## Common Patterns
### JMESPath Filtering with TSV Output for Scripting
**Problem**: Parsing complex JSON output in bash scripts without external dependencies like jq.
**Solution**:
Use `--query` with TSV output format:
```bash
# Extract the outbound IP addresses of an App Service as space-separated values
OUTBOUND_IPS=$(az webapp show \
--resource-group rg-production \
--name my-api-service \
--query "outboundIpAddresses" \
--output tsv)
echo "Allowlist IPs: $OUTBOUND_IPS"
```
## Best Practices
**Do**:
- Authenticate GitHub Actions and pipelines using Workload Identity Federation (OIDC) rather than client secrets.
- Use `--output tsv` with `--query` when capturing single strings into shell variables without quotes.
- Test and validate deployments before execution with `az deployment group what-if`.
- Use `az bicep` directly through the CLI for clean, modular infrastructure-as-code.
**Don't**:
- Use interactive `az login` in automated headless scripts; use Service Principals or Managed Identities.
- Output sensitive keys in plain text; pipe outputs to secure files or masking variables.
- Run long operations synchronously without considering `--no-wait` and `az resource wait`.
## Troubleshooting
| Error | Cause | Solution |
| :--------------------------------------- | :------------------------------------------------------------------ | :---------------------------------------------------------------------- |
| `Please run 'az login' to setup account` | Azure CLI session token expired or not logged in. | Run `az login` or use service principal `az login --service-principal`. |
| `az: error: unrecognized arguments` | Passing parameters with wrong flag syntax or misplaced quotes. | Verify argument names with `az <command> --help`. |
| `Subscription '...' does not exist` | Trying to operate on a subscription not accessible to current user. | List available subscriptions with `az account list --output table`. |
## References
- [Azure CLI Documentation](https://learn.microsoft.com/en-us/cli/azure/)
Wersje
W bazie nie ma innych skilli o nazwie azurecli.
Migawka bazy z 28.10.2026 · wersja paczki 27ea34f2e0b0 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100awscli
Wspiera pracę z AWS CLI: opcje poleceń, profile, zapytania JMESPath (--query) i skrypty automatyzacji, przy odpytywaniu zasobów AWS i automatyzacji wdrożeń. - 100azure-cli
Obsługuje Azure CLI do zarządzania zasobami Azure z terminala: logowanie, grupy zasobów, maszyny wirtualne, konta storage, Function apps, klastry AKS, sieci i zapytania JMESPath. - 100azure-cli
Wyjaśnia składnię i skrypty Azure CLI: uwierzytelnianie, formaty wyjścia, zapytania JMESPath, grupy zasobów, maszyny wirtualne, sieci, Entra ID, AKS, App Service, Functions, bazy danych i Key Vault. - 100azure-devops
Pracuje z repozytoriami, pull requestami i API Azure DevOps przez zmienną środowiskową AZURE_DEVOPS_TOKEN. - 100azure-devops
Pracuje z repozytoriami, pull requestami i API Azure DevOps przez zmienną środowiskową AZURE_DEVOPS_TOKEN. - 100azure-resource-management
Zarządza zasobami Azure przez CLI, Portal, Bicep i szablony ARM: provisioning, organizacja i utrzymanie infrastruktury chmurowej.