|
5 | 5 | "triggers": { |
6 | 6 | "When_an_HTTP_request_is_received": { |
7 | 7 | "type": "Request", |
8 | | - "kind": "Http" |
| 8 | + "kind": "Http", |
| 9 | + "inputs": { |
| 10 | + "method": "POST", |
| 11 | + "schema": { |
| 12 | + "properties": { |
| 13 | + "country": { |
| 14 | + "type": "string" |
| 15 | + } |
| 16 | + }, |
| 17 | + "type": "object" |
| 18 | + } |
| 19 | + } |
9 | 20 | } |
10 | 21 | }, |
11 | 22 | "actions": { |
|
15 | 26 | "inputs": { |
16 | 27 | "host": { |
17 | 28 | "connection": { |
18 | | - "name": "@parameters('$connections')['keyvault']['connectionId']" |
| 29 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
19 | 30 | } |
20 | 31 | }, |
21 | 32 | "method": "get", |
|
44 | 55 | "Get_container-registry-password": [ |
45 | 56 | "Succeeded" |
46 | 57 | ], |
| 58 | + "Get_dtm-api-key": [ |
| 59 | + "Succeeded" |
| 60 | + ], |
| 61 | + "Get_ipc-api-key": [ |
| 62 | + "Succeeded" |
| 63 | + ], |
47 | 64 | "containerIsDone_=_false": [ |
48 | 65 | "Succeeded" |
49 | 66 | ], |
|
55 | 72 | "inputs": { |
56 | 73 | "host": { |
57 | 74 | "connection": { |
58 | | - "name": "@parameters('$connections')['aci']['connectionId']" |
| 75 | + "name": "@parameters('$connections')['aci-1']['connectionId']" |
59 | 76 | } |
60 | 77 | }, |
61 | 78 | "method": "put", |
|
64 | 81 | "properties": { |
65 | 82 | "containers": [ |
66 | 83 | { |
67 | | - "name": "tjebbe-demo", |
| 84 | + "name": "container", |
68 | 85 | "properties": { |
69 | | - "image": "tjebbedemo-gnh9duaghsdfhyfx.azurecr.io/etl-pipeline:latest", |
| 86 | + "command": [ |
| 87 | + "poetry", |
| 88 | + "run", |
| 89 | + "python", |
| 90 | + "run_pipeline.py", |
| 91 | + "--country-iso3", |
| 92 | + "@triggerBody()?['country']" |
| 93 | + ], |
| 94 | + "image": "datapipelineregistry-a5eudbdee8djhnh8.azurecr.io/exposure-vulnerability-retrieval:prod", |
70 | 95 | "environmentVariables": [ |
71 | 96 | { |
72 | 97 | "name": "BLOB_ACCOUNT_NAME", |
|
79 | 104 | { |
80 | 105 | "name": "ECMWF_DATASTORES_KEY", |
81 | 106 | "secureValue": "@body('Get_ecmwf-datastores-key')?['value']" |
| 107 | + }, |
| 108 | + { |
| 109 | + "name": "IPC_API_KEY", |
| 110 | + "secureValue": "@body('Get_ipc-api-key')?['value']" |
| 111 | + }, |
| 112 | + { |
| 113 | + "name": "DTM_API_KEY", |
| 114 | + "secureValue": "@body('Get_dtm-api-key')?['value']" |
82 | 115 | } |
83 | 116 | ], |
84 | 117 | "resources": { |
|
93 | 126 | "osType": "Linux", |
94 | 127 | "imageRegistryCredentials": [ |
95 | 128 | { |
96 | | - "server": "tjebbedemo-gnh9duaghsdfhyfx.azurecr.io", |
97 | | - "username": "tjebbedemo", |
| 129 | + "server": "datapipelineregistry-a5eudbdee8djhnh8.azurecr.io", |
| 130 | + "username": "datapipelineregistry", |
98 | 131 | "password": "@body('Get_container-registry-password')?['value']" |
99 | 132 | } |
100 | 133 | ], |
|
103 | 136 | "identity": { |
104 | 137 | "type": "UserAssigned", |
105 | 138 | "userAssignedIdentities": { |
106 | | - "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/ibf-data-exploratory-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/tjebbe-demo": {} |
| 139 | + "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/exposure-vulnerability/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exposure-etl-managed-identity": {} |
107 | 140 | } |
108 | 141 | } |
109 | 142 | }, |
110 | | - "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('ibf-data-exploratory-rg')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('tjebbe-demo')}", |
| 143 | + "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('exposure-vulnerability')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('exposure-vulnerability-retrieval-prod-',toLower(triggerBody()?['country']),'-cg')}", |
111 | 144 | "queries": { |
112 | 145 | "x-ms-api-version": "2023-05-01" |
113 | 146 | } |
|
123 | 156 | "inputs": { |
124 | 157 | "host": { |
125 | 158 | "connection": { |
126 | | - "name": "@parameters('$connections')['aci']['connectionId']" |
| 159 | + "name": "@parameters('$connections')['aci-1']['connectionId']" |
127 | 160 | } |
128 | 161 | }, |
129 | 162 | "method": "get", |
130 | | - "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('ibf-data-exploratory-rg')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('tjebbe-demo')}/containers/@{encodeURIComponent('tjebbe-demo')}/logs", |
| 163 | + "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('exposure-vulnerability')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('exposure-vulnerability-retrieval-prod-',toLower(triggerBody()?['country']),'-cg')}/containers/@{encodeURIComponent('container')}/logs", |
131 | 164 | "queries": { |
132 | 165 | "x-ms-api-version": "2023-05-01" |
133 | 166 | } |
|
146 | 179 | "inputs": { |
147 | 180 | "host": { |
148 | 181 | "connection": { |
149 | | - "name": "@parameters('$connections')['aci']['connectionId']" |
| 182 | + "name": "@parameters('$connections')['aci-1']['connectionId']" |
150 | 183 | } |
151 | 184 | }, |
152 | 185 | "method": "delete", |
153 | | - "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('ibf-data-exploratory-rg')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('tjebbe-demo')}", |
| 186 | + "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('exposure-vulnerability')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('exposure-vulnerability-retrieval-prod-',toLower(triggerBody()?['country']),'-cg')}", |
154 | 187 | "queries": { |
155 | 188 | "x-ms-api-version": "2023-05-01" |
156 | 189 | } |
|
163 | 196 | "inputs": { |
164 | 197 | "host": { |
165 | 198 | "connection": { |
166 | | - "name": "@parameters('$connections')['aci']['connectionId']" |
| 199 | + "name": "@parameters('$connections')['aci-1']['connectionId']" |
167 | 200 | } |
168 | 201 | }, |
169 | 202 | "method": "get", |
170 | | - "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('ibf-data-exploratory-rg')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('tjebbe-demo')}", |
| 203 | + "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('exposure-vulnerability')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('exposure-vulnerability-retrieval-prod-',toLower(triggerBody()?['country']),'-cg')}", |
171 | 204 | "queries": { |
172 | 205 | "x-ms-api-version": "2023-05-01" |
173 | 206 | } |
|
238 | 271 | "inputs": { |
239 | 272 | "host": { |
240 | 273 | "connection": { |
241 | | - "name": "@parameters('$connections')['keyvault']['connectionId']" |
| 274 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
242 | 275 | } |
243 | 276 | }, |
244 | 277 | "method": "get", |
|
259 | 292 | "inputs": { |
260 | 293 | "host": { |
261 | 294 | "connection": { |
262 | | - "name": "@parameters('$connections')['keyvault']['connectionId']" |
| 295 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
263 | 296 | } |
264 | 297 | }, |
265 | 298 | "method": "get", |
|
280 | 313 | "inputs": { |
281 | 314 | "host": { |
282 | 315 | "connection": { |
283 | | - "name": "@parameters('$connections')['keyvault']['connectionId']" |
| 316 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
284 | 317 | } |
285 | 318 | }, |
286 | 319 | "method": "get", |
|
314 | 347 | "inputs": { |
315 | 348 | "host": { |
316 | 349 | "connection": { |
317 | | - "name": "@parameters('$connections')['aci']['connectionId']" |
| 350 | + "name": "@parameters('$connections')['aci-1']['connectionId']" |
318 | 351 | } |
319 | 352 | }, |
320 | 353 | "method": "delete", |
321 | | - "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('ibf-data-exploratory-rg')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('tjebbe-demo')}", |
| 354 | + "path": "/subscriptions/@{encodeURIComponent('57b0d17a-5429-4dbb-8366-35c928e3ed94')}/resourceGroups/@{encodeURIComponent('exposure-vulnerability')}/providers/Microsoft.ContainerInstance/containerGroups/@{encodeURIComponent('exposure-vulnerability-retrieval-prod-',toLower(triggerBody()?['country']),'-cg')}", |
322 | 355 | "queries": { |
323 | 356 | "x-ms-api-version": "2023-05-01" |
324 | 357 | } |
325 | 358 | } |
| 359 | + }, |
| 360 | + "Get_dtm-api-key": { |
| 361 | + "runAfter": {}, |
| 362 | + "type": "ApiConnection", |
| 363 | + "inputs": { |
| 364 | + "host": { |
| 365 | + "connection": { |
| 366 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
| 367 | + } |
| 368 | + }, |
| 369 | + "method": "get", |
| 370 | + "path": "/secrets/@{encodeURIComponent('dtm-api-key')}/value" |
| 371 | + }, |
| 372 | + "runtimeConfiguration": { |
| 373 | + "secureData": { |
| 374 | + "properties": [ |
| 375 | + "inputs", |
| 376 | + "outputs" |
| 377 | + ] |
| 378 | + } |
| 379 | + } |
| 380 | + }, |
| 381 | + "Get_ipc-api-key": { |
| 382 | + "runAfter": {}, |
| 383 | + "type": "ApiConnection", |
| 384 | + "inputs": { |
| 385 | + "host": { |
| 386 | + "connection": { |
| 387 | + "name": "@parameters('$connections')['keyvault-1']['connectionId']" |
| 388 | + } |
| 389 | + }, |
| 390 | + "method": "get", |
| 391 | + "path": "/secrets/@{encodeURIComponent('ipc-api-key')}/value" |
| 392 | + }, |
| 393 | + "runtimeConfiguration": { |
| 394 | + "secureData": { |
| 395 | + "properties": [ |
| 396 | + "inputs", |
| 397 | + "outputs" |
| 398 | + ] |
| 399 | + } |
| 400 | + } |
326 | 401 | } |
327 | 402 | }, |
328 | 403 | "outputs": {}, |
|
337 | 412 | "$connections": { |
338 | 413 | "type": "Object", |
339 | 414 | "value": { |
340 | | - "keyvault": { |
| 415 | + "keyvault-1": { |
341 | 416 | "id": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/providers/Microsoft.Web/locations/westeurope/managedApis/keyvault", |
342 | | - "connectionId": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/ibf-data-exploratory-rg/providers/Microsoft.Web/connections/keyvault", |
343 | | - "connectionName": "keyvault", |
| 417 | + "connectionId": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/exposure-vulnerability/providers/Microsoft.Web/connections/keyvault-1", |
| 418 | + "connectionName": "keyvault-1", |
344 | 419 | "connectionProperties": { |
345 | 420 | "authentication": { |
346 | 421 | "type": "ManagedServiceIdentity" |
347 | 422 | } |
348 | 423 | } |
349 | 424 | }, |
350 | | - "aci": { |
| 425 | + "aci-1": { |
351 | 426 | "id": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/providers/Microsoft.Web/locations/westeurope/managedApis/aci", |
352 | | - "connectionId": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/ibf-data-exploratory-rg/providers/Microsoft.Web/connections/aci", |
353 | | - "connectionName": "aci", |
| 427 | + "connectionId": "/subscriptions/57b0d17a-5429-4dbb-8366-35c928e3ed94/resourceGroups/exposure-vulnerability/providers/Microsoft.Web/connections/aci-1", |
| 428 | + "connectionName": "aci-1", |
354 | 429 | "connectionProperties": { |
355 | 430 | "authentication": { |
356 | 431 | "type": "ManagedServiceIdentity" |
|
0 commit comments