@@ -57,14 +57,21 @@ param customLocationName string = '<CUSTOM_LOCATION_NAME>'
57
57
resource aioInstance 'Microsoft.IoTOperations/instances@2024-09-15-preview' existing = {
58
58
name: aioInstanceName
59
59
}
60
+
60
61
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
61
62
name: customLocationName
62
63
}
63
- resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentication@2024-09-15-preview' = {
64
- parent: aioInstanceName
65
- name: endpointName
64
+
65
+ resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-09-15-preview' existing = {
66
+ parent: aioInstance
67
+ name: 'default'
68
+ }
69
+
70
+ resource defaultBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authentications@2024-09-15-preview' = {
71
+ parent: defaultBroker
72
+ name: 'default'
66
73
extendedLocation: {
67
- name: customLocationName
74
+ name: customLocation.id
68
75
type: 'CustomLocation'
69
76
}
70
77
properties: {
@@ -86,7 +93,7 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
86
93
Deploy the Bicep file using Azure CLI.
87
94
88
95
``` azurecli
89
- az stack group create --name MyDeploymentStack -- resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep --dm None --aou deleteResources --yes
96
+ az deployment group create --resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep
90
97
```
91
98
92
99
# [ Kubernetes] ( #tab/kubernetes )
@@ -184,18 +191,26 @@ To add an authentication method to a policy:
184
191
` ` ` bicep
185
192
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
186
193
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
194
+ param policyName string = '<POLICY_NAME>'
187
195
188
196
resource aioInstance 'Microsoft.IoTOperations/instances@2024-09-15-preview' existing = {
189
197
name: aioInstanceName
190
198
}
199
+
191
200
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
192
201
name: customLocationName
193
202
}
194
- resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentication@2024-09-15-preview' = {
195
- parent: aioInstanceName
196
- name: endpointName
203
+
204
+ resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-09-15-preview' existing = {
205
+ parent: aioInstance
206
+ name: 'default'
207
+ }
208
+
209
+ resource myBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authentications@2024-09-15-preview' = {
210
+ parent: defaultBroker
211
+ name: policyName
197
212
extendedLocation: {
198
- name: customLocationName
213
+ name: customLocation.id
199
214
type: 'CustomLocation'
200
215
}
201
216
properties: {
@@ -228,7 +243,6 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
228
243
method: 'X509'
229
244
x509Settings: {
230
245
authorizationAttributes: {
231
- trustedClientCaCert: 'client-ca'
232
246
root: {
233
247
attributes: {
234
248
organization: 'contoso'
@@ -242,7 +256,7 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
242
256
}
243
257
subject: 'CN = Contoso Intermediate CA'
244
258
}
245
- smart-fan : {
259
+ smartfan : {
246
260
attributes: {
247
261
building: '17'
248
262
}
@@ -257,6 +271,12 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
257
271
258
272
` ` `
259
273
274
+ Deploy the Bicep file using Azure CLI.
275
+
276
+ ` ` ` azurecli
277
+ az deployment group create --resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep
278
+ ` ` `
279
+
260
280
# [Kubernetes](#tab/kubernetes)
261
281
262
282
Modify the *BrokerAuthentication* resource for a authentication policy by adding new methods to the `authenticationMethods` section. The following example shows multiple authentication methods for a *BrokerAuthentication* resource :
@@ -363,18 +383,26 @@ X.509 attributes can be specified in the *BrokerAuthentication* resource, and th
363
383
` ` ` bicep
364
384
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
365
385
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
386
+ param policyName string = '<POLICY_NAME>'
366
387
367
388
resource aioInstance 'Microsoft.IoTOperations/instances@2024-09-15-preview' existing = {
368
389
name: aioInstanceName
369
390
}
391
+
370
392
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
371
393
name: customLocationName
372
394
}
373
- resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentication@2024-09-15-preview' = {
374
- parent: aioInstanceName
375
- name: endpointName
395
+
396
+ resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-09-15-preview' existing = {
397
+ parent: aioInstance
398
+ name: 'default'
399
+ }
400
+
401
+ resource myBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authentications@2024-09-15-preview' = {
402
+ parent: defaultBroker
403
+ name: policyName
376
404
extendedLocation: {
377
- name: customLocationName
405
+ name: customLocation.id
378
406
type: 'CustomLocation'
379
407
}
380
408
properties: {
@@ -396,7 +424,7 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
396
424
foo: 'bar'
397
425
}
398
426
}
399
- smart-fan : {
427
+ smartfan : {
400
428
subject: 'CN = smart-fan'
401
429
attributes: {
402
430
building: '17'
@@ -411,6 +439,12 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
411
439
412
440
` ` `
413
441
442
+ Deploy the Bicep file using Azure CLI.
443
+
444
+ ` ` ` azurecli
445
+ az deployment group create --resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep
446
+ ` ` `
447
+
414
448
# [Kubernetes](#tab/kubernetes)
415
449
416
450
` ` ` yaml
@@ -526,18 +560,26 @@ Modify the `authenticationMethods` setting in a *BrokerAuthentication* resource
526
560
` ` ` bicep
527
561
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
528
562
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
563
+ param policyName string = '<POLICY_NAME>'
529
564
530
565
resource aioInstance 'Microsoft.IoTOperations/instances@2024-09-15-preview' existing = {
531
566
name: aioInstanceName
532
567
}
568
+
533
569
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
534
570
name: customLocationName
535
571
}
536
- resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentication@2024-09-15-preview' = {
537
- parent: aioInstanceName
538
- name: endpointName
572
+
573
+ resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-09-15-preview' existing = {
574
+ parent: aioInstance
575
+ name: 'default'
576
+ }
577
+
578
+ resource myBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authentications@2024-09-15-preview' = {
579
+ parent: defaultBroker
580
+ name: policyName
539
581
extendedLocation: {
540
- name: customLocationName
582
+ name: customLocation.id
541
583
type: 'CustomLocation'
542
584
}
543
585
properties: {
@@ -554,7 +596,12 @@ resource BrokerAuthentication 'Microsoft.IoTOperations/instances/brokerAuthentic
554
596
]
555
597
}
556
598
}
599
+ ` ` `
557
600
601
+ Deploy the Bicep file using Azure CLI.
602
+
603
+ ` ` ` azurecli
604
+ az deployment group create --resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep
558
605
` ` `
559
606
560
607
# [Kubernetes](#tab/kubernetes)
0 commit comments