Fundamentals of Bicep

Tags: migration best practices bicep Cloud
Installation on Mac
-
Use home brew to install bicep
brew install bicep
-
Use home brew to install powershell
brew install --cask powershell
OUTPUT
==> Auto-updating Homebrew... Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> New Formulae cot cspell fastly pkl-lsp sitefetch ==> New Casks font-aporetic istatistica-core obscura-vpn pdl You have 38 outdated formulae and 2 outdated casks installed. Warning: Not upgrading powershell, the latest version is already installed Warning: You are using macOS 12. We (and Apple) do not provide support for this old version. It is expected behaviour that some formulae will fail to build in this old version. It is expected behaviour that Homebrew will be buggy and slow. Do not create any issues about this on Homebrew's GitHub repositories. Do not create any issues even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help in Homebrew's discussions but are unlikely to receive a response. Try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it.
- start a powershell session
pwsh
```bash PowerShell 7.5.0 PS /Volumes/Data/donsantmajor/code/github.com/dsantmajor/Learn/bicepLearn> ` ```
How to create a simple bicep template
In vscode or any editor / ide creat a file with an extension ending in bicep
example
\\ main.bicep
resource storageAcc 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: 'stbiceplessonsdev'
location: 'australiaeast'
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
}
resource storageblob 'Microsoft.Storage/storageAccounts/blobServices@' = [for item in list: {
}]
TIPS
-
Using the bicep extension in vscode with some resources you can type the = space and you will get the required-properties , when you click on it it will populate your template with all the required properties. as seen below.