-
Notifications
You must be signed in to change notification settings - Fork 0
/
whatiftest.json
101 lines (100 loc) · 4.73 KB
/
whatiftest.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
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceGroupName": {
"defaultValue": "",
"type": "string",
"metadata": {
"description": "Required. Name of the resource group to which the solution will be deployed to."
}
},
"location": {
"type": "string",
"defaultValue": "[deployment().location]",
"metadata": {
"description": "Optional. Location of the deployment."
}
},
"componentStorageAccountId": {
"type": "string",
"metadata": {
"description": "Required. Resource ID of the storage account that stores all the components."
}
},
"componentsStorageContainerName": {
"type": "string",
"defaultValue": "components",
"metadata": {
"description": "Optional. Name of the storage container the module components will be stored in."
}
},
"componentsStorageContainerIsPrivate": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Optional. Validity in hours for the SAS token (in case the components storage account is private). If it's set to false, no SAS token will be generated."
}
},
"sasTokenValidityLength": {
"defaultValue": "PT8H",
"type": "string",
"metadata": {
"description": "Optional. SAS token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours."
}
},
"baseTime": {
"type": "string",
"defaultValue": "[utcNow('u')]",
"metadata": {
"description": "Generated. Do not provide a value! This date value is used to generate a SAS token to access the modules."
}
}
},
"variables": {
// Location of components
"componentsBaseUrl": "[concat('https://', split(parameters('componentStorageAccountId'), '/')[8], '.blob.core.windows.net/', parameters('componentsStorageContainerName'))]",
"modulesPath": "[concat(variables('componentsBaseUrl'), '/Modules/ARM/')]",
// SAS token validity calculation - DO NOT CHANGE THESE VALUES !
"accountSasProperties": {
"signedServices": "b", //Blob (b), Queue (q), Table (t), File (f).
"signedPermission": "r", //Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p)
"signedExpiry": "[dateTimeAdd(parameters('baseTime'), parameters('sasTokenValidityLength'))]", //format: 2017-05-24T10:42:03Z
"signedResourceTypes": "o", //Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.
"signedProtocol": "https"
}
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-06-01",
"name": "Deployment-RG",
"location": "[parameters('location')]",
"condition": true,
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"debugSetting": {
"detailLevel": "requestContent,responseContent"
},
"templateLink": {
"uri": "[concat(variables('modulesPath'), 'ResourceGroup/1.0.74/deploy.json', if(parameters('componentsStorageContainerIsPrivate'), concat('?', listAccountSas(parameters('componentStorageAccountId'), '2019-04-01', variables('accountSasProperties')).accountSasToken), ''))]",
//"uri": "https://iacs.blob.core.windows.net/components/Modules/ARM/ResourceGroup/1.0.74/deploy.json?***************<-SAS token removed",
"contentVersion": "1.0.0.0"
},
"parameters": {
"resourceGroupName": {
"value": "[parameters('resourceGroupName')]"
}
}
}
}
],
"outputs": {
"output1": {
"type": "string",
"value": "[concat(variables('modulesPath'), 'ResourceGroup/1.0.74/deploy.json', if(parameters('componentsStorageContainerIsPrivate'), concat('?', listAccountSas(parameters('componentStorageAccountId'), '2019-04-01', variables('accountSasProperties')).accountSasToken), ''))]"
}
}
}