-
Notifications
You must be signed in to change notification settings - Fork 449
The library Module usage
CARMLPipelinePrincipal edited this page Mar 11, 2022
·
11 revisions
This section provides a guideline on how to use the CARML Bicep modules.
This section shows you how to deploy a Bicep template.
This sub-section gives you an example on how to deploy a template from your local drive.
This example targets a resource group level template.
New-AzResourceGroup -Name 'ExampleGroup' -Location "Central US"
$inputObject = @{
DeploymentName = 'ExampleDeployment'
ResourceGroupName = 'ExampleGroup'
TemplateFile = "$home\ResourceModules\arm\Microsoft.KeyVault\vault\deploy.bicep"
}
New-AzResourceGroupDeployment @inputObject
This example targets a resource group level template.
az group create --name 'ExampleGroup' --location "Central US"
$inputObject = @(
'--name', 'ExampleDeployment',
'--resource-group', 'ExampleGroup',
'--template-file', "$home\ResourceModules\arm\Microsoft.KeyVault\vault\deploy.bicep",
'--parameters', 'storageAccountType=Standard_GRS',
)
az deployment group create @inputObject
This section gives you an example on how to deploy a template that is stored at a publicly available remote location.
New-AzResourceGroup -Name 'ExampleGroup' -Location "Central US"
$inputObject = @{
DeploymentName = 'ExampleDeployment'
ResourceGroupName = 'ExampleGroup'
TemplateUri = 'https://raw.githubusercontent.com/Azure/ResourceModules/main/arm/Microsoft.KeyVault/vaults/deploy.bicep'
}
New-AzResourceGroupDeployment @inputObject
az group create --name 'ExampleGroup' --location "Central US"
$inputObject = @(
'--name', 'ExampleDeployment',
'--resource-group', 'ExampleGroup',
'--template-uri', 'https://raw.githubusercontent.com/Azure/ResourceModules/main/arm/Microsoft.KeyVault/vaults/deploy.bicep',
'--parameters', 'storageAccountType=Standard_GRS',
)
az deployment group create @inputObject
If you're interested on how to build a solution from the modules, please refer to the corresponding 'Solution creation' section.