Skip to content

Commit 9c48022

Browse files
authored
ADT: Update Bicep Template (Azure#26200)
* * Updates ADT management plane version to latest stable version * Uses new bicep syntax for setting scope when performing role assignments * Removes sku from ADT deployment payload since no longer used by service * Fixes connection string parameters since these no longer contain dashes and adds authentication type in endpoint creation * Fixes role assignment name * Update prerequisites readme with bicep version used * Update links in prerequisites doc * Remove locale from link
1 parent 7c051b8 commit 9c48022

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

sdk/digitaltwins/Azure.DigitalTwins.Core/Azure.DigitalTwins.Core.sln

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29806.167
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.31911.260
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.DigitalTwins.Core", "src\Azure.DigitalTwins.Core.csproj", "{E33D09D9-D809-472C-82E6-6A26BDB86FC2}"
77
EndProject
@@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1515
..\ci.yml = ..\ci.yml
1616
..\Export-AdtApis.ps1 = ..\Export-AdtApis.ps1
1717
..\remove-test-resources-pre.ps1 = ..\remove-test-resources-pre.ps1
18+
..\test-resources.bicep = ..\test-resources.bicep
1819
..\test-resources.json = ..\test-resources.json
1920
..\tests.yml = ..\tests.yml
2021
EndProjectSection
@@ -27,7 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Test.Perf", "..\..\..
2728
EndProject
2829
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{E685A401-AF9E-4196-975B-26C4A340256F}"
2930
EndProject
30-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{4153CAAF-C1D5-4104-ABD9-7F010E6AAFAB}"
31+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{4153CAAF-C1D5-4104-ABD9-7F010E6AAFAB}"
3132
EndProject
3233
Global
3334
GlobalSection(SolutionConfigurationPlatforms) = preSolution

sdk/digitaltwins/Azure.DigitalTwins.Core/tests/prerequisites/prerequisite readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
### Install Bicep
1515

16-
- Install using the instructions in [bicep](https://github.com/Azure/bicep/blob/main/docs/installing.md)
17-
- Note that to deploy Bicep files, use Bicep CLI version 0.3.1 or later. To check your Bicep CLI version, run:
16+
- Install using the instructions in [bicep](https://docs.microsoft.com/azure/azure-resource-manager/bicep/install#install-manually)
17+
- Note that to deploy Bicep files, use Bicep CLI version 0.4.1124 or later. To check your Bicep CLI version, run:
1818

1919
```bash
2020
bicep --version

sdk/digitaltwins/test-resources.bicep

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@ param baseName string = resourceGroup().name
99
@description('The location of the resource. By default, this is the same as the resource group.')
1010
param location string = resourceGroup().location
1111

12+
@description('A new GUID used to identify the role assignment')
13+
param roleNameGuid string = newGuid()
14+
1215
var adtOwnerRoleDefinitionId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/bcd981a7-7f74-457b-83e1-cceb9e632ffe'
1316

14-
resource digitaltwin 'Microsoft.DigitalTwins/digitalTwinsInstances@2020-03-01-preview' = {
17+
resource digitaltwin 'Microsoft.DigitalTwins/digitalTwinsInstances@2020-12-01' = {
1518
name: baseName
1619
location: location
17-
sku: {
18-
name: 'S1'
19-
}
2020
properties: {}
2121
}
2222

23-
resource digitaltwinRoleAssignment 'Microsoft.DigitalTwins/digitalTwinsInstances/providers/roleAssignments@2020-03-01-preview' = {
24-
name: '${digitaltwin.name}/Microsoft.Authorization/${guid(uniqueString(baseName))}'
23+
resource digitaltwinRoleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
24+
name: roleNameGuid
2525
properties: {
2626
roleDefinitionId: adtOwnerRoleDefinitionId
2727
principalId: testApplicationOid
2828
}
29+
scope: digitaltwin
2930
}
3031

3132
resource eventHubNamespace 'Microsoft.EventHub/namespaces@2018-01-01-preview' = {
@@ -75,12 +76,13 @@ resource eventHubNamespaceEventHubAuthRules 'Microsoft.EventHub/namespaces/event
7576
}
7677
}
7778

78-
resource digitaltwinEndpoints 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2020-03-01-preview' = {
79+
resource digitaltwinEndpoints 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2020-12-01' = {
7980
name: '${digitaltwin.name}/someEventHubEndpoint'
8081
properties: {
8182
endpointType: 'EventHub'
82-
'connectionString-PrimaryKey': listKeys(eventHubNamespaceEventHubAuthRules.id, '2017-04-01').primaryConnectionString
83-
'connectionString-SecondaryKey': listKeys(eventHubNamespaceEventHubAuthRules.id, '2017-04-01').secondaryConnectionString
83+
authenticationType: 'KeyBased'
84+
connectionStringPrimaryKey: listKeys(eventHubNamespaceEventHubAuthRules.id, '2017-04-01').primaryConnectionString
85+
connectionStringSecondaryKey: listKeys(eventHubNamespaceEventHubAuthRules.id, '2017-04-01').secondaryConnectionString
8486
}
8587
}
8688

0 commit comments

Comments
 (0)