{"id":20981747,"url":"https://github.com/psharpx/bicep-labs","last_synced_at":"2026-03-16T22:34:49.299Z","repository":{"id":198363621,"uuid":"700631981","full_name":"pSharpX/bicep-labs","owner":"pSharpX","description":"Handy recipes for provisioning azure resources using bicep DSL ","archived":false,"fork":false,"pushed_at":"2023-11-01T14:35:54.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T06:42:26.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pSharpX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T01:22:16.000Z","updated_at":"2023-10-05T03:19:38.000Z","dependencies_parsed_at":"2024-11-19T05:42:01.099Z","dependency_job_id":"67717aca-b6c9-46ea-b6c3-78cd26744735","html_url":"https://github.com/pSharpX/bicep-labs","commit_stats":null,"previous_names":["psharpx/bicep-labs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pSharpX%2Fbicep-labs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pSharpX%2Fbicep-labs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pSharpX%2Fbicep-labs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pSharpX%2Fbicep-labs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pSharpX","download_url":"https://codeload.github.com/pSharpX/bicep-labs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243383694,"owners_count":20282185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T05:40:20.490Z","updated_at":"2025-12-29T22:21:44.955Z","avatar_url":"https://github.com/pSharpX.png","language":"Bicep","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Bicep Labs\n\nThis README provides a quick reference for managing Azure resources and deployments using **Azure CLI** with **Bicep**, along with some related Docker commands for testing.  \n\n---\n## 📦 Resource Group Management\n\n### Create a Resource Group  \n```bash\naz group create -g SeniorFitness_rg -l eastus\n```\n\n- `-g → Resource group name (SeniorFitness_rg)`\n- `-l → Location (eastus)`\n\n### Delete a Resource Group\n```bash\naz group delete -g SeniorFitness_rg\n```\n\nWith confirmation prompt:\n```bash\naz group delete -g SeniorFitness_rg --yes\naz group delete -g SeniorFitness_rg -y\n```\nBoth `--yes` and `-y` bypass the confirmation prompt.\n\n## 🚀 Bicep Deployment\n\n### Deploy a Bicep Template\n```bash\naz deployment group create -g SeniorFitness_rg -f main.bicep\n```\n\nWith parameters file:\n```bash\naz deployment group create -g SeniorFitness_rg -f main.bicep -p parameters.json\n```\n\n### Subscription-Level Deployment of a Bicep Template\n```bash\naz deployment sub create --name \"\u003cyour_subscription_name\u003e\" --location eastus --template-file main.bicep --parameters .bicepparam\n```\n```bash\naz deployment sub create -n \"\u003cyour_subscription_name\u003e\" -l eastus -f main.bicep -p .bicepparam\n```\n- `--name` or `-n` → The deployment name\n- `--location` or `-l` → Location (eastus)\n- `--template-file` or `-f` → The path to the bicep file\n- `--parameters` or `-p` → Supply deployment parameter values\n\n## 🔧 Bicep Build \u0026 Compile\nBuild a `.bicep` File → JSON ARM Template\n```bash\naz bicep build --file functions.bicep\n```\nOutput directly to terminal:\n```bash\naz bicep build --file functions.bicep --stdout\n```\n\n## 📝 Bicep Parameters\n\n### Generate Parameters File from Bicep\n```bash\naz bicep build-params --file functions.bicep\n```\n\nPrint to stdout:\n```bash\naz bicep build-params --file functions.bicep --stdout\n```\n\n## 🔄 Other Useful Bicep Commands\n\n### Decompile ARM → Bicep\n```bash\naz bicep decompile\n```\n\n### Generate default .bicepparam file\n```bash\naz bicep generate-params\n```\n\n### Format Bicep code\n```bash\naz bicep format\n```\n\n## 🔍 Deployment Preview\n\n\n### What-If Analysis (Preview changes)\n```bash\naz deployment group what-if -g SeniorFitness_rg -f main.bicep -p prod.bicepparam\n```\n### What-If Analysis Subscription Level (Preview changes)\n```bash\naz deployment sub what-if  -n \"\u003cyour_subscription_name\u003e\" -l eastus -f main.bicep -p .bicepparam\n```\n\n```bash\naz deployment sub create --what-if -n \"\u003cyour_subscription_name\u003e\" -l eastus -f main.bicep -p .bicepparam\n```\n\n### Deployment with Parameters\n```bash\naz deployment group create -n SeniorFitness_rg -f main.bicep -p prod.bicepparam\n```\n\n### Output to .bicepparam file\n```bash\naz deployment group create -n SeniorFitness_rg -f main.bicep -o .bicepparam\n```\n\n## 💻 VM Reference\n\n### List available VM sizes:\n```bash\naz vm list-sizes -l eastus -o table\n```\n\n### List available VM images:\n```bash\naz vm image list --output table\n```\n\n## 🐳 Docker Quick Test\n\n### Run an Nginx container:\n```bash\ndocker run -it --rm -d -p 8080:80 --name web nginx\n```\n- `-it` → interactive terminal\n- `--rm` → auto remove when stopped\n- `-d` → run in background (detached)\n- `-p 8080:80` → map host port 8080 → container port 80\n- `--name web` → container name\n\n## Usefull resources\n- [What is Bicep?](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview?tabs=bicep)\n- [What is infrastructure as code (IaC)?](https://learn.microsoft.com/en-us/devops/deliver/what-is-infrastructure-as-code)\n- [Bicep](https://github.com/Azure/bicep)\n\nThis document serves as a command reference for managing resource groups and deploying resources with Azure Bicep.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsharpx%2Fbicep-labs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsharpx%2Fbicep-labs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsharpx%2Fbicep-labs/lists"}