forked from Azure/azure-quickstart-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazuredeploy.json
113 lines (113 loc) · 3.88 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"$schema": "http://schemas.microsoft.org/azure/deploymentTemplate?api-version=2015-01-01-preview#",
"contentVersion": "1.0",
"parameters": {
"accountName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Automation account to deploy to."
}
},
"credentialName": {
"type": "string",
"defaultValue": "DefaultAzureCredential",
"metadata": {
"description": "DefaultAzureCredential is the name of the Automation credential used in this runbook. This credential allows you to authenticate to Azure. "
}
},
"userName": {
"type": "string",
"metadata": {
"description": "The username for the Azure Automation credential."
}
},
"password": {
"type": "securestring",
"metadata": {
"description": "The password for the Azure Automation credential."
}
},
"jobId": {
"type": "string",
"metadata": {
"description": "The GUID for the runbook job to be started."
}
}
},
"variables": {
"runbookName": "Get-AzureVMTutorial",
"scriptUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
"runbookDescription": "Authenticates to Azure and lists all the Azure V1 VMs",
"sku": "Free"
},
"resources": [
{
"name": "[parameters('accountName')]",
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [ ],
"tags": { },
"properties": {
"sku": {
"name": "[variables('sku')]"
}
},
"resources": [
{
"name": "[variables('runbookName')]",
"type": "runbooks",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'))]"
],
"tags": { },
"properties": {
"runbookType": "Script",
"logProgress": "false",
"logVerbose": "false",
"description": "[variables('runbookDescription')]",
"publishContentLink": {
"uri": "[variables('scriptUri')]",
"version": "1.0.0.0"
}
}
},
{
"name": "[parameters('credentialName')]",
"type": "credentials",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'))]"
],
"tags": { },
"properties": {
"userName": "[parameters('userName')]",
"password": "[parameters('password')]"
}
},
{
"name": "[parameters('jobId')]",
"type": "jobs",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'), '/runbooks/',variables('runbookName'))]"
],
"tags": {
"key": "value"
},
"properties": {
"runbook": {
"name": "[variables('runbookName')]"
}
}
}
]
}
],
"outputs": {}
}