Skip to content

Commit

Permalink
[release/8.0-preview5] Upgrade to new version of Azure.Provisioning (#…
Browse files Browse the repository at this point in the history
…3271) (#3325)

* Upgrade to new version of Azure.Provisioning (#3271)

* Upgrade to new version of Azure.Provisioning

* Fix tests

* regen

* update test

* Remove the azure specific nuget feed

---------

Co-authored-by: JoshLove-msft <[email protected]>
  • Loading branch information
eerhardt and JoshLove-msft authored Apr 2, 2024
1 parent 4229054 commit 1b627b7
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 210 deletions.
6 changes: 1 addition & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
<PackageVersion Include="Microsoft.Azure.SignalR" Version="1.25.1" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.2" />
<!-- Azure Management SDK for .NET dependencies -->
<PackageVersion Include="Azure.ResourceManager" Version="1.11.0-alpha.20240222.6" />
<PackageVersion Include="Azure.ResourceManager.Authorization" Version="1.2.0-alpha.20240309.1" />
<PackageVersion Include="Azure.ResourceManager.KeyVault" Version="1.3.0-alpha.20240310.2" />
<PackageVersion Include="Azure.ResourceManager.Resources" Version="1.8.0-alpha.20240309.1" />
<PackageVersion Include="Azure.Provisioning" Version="1.0.0-alpha.20240315.2" />
<PackageVersion Include="Azure.Provisioning" Version="0.1.0-beta.2" />
<!-- ASP.NET Core dependencies -->
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Certificate" Version="$(MicrosoftAspNetCoreAuthenticationCertificatePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion)" />
Expand Down
6 changes: 0 additions & 6 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="orleans-nightly" value="https://orleans.pkgs.visualstudio.com/orleans-public/_packaging/orleans-nightly/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="azure-sdk-for-net-dev" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="dotnet9-transport">
<package pattern="*WorkloadBuildTasks*" />
</packageSource>
<packageSource key="azure-sdk-for-net-dev">
<package pattern="Azure.Provisioning" />
<package pattern="Azure.ResourceManager" />
<package pattern="Azure.ResourceManager.*" />
</packageSource>
<packageSource key="dotnet-public">
<package pattern="*" />
</packageSource>
Expand Down
6 changes: 3 additions & 3 deletions playground/bicep/BicepSample.AppHost/ai.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ param kind string = 'web'
param logAnalyticsWorkspaceId string


resource applicationInsightsComponent_qG5w9sTHc 'Microsoft.Insights/components@2020-02-02' = {
name: toLower(take(concat('ai', uniqueString(resourceGroup().id)), 24))
resource applicationInsightsComponent_rCL0xfJOP 'Microsoft.Insights/components@2020-02-02' = {
name: toLower(take('ai${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'ai'
Expand All @@ -26,4 +26,4 @@ resource applicationInsightsComponent_qG5w9sTHc 'Microsoft.Insights/components@2
}
}

output appInsightsConnectionString string = applicationInsightsComponent_qG5w9sTHc.properties.ConnectionString
output appInsightsConnectionString string = applicationInsightsComponent_rCL0xfJOP.properties.ConnectionString
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ param kind string = 'web'
param logAnalyticsWorkspaceId string


resource applicationInsightsComponent_YlZN71uia 'Microsoft.Insights/components@2020-02-02' = {
name: toLower(take(concat('aiwithoutlaw', uniqueString(resourceGroup().id)), 24))
resource applicationInsightsComponent_ojV7HcBs3 'Microsoft.Insights/components@2020-02-02' = {
name: toLower(take('aiwithoutlaw${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'aiwithoutlaw'
Expand All @@ -26,4 +26,4 @@ resource applicationInsightsComponent_YlZN71uia 'Microsoft.Insights/components@2
}
}

output appInsightsConnectionString string = applicationInsightsComponent_YlZN71uia.properties.ConnectionString
output appInsightsConnectionString string = applicationInsightsComponent_ojV7HcBs3.properties.ConnectionString
12 changes: 6 additions & 6 deletions playground/bicep/BicepSample.AppHost/appConfig.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ param principalType string
param sku string


resource appConfigurationStore_j2IqAZkBh 'Microsoft.AppConfiguration/configurationStores@2023-03-01' = {
name: toLower(take(concat('appConfig', uniqueString(resourceGroup().id)), 24))
resource appConfigurationStore_xM7mBhesj 'Microsoft.AppConfiguration/configurationStores@2023-03-01' = {
name: toLower(take('appConfig${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'appConfig'
Expand All @@ -26,14 +26,14 @@ resource appConfigurationStore_j2IqAZkBh 'Microsoft.AppConfiguration/configurati
}
}

resource roleAssignment_umUNaNdeG 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: appConfigurationStore_j2IqAZkBh
name: guid(appConfigurationStore_j2IqAZkBh.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b'))
resource roleAssignment_3uatMWw7h 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: appConfigurationStore_xM7mBhesj
name: guid(appConfigurationStore_xM7mBhesj.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b')
principalId: principalId
principalType: principalType
}
}

output appConfigEndpoint string = appConfigurationStore_j2IqAZkBh.properties.endpoint
output appConfigEndpoint string = appConfigurationStore_xM7mBhesj.properties.endpoint
10 changes: 5 additions & 5 deletions playground/bicep/BicepSample.AppHost/cosmos.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ resource keyVault_IeF8jZvXV 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
name: keyVaultName
}

resource cosmosDBAccount_5pKmb8KAZ 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
name: toLower(take(concat('cosmos', uniqueString(resourceGroup().id)), 24))
resource cosmosDBAccount_MZyw35gqp 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
name: toLower(take('cosmos${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'cosmos'
Expand All @@ -32,8 +32,8 @@ resource cosmosDBAccount_5pKmb8KAZ 'Microsoft.DocumentDB/databaseAccounts@2023-0
}
}

resource cosmosDBSqlDatabase_NXWTqBS0F 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = {
parent: cosmosDBAccount_5pKmb8KAZ
resource cosmosDBSqlDatabase_tiaTwUqx8 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = {
parent: cosmosDBAccount_MZyw35gqp
name: 'db3'
location: location
properties: {
Expand All @@ -48,6 +48,6 @@ resource keyVaultSecret_Ddsc3HjrA 'Microsoft.KeyVault/vaults/secrets@2022-07-01'
name: 'connectionString'
location: location
properties: {
value: 'AccountEndpoint=${cosmosDBAccount_5pKmb8KAZ.properties.documentEndpoint};AccountKey=${cosmosDBAccount_5pKmb8KAZ.listkeys(cosmosDBAccount_5pKmb8KAZ.apiVersion).primaryMasterKey}'
value: 'AccountEndpoint=${cosmosDBAccount_MZyw35gqp.properties.documentEndpoint};AccountKey=${cosmosDBAccount_MZyw35gqp.listkeys(cosmosDBAccount_MZyw35gqp.apiVersion).primaryMasterKey}'
}
}
14 changes: 7 additions & 7 deletions playground/bicep/BicepSample.AppHost/kv3.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ param principalId string
param principalType string


resource keyVault_kyM046oWl 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: toLower(take(concat('kv3', uniqueString(resourceGroup().id)), 24))
resource keyVault_AlZz71Qpf 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: toLower(take('kv3${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'kv3'
}
properties: {
tenantId: tenant().tenantId
sku: {
name: 'standard'
family: 'A'
name: 'standard'
}
enableRbacAuthorization: true
}
}

resource roleAssignment_oarYloVnD 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: keyVault_kyM046oWl
name: guid(keyVault_kyM046oWl.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483'))
resource roleAssignment_B2rItKEaQ 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: keyVault_AlZz71Qpf
name: guid(keyVault_AlZz71Qpf.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')
principalId: principalId
principalType: principalType
}
}

output vaultUri string = keyVault_kyM046oWl.properties.vaultUri
output vaultUri string = keyVault_AlZz71Qpf.properties.vaultUri
6 changes: 3 additions & 3 deletions playground/bicep/BicepSample.AppHost/lawkspc.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ targetScope = 'resourceGroup'
param location string = resourceGroup().location


resource operationalInsightsWorkspace_cxL77xv9Y 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: toLower(take(concat('lawkspc', uniqueString(resourceGroup().id)), 24))
resource operationalInsightsWorkspace_FFogvqZja 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: toLower(take('lawkspc${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'lawkspc'
Expand All @@ -17,4 +17,4 @@ resource operationalInsightsWorkspace_cxL77xv9Y 'Microsoft.OperationalInsights/w
}
}

output logAnalyticsWorkspaceId string = operationalInsightsWorkspace_cxL77xv9Y.id
output logAnalyticsWorkspaceId string = operationalInsightsWorkspace_FFogvqZja.id
14 changes: 7 additions & 7 deletions playground/bicep/BicepSample.AppHost/postgres2.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ resource keyVault_IeF8jZvXV 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
name: keyVaultName
}

resource postgreSqlFlexibleServer_OPAkFpSgz 'Microsoft.DBforPostgreSQL/flexibleServers@2023-03-01-preview' = {
name: toLower(take(concat('postgres2', uniqueString(resourceGroup().id)), 24))
resource postgreSqlFlexibleServer_R66wZLcrB 'Microsoft.DBforPostgreSQL/flexibleServers@2023-03-01-preview' = {
name: toLower(take('postgres2${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'postgres2'
Expand All @@ -46,17 +46,17 @@ resource postgreSqlFlexibleServer_OPAkFpSgz 'Microsoft.DBforPostgreSQL/flexibleS
}
}

resource postgreSqlFirewallRule_mqsWfilIZ 'Microsoft.DBforPostgreSQL/flexibleServers/firewallRules@2023-03-01-preview' = {
parent: postgreSqlFlexibleServer_OPAkFpSgz
resource postgreSqlFirewallRule_TAPXfjXFL 'Microsoft.DBforPostgreSQL/flexibleServers/firewallRules@2023-03-01-preview' = {
parent: postgreSqlFlexibleServer_R66wZLcrB
name: 'AllowAllAzureIps'
properties: {
startIpAddress: '0.0.0.0'
endIpAddress: '0.0.0.0'
}
}

resource postgreSqlFlexibleServerDatabase_UjecJzvqQ 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2023-03-01-preview' = {
parent: postgreSqlFlexibleServer_OPAkFpSgz
resource postgreSqlFlexibleServerDatabase_QYMh86Ekp 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2023-03-01-preview' = {
parent: postgreSqlFlexibleServer_R66wZLcrB
name: 'db2'
properties: {
}
Expand All @@ -67,6 +67,6 @@ resource keyVaultSecret_Ddsc3HjrA 'Microsoft.KeyVault/vaults/secrets@2022-07-01'
name: 'connectionString'
location: location
properties: {
value: 'Host=${postgreSqlFlexibleServer_OPAkFpSgz.properties.fullyQualifiedDomainName};Username=${administratorLogin};Password=${administratorLoginPassword}'
value: 'Host=${postgreSqlFlexibleServer_R66wZLcrB.properties.fullyQualifiedDomainName};Username=${administratorLogin};Password=${administratorLoginPassword}'
}
}
6 changes: 3 additions & 3 deletions playground/bicep/BicepSample.AppHost/redis.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ resource keyVault_IeF8jZvXV 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
name: keyVaultName
}

resource redisCache_N8pcNBLX8 'Microsoft.Cache/Redis@2020-06-01' = {
name: toLower(take(concat('redis', uniqueString(resourceGroup().id)), 24))
resource redisCache_bsDXQBNdq 'Microsoft.Cache/Redis@2020-06-01' = {
name: toLower(take('redis${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'redis'
Expand All @@ -33,6 +33,6 @@ resource keyVaultSecret_Ddsc3HjrA 'Microsoft.KeyVault/vaults/secrets@2022-07-01'
name: 'connectionString'
location: location
properties: {
value: '${redisCache_N8pcNBLX8.properties.hostName},ssl=true,password=${redisCache_N8pcNBLX8.listKeys(redisCache_N8pcNBLX8.apiVersion).primaryKey}'
value: '${redisCache_bsDXQBNdq.properties.hostName},ssl=true,password=${redisCache_bsDXQBNdq.listKeys(redisCache_bsDXQBNdq.apiVersion).primaryKey}'
}
}
37 changes: 18 additions & 19 deletions playground/bicep/BicepSample.AppHost/sb.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ param principalId string
param principalType string


resource serviceBusNamespace_RuSlLOK64 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
name: toLower(take(concat('sb', uniqueString(resourceGroup().id)), 24))
resource serviceBusNamespace_1RzZvI0LZ 'Microsoft.ServiceBus/namespaces@2021-11-01' = {
name: toLower(take('sb${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'sb'
Expand All @@ -23,66 +23,65 @@ resource serviceBusNamespace_RuSlLOK64 'Microsoft.ServiceBus/namespaces@2022-10-
name: sku
}
properties: {
minimumTlsVersion: '1.2'
}
}

resource roleAssignment_IS9HJzhT8 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: serviceBusNamespace_RuSlLOK64
name: guid(serviceBusNamespace_RuSlLOK64.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '090c5cfd-751d-490a-894a-3ce6f1109419'))
resource roleAssignment_GAWCqJpjI 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: serviceBusNamespace_1RzZvI0LZ
name: guid(serviceBusNamespace_1RzZvI0LZ.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '090c5cfd-751d-490a-894a-3ce6f1109419'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '090c5cfd-751d-490a-894a-3ce6f1109419')
principalId: principalId
principalType: principalType
}
}

resource serviceBusQueue_XlB4dhrJO 'Microsoft.ServiceBus/namespaces/queues@2022-10-01-preview' = {
parent: serviceBusNamespace_RuSlLOK64
resource serviceBusQueue_kQwbucWhl 'Microsoft.ServiceBus/namespaces/queues@2021-11-01' = {
parent: serviceBusNamespace_1RzZvI0LZ
name: 'queue1'
location: location
properties: {
}
}

resource serviceBusTopic_bemnWZskJ 'Microsoft.ServiceBus/namespaces/topics@2022-10-01-preview' = {
parent: serviceBusNamespace_RuSlLOK64
resource serviceBusTopic_768oqOlcX 'Microsoft.ServiceBus/namespaces/topics@2021-11-01' = {
parent: serviceBusNamespace_1RzZvI0LZ
name: 'topic1'
location: location
properties: {
}
}

resource serviceBusSubscription_pWgs2FLAX 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2022-10-01-preview' = {
parent: serviceBusTopic_bemnWZskJ
resource serviceBusSubscription_IcxQHWZBG 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2021-11-01' = {
parent: serviceBusTopic_768oqOlcX
name: 'subscription1'
location: location
properties: {
}
}

resource serviceBusSubscription_qojP3oFII 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2022-10-01-preview' = {
parent: serviceBusTopic_bemnWZskJ
resource serviceBusSubscription_exANvItuE 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2021-11-01' = {
parent: serviceBusTopic_768oqOlcX
name: 'subscription2'
location: location
properties: {
}
}

resource serviceBusTopic_Sh8X0ue6x 'Microsoft.ServiceBus/namespaces/topics@2022-10-01-preview' = {
parent: serviceBusNamespace_RuSlLOK64
resource serviceBusTopic_nemvFxmjZ 'Microsoft.ServiceBus/namespaces/topics@2021-11-01' = {
parent: serviceBusNamespace_1RzZvI0LZ
name: 'topic2'
location: location
properties: {
}
}

resource serviceBusSubscription_I0aPXc6VB 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2022-10-01-preview' = {
parent: serviceBusTopic_Sh8X0ue6x
resource serviceBusSubscription_qiv2k0Nuu 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2021-11-01' = {
parent: serviceBusTopic_nemvFxmjZ
name: 'subscription1'
location: location
properties: {
}
}

output serviceBusEndpoint string = serviceBusNamespace_RuSlLOK64.properties.serviceBusEndpoint
output serviceBusEndpoint string = serviceBusNamespace_1RzZvI0LZ.properties.serviceBusEndpoint
12 changes: 6 additions & 6 deletions playground/bicep/BicepSample.AppHost/signalr.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ param principalId string
param principalType string


resource signalRService_hoCuRhvyj 'Microsoft.SignalRService/signalR@2022-02-01' = {
name: toLower(take(concat('signalr', uniqueString(resourceGroup().id)), 24))
resource signalRService_iD3Yrl49T 'Microsoft.SignalRService/signalR@2022-02-01' = {
name: toLower(take('signalr${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'signalr'
Expand All @@ -36,14 +36,14 @@ resource signalRService_hoCuRhvyj 'Microsoft.SignalRService/signalR@2022-02-01'
}
}

resource roleAssignment_O1jxNBUgA 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: signalRService_hoCuRhvyj
name: guid(signalRService_hoCuRhvyj.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '420fcaa2-552c-430f-98ca-3264be4806c7'))
resource roleAssignment_35voRFfVj 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: signalRService_iD3Yrl49T
name: guid(signalRService_iD3Yrl49T.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '420fcaa2-552c-430f-98ca-3264be4806c7'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '420fcaa2-552c-430f-98ca-3264be4806c7')
principalId: principalId
principalType: principalType
}
}

output hostName string = signalRService_hoCuRhvyj.properties.hostName
output hostName string = signalRService_iD3Yrl49T.properties.hostName
Loading

0 comments on commit 1b627b7

Please sign in to comment.