-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathtask.json
347 lines (347 loc) · 20.6 KB
/
task.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
{
"id": "94A74903-F93F-4075-884F-DC11F34058B4",
"name": "AzureResourceManagerTemplateDeployment",
"friendlyName": "ARM template deployment",
"description": "Deploy an Azure Resource Manager (ARM) template to all the deployment scopes",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment",
"helpMarkDown": "[Learn more about this task](https://aka.ms/armtaskreadme)",
"category": "Deploy",
"releaseNotes": "- Added support for bicepparam.",
"visibility": [
"Build",
"Release"
],
"author": "Microsoft Corporation",
"version": {
"Major": 3,
"Minor": 254,
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "2.119.1",
"groups": [
{
"name": "AzureDetails",
"displayName": "Azure Details",
"isExpanded": true
},
{
"name": "Template",
"displayName": "Template",
"isExpanded": true,
"visibleRule": "action = Create Or Update Resource Group || deploymentScope != Resource Group"
},
{
"name": "Advanced",
"displayName": "Advanced",
"isExpanded": true,
"visibleRule": "action = Create Or Update Resource Group || deploymentScope != Resource Group"
}
],
"inputs": [
{
"name": "deploymentScope",
"type": "pickList",
"label": "Deployment scope",
"defaultValue": "Resource Group",
"required": "true",
"groupName": "AzureDetails",
"helpMarkDown": "Deployment scope of the deployment. To know more abour deployment scopes, refer this [link](https://docs.microsoft.com/bs-latn-ba/Azure/azure-resource-manager/resource-group-template-deploy-rest#deployment-scope)",
"options": {
"Management Group": "Management Group",
"Subscription": "Subscription",
"Resource Group": "Resource Group"
}
},
{
"name": "ConnectedServiceName",
"aliases": [
"azureResourceManagerConnection"
],
"type": "connectedService:AzureRM",
"label": "Azure Resource Manager connection",
"defaultValue": "",
"required": true,
"groupName": "AzureDetails",
"helpMarkDown": "Select the Azure Resource Manager service connection having access to the selected deployment scope.",
"properties": {
"EndpointFilterRule": "ScopeLevel >= deploymentScope"
}
},
{
"name": "subscriptionName",
"aliases": [
"subscriptionId"
],
"type": "pickList",
"label": "Subscription",
"required": true,
"groupName": "AzureDetails",
"helpMarkDown": "Select the Azure subscription",
"properties": {
"EditableOptions": "True"
},
"visibleRule": "deploymentScope != Management Group"
},
{
"name": "action",
"type": "pickList",
"label": "Action",
"defaultValue": "Create Or Update Resource Group",
"required": true,
"groupName": "AzureDetails",
"helpMarkDown": "Action to be performed on the Azure resources or resource group.",
"options": {
"Create Or Update Resource Group": "Create or update resource group",
"DeleteRG": "Delete resource group"
},
"visibleRule": "deploymentScope = Resource Group"
},
{
"name": "resourceGroupName",
"type": "pickList",
"label": "Resource group",
"required": true,
"groupName": "AzureDetails",
"helpMarkDown": "Provide the name of a resource group.",
"properties": {
"EditableOptions": "True"
},
"visibleRule": "deploymentScope = Resource Group"
},
{
"name": "location",
"type": "pickList",
"label": "Location",
"required": true,
"helpMarkDown": "For Resource Group deployment scope: Location for deploying the resource group. If the resource group already exists in the subscription, then this value will be ignored.\n For other deployment scope: Location to store deployment metadata.",
"groupName": "AzureDetails",
"properties": {
"EditableOptions": "True"
},
"visibleRule": "action = Create Or Update Resource Group || deploymentScope != Resource Group"
},
{
"name": "templateLocation",
"type": "pickList",
"label": "Template location",
"required": true,
"defaultValue": "Linked artifact",
"groupName": "Template",
"options": {
"Linked artifact": "Linked artifact",
"URL of the file": "URL of the file"
}
},
{
"name": "csmFileLink",
"type": "string",
"label": "Template link",
"defaultValue": "",
"required": true,
"groupName": "Template",
"helpMarkDown": "Specify the URL of the template file. Example: [https://raw.githubusercontent.com/Azure/...](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json) \n\nTo deploy a template stored in a private storage account, retrieve and include the shared access signature (SAS) token in the URL of the template. Example: `<blob_storage_url>/template.json?<SAStoken>` To upload a template file (or a linked template) to a storage account and generate a SAS token, you could use [Azure file copy](https://aka.ms/azurefilecopyreadme) task or follow the steps using [PowerShell](https://go.microsoft.com/fwlink/?linkid=838080) or [Azure CLI](https://go.microsoft.com/fwlink/?linkid=836911).\n\nTo view the template parameters in a grid, click on “…” next to Override template parameters text box. This feature requires that CORS rules are enabled at the source. If templates are in Azure storage blob, refer to [this](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Cross-Origin-Resource-Sharing--CORS--Support-for-the-Azure-Storage-Services?redirectedfrom=MSDN#understanding-cors-requests) to enable CORS.",
"visibleRule": "templateLocation = URL of the file"
},
{
"name": "csmParametersFileLink",
"type": "string",
"label": "Template parameters link",
"defaultValue": "",
"required": false,
"groupName": "Template",
"helpMarkDown": "Specify the URL of the parameters file. Example: [https://raw.githubusercontent.com/Azure/...](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.parameters.json) \n\nTo use a file stored in a private storage account, retrieve and include the shared access signature (SAS) token in the URL of the template. Example: `<blob_storage_url>/template.json?<SAStoken>` To upload a parameters file to a storage account and generate a SAS token, you could use [Azure file copy](https://aka.ms/azurefilecopyreadme) task or follow the steps using [PowerShell](https://go.microsoft.com/fwlink/?linkid=838080) or [Azure CLI](https://go.microsoft.com/fwlink/?linkid=836911). \n\nTo view the template parameters in a grid, click on “…” next to Override template parameters text box. This feature requires that CORS rules are enabled at the source. If templates are in Azure storage blob, refer to [this](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Cross-Origin-Resource-Sharing--CORS--Support-for-the-Azure-Storage-Services?redirectedfrom=MSDN#understanding-cors-requests) to enable CORS.",
"visibleRule": " templateLocation = URL of the file"
},
{
"name": "csmFile",
"type": "filePath",
"label": "Template",
"defaultValue": "",
"required": true,
"groupName": "Template",
"visibleRule": " templateLocation = Linked artifact",
"helpMarkDown": "Specify the path or a pattern pointing to the Azure Resource Manager template. For more information about the templates see https://aka.ms/azuretemplates. To get started immediately use template https://aka.ms/sampletemplate. 'Linked artifact' also has support for Bicep files when the Azure CLI version > 2.20.0"
},
{
"name": "csmParametersFile",
"type": "filePath",
"label": "Template parameters",
"defaultValue": "",
"required": false,
"groupName": "Template",
"helpMarkDown": "Specify the path or a pattern pointing for the parameters file for the Azure Resource Manager template. 'Linked artifact' also has support for Bicep files when the Azure CLI version > 2.20.0",
"visibleRule": " templateLocation = Linked artifact"
},
{
"name": "overrideParameters",
"type": "multiLine",
"label": "Override template parameters",
"defaultValue": "",
"required": false,
"groupName": "Template",
"helpMarkDown": "To view the template parameters in a grid, click on “…” next to Override Parameters textbox. This feature requires that CORS rules are enabled at the source. If templates are in Azure storage blob, refer to [this](https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Cross-Origin-Resource-Sharing--CORS--Support-for-the-Azure-Storage-Services?redirectedfrom=MSDN#understanding-cors-requests) to enable CORS. Or type the template parameters to override in the textbox. Example, <br>–storageName fabrikam –adminUsername $(vmusername) -adminPassword $(password) –azureKeyVaultName $(fabrikamFibre).<br>If the parameter value you're using has multiple words, enclose them in quotes, even if you're passing them using variables. For example, -name \"parameter value\" -name2 \"$(var)\"<br>To override object type parameters use stringified JSON objects. For example, -options [\"option1\"] -map {\"key1\": \"value1\" }. ",
"properties": {
"editorExtension": "ms.vss-services-azure.azurerg-parameters-grid"
}
},
{
"name": "deploymentMode",
"type": "pickList",
"label": "Deployment mode",
"defaultValue": "Incremental",
"required": true,
"groupName": "Template",
"helpMarkDown": "Refer to [this](https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-modes) for more details. \n\n Incremental mode handles deployments as incremental updates to the resource group. It leaves unchanged resources that exist in the resource group but are not specified in the template. \n\n Complete mode deletes resources that are not in your template. Complete mode takes relatively more time than incremental mode. If the task times out, consider increasing the timeout, or changing the mode to 'Incremental'. \n **[Warning] Complete mode will delete all the existing resources in the resource group that are not specified in the template. Do review if the resource group you're deploying to doesn't contain any necessary resources that are not specified in the template.** \n\n Validate mode enables you to find problems with the template before creating actual resources. Validate mode enables you to find problems with the template before creating actual resources. Please note that this mode will anyways create a resource group even if it does not deploy any resource.\n\n By default, Incremental mode is used.",
"options": {
"Incremental": "Incremental",
"Complete": "Complete",
"Validation": "Validation only"
}
},
{
"name": "deploymentName",
"type": "string",
"label": "Deployment name",
"defaultValue": "",
"required": false,
"groupName": "Advanced",
"helpMarkDown": "Specifies the name of the resource group deployment to create."
},
{
"name": "deploymentOutputs",
"type": "string",
"label": "Deployment outputs",
"required": false,
"defaultValue": "",
"groupName": "Advanced",
"helpMarkDown": "Provide a name for the variable for the output variable which will contain the outputs section of the current deployment object in string format. You can use the “ConvertFrom-Json” PowerShell cmdlet to parse the JSON object and access the individual output values. For more details refer to [this](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureResourceManagerTemplateDeploymentV3#deployment-outputs)"
},
{
"name": "addSpnToEnvironment",
"type": "boolean",
"label": "Access service principal details in override parameters",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Adds service principal id and key of the Azure endpoint you chose to the script's execution environment. You can use these variables: `$servicePrincipalId` and `$servicePrincipalKey` in your override parameters like `-key $servicePrincipalKey`",
"groupName": "Advanced"
},
{
"name": "useWithoutJSON",
"type": "boolean",
"label": "Use individual output values without JSON.Stringify applied",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Individual output values are being converted via JSON.Stringify by default. If you want to use the output values as it is without converting them via JSON.Stringify, enable this option. For more details refer to [this](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureResourceManagerTemplateDeploymentV3#deployment-outputs)",
"groupName": "Advanced"
}
],
"dataSourceBindings": [
{
"target": "subscriptionName",
"endpointId": "$(ConnectedServiceName)",
"dataSourceName": "AzureSubscriptions",
"resultTemplate": "{ \"Value\" : \"{{{subscriptionId}}}\", \"DisplayValue\" : \"{{{displayName}}} ({{{subscriptionId}}})\" }"
},
{
"target": "resourceGroupName",
"endpointId": "$(ConnectedServiceName)",
"endpointUrl": "{{{endpoint.url}}}/subscriptions/{{{subscriptionId}}}/resourcegroups?$skiptoken={{{skiptoken}}}&api-version=2016-02-01",
"callbackContextTemplate": "{\"skiptoken\": \"{{#getTokenValue response.nextLink}}{{extractUrlQueryParameter %24skiptoken}}{{/getTokenValue}}\"}",
"callbackRequiredTemplate": "{{isTokenPresent response.nextLink}}",
"initialContextTemplate": "{\"skiptoken\": \"\"}",
"resultSelector": "jsonpath:$.value[*].name",
"parameters": {
"subscriptionId": "$(subscriptionName)"
}
},
{
"target": "location",
"endpointId": "$(ConnectedServiceName)",
"dataSourceName": "AzureLocationsByDeploymentScope",
"parameters": {
"subscriptionId": "$(subscriptionName)",
"deploymentScope": "$(deploymentScope)"
}
}
],
"instanceNameFormat": "ARM Template deployment: $(deploymentScope) scope",
"execution": {
"Node16": {
"target": "main.js",
"argumentFormat": ""
},
"Node10": {
"target": "main.js"
},
"Node20_1": {
"target": "main.js",
"argumentFormat": ""
}
},
"messages": {
"CheckResourceGroupExistence": "Checking if the following resource group exists: %s.",
"ResourceGroupStatusFetchFailed": "Failed to check the resource group status. Error: %s.",
"ResourceGroupStatus": "Resource group exists: %s.",
"ResourceGroupCreationFailed": "Failed to create the resource group. Error: %s",
"CreatingNewRG": "Creating resource Group: %s",
"CreatedRG": "Resource Group created successfully.",
"CreatingTemplateDeployment": "Creating deployment parameters.",
"TemplateParsingFailed": "Ensure the Template file ( '%s' ) is valid. Task failed while parsing with following error: %s",
"FileFetchFailed": "Failed to download the file. URL: '%s'. Error: %s",
"ParametersFileParsingFailed": "Ensure the Parameters file ( '%s' ) is valid. Task failed while parsing with following error: %s",
"StartingDeployment": "Starting Deployment.",
"CreateTemplateDeploymentSucceeded": "Successfully deployed the template.",
"CreateTemplateDeploymentFailed": "Task failed while creating or updating the template deployment.",
"ErrorsInYourDeployment": "There were errors in your deployment. Error code: %s.",
"Details": "Details:",
"ErrorType": "Error Type:",
"PolicyDefinitionName": "Policy Definition Name :",
"PolicyAssignmentName": "Policy Assignment Name :",
"StartingValidation": "Starting template validation.",
"ValidDeployment": "Template deployment validation was completed successfully.",
"CreateTemplateDeploymentValidationFailed": "Template validation failed. Error: %s.",
"DeletingResourceGroup": "Deleting resource group: %s",
"CouldNotDeletedResourceGroup": "Could not delete resource group: '%s'. Operation failed with error: %s",
"DeletedResourceGroup": "Deleted resource group: %s",
"InvalidAction": "This action is not defined. Check with the task author.",
"ARGD_ConstructorFailed": "Task failed while initializing. Error: %s",
"InvalidTemplateLocation": "The template location supplied is invalid. Task only supports 'Linked artifact' or 'URL of the file'",
"EncodingNotSupported": "Encoding of the file '%s' is '%s' which is not supported. Supported file encodings are ['utf-8', 'utf-16le']",
"CouldNotDetectEncoding": "Could not detect encoding of file '%s'",
"DetectedFileEncoding": "The detected encoding for file '%s' is '%s'",
"ErrorWhileParsingParameter": "There was an error while overriding '%s' parameter because of '%s', make sure it follows JavaScript Object Notation (JSON)",
"TemplateFilePatternMatchingMoreThanOneFile": "Found multiple files matching template file pattern: %s",
"TemplateParameterFilePatternMatchingMoreThanOneFile": "Found multiple files matching template parameters file pattern: %s",
"TemplateFilePatternMatchingNoFile": "Could not find any file matching the template file pattern",
"TemplateParameterFilePatternMatchingNoFile": "Could not find any file matching the template file pattern",
"ParametersPatternMatchesADirectoryInsteadOfAFile": "Parameters file pattern matches a directory instead of a file.",
"CsmFilePatternMatchesADirectoryInsteadOfAFile": "Template file pattern matches a directory instead of a file: %s",
"AddedOutputVariable": "Updated output variable '%s', which contains the outputs section of the current deployment object in string format.",
"UnableToReadResponseBody": "Unable to read response body. Error: %s",
"MoreInformationOnAzurePortal": "More information on Azure Portal",
"LogDeploymentName": "Deployment name is %s",
"ResourceGroupNameNotProvided": "Resource Group name should be provided",
"LocationNotProvided": "Location is required for deployment",
"ARMServiceConnectionScope": "ARM Service Connection deployment scope - %s",
"ServicePrincipalRoleAssignmentDetails": "Please make sure the Service Principal with name %s is assigned the right roles for the entity %s. Follow the link for more details: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal",
"ServicePrincipalFetchFailed": "Error while fetching Service Principal details: %s",
"FindMoreDeploymentDetailsAzurePortal": "Task successfully created an Azure Resource Manager deployment, but the deployment failed. Please see more detailed Azure resource manager deployment logs at: (Please Copy-Paste the link) %s",
"ManagedServiceIdentityDetails": "Please make sure the Managed Service Identity used for deployment is assigned the right roles for the Resource Group %s. Follow the link for more details: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/howto-assign-access-portal",
"CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope",
"TemplateValidationFailure": "Validation errors were found in the Azure Resource Manager template. This can potentially cause template deployment to fail. %s. Please follow https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-syntax",
"TroubleshootingGuide": "Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting",
"IncompatibleAzureCLIVersion": "Azure CLI version should be >= 2.20.0",
"AzureCLINotFound": "Azure CLI not found on the agent.",
"FailedToFetchAzureCLIVersion": "Failed to fetch az cli version from agent. Error: %s",
"BicepBuildFailed": "\"az bicep build\" failed. Error: %s",
"BicepFileCleanupFailed": "Failed to delete Bicep file. Error: %s",
"LoginFailed": "Azure login failed: %s",
"MSILoginFailed": "Azure login failed using Managed Service Identity: %s",
"AuthSchemeNotSupported": "Auth Scheme %s is not supported",
"ErrorInSettingUpSubscription": "Error in setting up subscription: %s",
"BicepParamBuildFailed": "\"az bicep build-param\" failed. Error: %s",
"IncompatibleAzureCLIVersionBicepParam": "Azure CLI version should be >= 2.47.0 to use .bicepparam file",
"ErrorWhileOverrideParameterUndefined": "The provided metadata file '%s' is missing metadata of parameter '%s'"
}
}