{"id":23448719,"url":"https://github.com/unstoppablemango/imaug-2022-bicep","last_synced_at":"2026-02-08T01:31:29.661Z","repository":{"id":40534824,"uuid":"488026544","full_name":"UnstoppableMango/imaug-2022-bicep","owner":"UnstoppableMango","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-04T17:44:50.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T23:33:38.160Z","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/UnstoppableMango.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":"2022-05-03T00:00:45.000Z","updated_at":"2022-05-03T19:22:55.000Z","dependencies_parsed_at":"2025-04-10T02:42:45.210Z","dependency_job_id":"d87eb64d-5797-4fb0-87a8-4e449c850fae","html_url":"https://github.com/UnstoppableMango/imaug-2022-bicep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UnstoppableMango/imaug-2022-bicep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnstoppableMango%2Fimaug-2022-bicep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnstoppableMango%2Fimaug-2022-bicep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnstoppableMango%2Fimaug-2022-bicep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnstoppableMango%2Fimaug-2022-bicep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnstoppableMango","download_url":"https://codeload.github.com/UnstoppableMango/imaug-2022-bicep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnstoppableMango%2Fimaug-2022-bicep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29216084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T00:10:47.190Z","status":"ssl_error","status_checked_at":"2026-02-08T00:10:43.589Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-23T22:18:19.742Z","updated_at":"2026-02-08T01:31:29.639Z","avatar_url":"https://github.com/UnstoppableMango.png","language":"Bicep","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iowa Microsoft Azure User Group - Bicep Talk\n\nInfrastructure as code with Bicep and migrating from ARM.\n\nThis talk assumes a loose knowledge of Azure Resource Manager (ARM) templates and Infrastructure as Code (IaC).\n\n## What is Bicep?\n\nBicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources.\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview?tabs=bicep\u003e\n\n## Tooling\n\nThe Bicep CLI is the primary driver for working with `.bicep` files.\nIt can be installed multiple ways, but if you already have the Azure CLI you can install bicep from there.\n\n```shell\naz bicep install\n```\n\nMore installation options can be found in the [docs](https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/install).\n\nTo get the best development experience, use [VSCode](https://code.visualstudio.com/) and install the [Bicep extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep).\nThis will enable syntax highlighting, intellisense, navigation, and linting all in the editor.\n\n## 01 Bicep\n\nBasic syntax and usage.\n\nParameters\n\n```bicep\nparam name string = 'imaug-01'\n```\n\nVariables\n\n```bicep\nvar appName = 'app-imaug-01'\n```\n\nResources\n\n```bicep\nresource app 'Microsoft.Web/sites@2021-03-01' = {\n    // ...\n}\n```\n\nStrings\n\n```bicep\nvar appName = 'app-${name}'\n```\n\nFunctions\n\n```bicep\nparam location string = resourceGroup().location\n```\n\nOutputs\n\n```bicep\noutput appUrl string = myApp.properties.defaultHostName\n```\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/file\u003e\n\n## 02 Conditionals\n\n`if` statements\n\n```bicep\nresource app 'Microsoft.Web/sites@2021-03-01' if (shouldDeploy) {\n    // ...\n}\n```\n\nTernaries\n\n```bicep\nvar name = location == 'eastus2' ? 'in-the-east' : 'not-in-the-east'\n```\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/conditional-resource-deployment\u003e\n\n## 03 Loops\n\nArrays\n\n```bicep\nvar numArray = [\n    1\n    2\n    3\n]\n```\n\nResource loop\n\n```bicep\nresource accounts 'Microsoft.Storage/storageAccounts@2021-08-01' = [for i in numArray: {\n    // ...\n}]\n```\n\nUsing resource arrays\n\n```bicep\nvar accountNames = [for i in numArray: accounts[i].name]\n```\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops\u003e\n\n## 04 Modules\n\nModules\n\n```bicep\nmodule keyVaultDeployment 'key-vault.bicep' = {\n    // ...\n}\n```\n\nModule outputs\n\n```bicep\n// key-vault.bicep\noutput uri string = vault.properties.vaultUri\n\n// azuredeploy.bicep\nvar vaultUri = keyVaultDeployment.outputs.uri\n```\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/modules\u003e\n\nMore recently, bicep has introduced the concept of registries.\nI won't go in depth on them for this talk, but more info can be found in the link below.\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/modules#file-in-registry\u003e\n\n## 05 Linting\n\nBicep comes with a linter and can be used with `bicep build` or the [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep).\nThe default rules at the time of writing are taken from [arm-ttk test cases](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-test-cases).\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter\u003e\n\n## 06 Migrating from ARM\n\nIf you have an existing ARM template, the easiest way to get started migrating to Bicep is using `bicep decompile` on your template.\nThis will generate a `.bicep` file based on your ARM template.\nIt's not a perfect representation, and will more than likely require modification before it can be used a replacemnt, but it's a great starting point especially when you have a large number of resources.\n\n\u003chttps://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate\u003e\n\n## Using this repo\n\nThis repo is primarily used for presenting, but you can deploy the samples if you like.\nChange the name in [rg-name.txt](/rg-name.txt) to the name of your resource group.\n\nMost directories contain a reference bicep file, and an empty azuredeploy bicep file.\nThe `azuredeploy.bicep` file will be used while presenting, with the reference file available in case I screw something up (but can also be deployed).\n\nEach directory also contains a set of helper scripts to setup and tear down resources.\nThese point at the empty `azuredeploy.bicep` files by default.\nYou can either point them at the `reference.bicep` file, or update `azuredeploy.bicep`.\n\nAs always, be sure to verify the contents of the scripts yourself before executing anything!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funstoppablemango%2Fimaug-2022-bicep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funstoppablemango%2Fimaug-2022-bicep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funstoppablemango%2Fimaug-2022-bicep/lists"}