Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions exercises/bicep-sample-structure.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//Parameters
@minLength(3)
@maxLength(11)
param storagePrefix string

param storageSKU string = 'Standard_LRS'
param location string = resourceGroup().location

//Variables
var uniqueStorageName = '${storagePrefix}${uniqueString(resourceGroup().id)}'

//Resources
resource stg 'Microsoft.Storage/storageAccounts@2019-04-01' = {
name: uniqueStorageName
location: location
sku: {
name: storageSKU
}
kind: 'StorageV2'
properties: {
supportsHttpsTrafficOnly: true
}

//Child
resource service 'fileServices' = {
name: 'default'

//Nested child
resource share 'shares' = {
name: 'exampleshare'
}
}
}

//Alternative parent syntax
resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
name: 'examplestorage'
location: resourceGroup().location
kind: 'StorageV2'
sku: {
name: 'Standard_LRS'
}
}

resource service 'Microsoft.Storage/storageAccounts/fileServices@2023-04-01' = {
name: 'default'
parent: storage
}

resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2023-04-01' = {
name: 'exampleshare'
parent: service
}

//Modules
module webModule './webApp.bicep' = {
name: 'webDeploy'
params: {
skuName: 'S1'
location: location
}
}

//Output
output storageEndpoint object = stg.properties.primaryEndpoints
Binary file added presentations/session 9 - IaC.pdf
Binary file not shown.
7 changes: 6 additions & 1 deletion schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ You can take as many assessments as you'd like.
1. end to end tests

## Session 9, Infrastructure as Code<p/>Nov 12, 2024

- Infrastructure as Code
- ARM / BICEP
- Powershell DSC
- Configuration management
- Azure Automation
- Artifact feeds
## Session 10, Security and compliance<p/>Nov 19, 2024

<details>
Expand Down