Skip to content

Instantly share code, notes, and snippets.

@rbnmk
Last active September 25, 2020 05:47
Show Gist options
  • Save rbnmk/3b0b18bdbf88654969bdc2a17b075d50 to your computer and use it in GitHub Desktop.
Save rbnmk/3b0b18bdbf88654969bdc2a17b075d50 to your computer and use it in GitHub Desktop.
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
serviceConnectionName: ### EDIT THE NAME HERE ###
###
### This task publishes the Blueprint in Azure on the Subscription level
###
steps:
- task: nepeters.azure-blueprints.CreateBlueprint.CreateBlueprint@1
displayName: 'Create Azure Monitor Blueprint'
inputs:
azureSubscription: $(serviceConnectionName)
BlueprintName: 'AzureMonitorBlueprint' # This will be the Blueprint name in the Azure Portal
BlueprintPath: 'AzureMonitor' # This is the folder that contains the blueprint.json file
IncludeSubFolders: true # This enabled you to organize the blueprint artifacts a bit by using subfolders
PublishBlueprint: true # This will publish the blueprint and make it ready for assignment
ChangeNote: 'Updated blueprint artifacts and settings.'
###
### This task assigns the Blueprint on Subscription Level
###
- task: nepeters.azure-blueprints.AssignBlueprint.AssignBlueprint@1
displayName: 'Assign Azure Monitor Blueprint'
inputs:
azureSubscription: $(serviceConnectionName)
AssignmentName: 'AzureMonitorAssignment' # This will be the name of the assigned blueprint in the Azure Portal
BlueprintName: 'AzureMonitorBlueprint' # This is the name of an already published blueprint
ParametersFile: 'AzureMonitor/assign/assignment.json' # This is the parameter file for deploying the blueprint
Wait: true
StopOnFailure: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment