Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Azure.Provisioning to latest version #5592

Merged
merged 37 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bbfea9d
Update Azure.Provisioning to latest version
eerhardt Sep 9, 2024
929fcac
Add AsBicepParameter
eerhardt Sep 10, 2024
2a364cf
Update more stuff to make it deployable.
eerhardt Sep 10, 2024
d4c4f8c
Add a location parameter so azd up works.
eerhardt Sep 10, 2024
1e23335
Update Storage to use the new CDK
eerhardt Sep 10, 2024
6b4faf1
Update PostgreSQL to use the new CDK
eerhardt Sep 11, 2024
906e1c1
Sort the bicep statements so that parameters appear at the top and ou…
eerhardt Sep 11, 2024
3e1a0c1
Update Redis to use the new CDK
eerhardt Sep 11, 2024
d63bcf4
Update CosmosDB to use the new CDK
eerhardt Sep 12, 2024
9147277
Update Sql to use the new CDK
eerhardt Sep 12, 2024
2e34551
Update ServiceBus to use the new CDK
eerhardt Sep 12, 2024
0acf431
Update SignalR to use the new CDK
eerhardt Sep 12, 2024
eb7fb7a
Update Search to use the new CDK
eerhardt Sep 12, 2024
7a1bfa9
Update ApplicationInsights and OperationalInsights to use the new CDK
eerhardt Sep 12, 2024
bb41af8
Update AppConfiguration to use the new CDK
eerhardt Sep 12, 2024
7acb33c
Update CognitiveServices to use the new CDK
eerhardt Sep 12, 2024
0bb8479
Update WebPubSub to use the new CDK
eerhardt Sep 12, 2024
6097a9b
Update the CDK to version 1.0.0-alpha.20240912
eerhardt Sep 12, 2024
41c8089
Update to latest CDK version to fix CognitiveServices
eerhardt Sep 12, 2024
113be63
Update EventHubs to use new CDK
eerhardt Sep 12, 2024
bc16653
Get tests building
eerhardt Sep 12, 2024
bc36aa0
Fix up so azd up works
eerhardt Sep 13, 2024
c8322a4
Use GetTenant function
eerhardt Sep 13, 2024
665a4dc
Merge remote-tracking branch 'upstream/main' into UpdateCDK
eerhardt Sep 13, 2024
b371332
Fix bicep tests
eerhardt Sep 13, 2024
18cbd0a
Update test nuget.configs
eerhardt Sep 13, 2024
2bb632d
Update the rest of the bicep in the playground apps.
eerhardt Sep 16, 2024
9c1112b
Use simpler expression to set SqlFirewallRule addresses
eerhardt Sep 16, 2024
dc2ef1e
Merge remote-tracking branch 'upstream/main' into UpdateCDK
eerhardt Sep 16, 2024
15f7258
Add XML docs to the new APIs.
eerhardt Sep 16, 2024
d2fe6cd
Remove hard-coded ResourceVersions.
eerhardt Sep 16, 2024
35dd244
Merge remote-tracking branch 'upstream/main' into UpdateCDK
eerhardt Sep 17, 2024
fa37195
Fix up whitespace
eerhardt Sep 17, 2024
16ea988
Use 8.x naming scheme.
eerhardt Sep 17, 2024
369e72f
Fix deployment name in OpenAI
eerhardt Sep 17, 2024
da65e75
Merge remote-tracking branch 'upstream/main' into UpdateCDK
eerhardt Sep 17, 2024
422d838
Respond to PR feedback
eerhardt Sep 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<TestcontainersPackageVersion>3.10.0</TestcontainersPackageVersion>
<AzureProvisiongVersion>1.0.0-alpha.20240912.7</AzureProvisiongVersion>
</PropertyGroup>
<ItemGroup>
<!-- AWS SDK for .NET dependencies -->
Expand Down Expand Up @@ -34,23 +35,24 @@
<PackageVersion Include="Microsoft.Azure.SignalR" Version="1.27.0" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.5" />
<!-- Azure Management SDK for .NET dependencies -->
<PackageVersion Include="Azure.Provisioning" Version="0.3.0" />
<PackageVersion Include="Azure.Provisioning.AppConfiguration" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.ApplicationInsights" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.CognitiveServices" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.CosmosDB" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.EventHubs" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.KeyVault" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.OperationalInsights" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.PostgreSql" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.Redis" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.Resources" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.Search" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.ServiceBus" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.SignalR" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.Sql" Version="0.1.0" />
<PackageVersion Include="Azure.Provisioning.Storage" Version="0.2.0" />
<PackageVersion Include="Azure.Provisioning.WebPubSub" Version="0.1.0-beta.1" />
<PackageVersion Include="Azure.Provisioning" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.AppConfiguration" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.ApplicationInsights" Version="1.0.0-alpha.20240912.1" />
eerhardt marked this conversation as resolved.
Show resolved Hide resolved
<PackageVersion Include="Azure.Provisioning.CognitiveServices" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.CosmosDB" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.EventHubs" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.KeyVault" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.OperationalInsights" Version="1.0.0-alpha.20240912.1" />
<PackageVersion Include="Azure.Provisioning.PostgreSql" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.Redis" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.Search" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.ServiceBus" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.SignalR" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.Sql" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.Storage" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.Provisioning.WebPubSub" Version="$(AzureProvisiongVersion)" />
<PackageVersion Include="Azure.ResourceManager.Authorization" Version="1.1.3" />
<PackageVersion Include="Azure.ResourceManager.KeyVault" Version="1.3.0" />
<!-- ASP.NET Core dependencies -->
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Certificate" Version="$(MicrosoftAspNetCoreAuthenticationCertificatePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion)" />
Expand Down
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/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-devfeed" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="dotnet9-transport">
Expand All @@ -35,6 +36,9 @@
<packageSource key="dotnet-eng">
<package pattern="*" />
</packageSource>
<packageSource key="azure-sdk-devfeed">
<package pattern="Azure.*" />
</packageSource>
</packageSourceMapping>
<disabledPackageSources>
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
Expand Down
102 changes: 49 additions & 53 deletions playground/AspireEventHub/EventHubs.AppHost/ehstorage.module.bicep
Original file line number Diff line number Diff line change
@@ -1,70 +1,66 @@
targetScope = 'resourceGroup'

@description('')
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location

@description('')
param principalId string

@description('')
param principalType string


resource storageAccount_59pNEh4K4 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: toLower(take('ehstorage${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'ehstorage'
}
sku: {
name: 'Standard_GRS'
}
kind: 'StorageV2'
properties: {
accessTier: 'Hot'
networkAcls: {
defaultAction: 'Allow'
resource ehstorage 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: take('ehstorage${uniqueString(resourceGroup().id)}', 24)
kind: 'StorageV2'
eerhardt marked this conversation as resolved.
Show resolved Hide resolved
location: location
sku: {
name: 'Standard_GRS'
}
properties: {
allowSharedKeyAccess: false
minimumTlsVersion: 'TLS1_2'
networkAcls: {
defaultAction: 'Allow'
}
}
tags: {
'aspire-resource-name': 'ehstorage'
}
}
}

resource blobService_5WQ0wIU09 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01' = {
parent: storageAccount_59pNEh4K4
name: 'default'
properties: {
}
resource blobs 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01' = {
name: 'default'
parent: ehstorage
}

resource roleAssignment_LrhalXYOv 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_59pNEh4K4
name: guid(storageAccount_59pNEh4K4.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')
principalId: principalId
principalType: principalType
}
resource ehstorage_StorageBlobDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(ehstorage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')
principalType: principalType
}
scope: ehstorage
}

resource roleAssignment_DDmC2vNE8 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_59pNEh4K4
name: guid(storageAccount_59pNEh4K4.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')
principalId: principalId
principalType: principalType
}
resource ehstorage_StorageTableDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(ehstorage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3'))
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')
principalType: principalType
}
scope: ehstorage
}

resource roleAssignment_4tZWfnMZF 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: storageAccount_59pNEh4K4
name: guid(storageAccount_59pNEh4K4.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')
principalId: principalId
principalType: principalType
}
resource ehstorage_StorageQueueDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(ehstorage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')
principalType: principalType
}
scope: ehstorage
}

output blobEndpoint string = storageAccount_59pNEh4K4.properties.primaryEndpoints.blob
output queueEndpoint string = storageAccount_59pNEh4K4.properties.primaryEndpoints.queue
output tableEndpoint string = storageAccount_59pNEh4K4.properties.primaryEndpoints.table
output blobEndpoint string = ehstorage.properties.primaryEndpoints.blob

output queueEndpoint string = ehstorage.properties.primaryEndpoints.queue

output tableEndpoint string = ehstorage.properties.primaryEndpoints.table
55 changes: 22 additions & 33 deletions playground/AspireEventHub/EventHubs.AppHost/eventhubns.module.bicep
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
targetScope = 'resourceGroup'

@description('')
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location

@description('')
param sku string = 'Standard'

@description('')
param principalId string

@description('')
param principalType string


resource eventHubsNamespace_wORIGuvCQ 'Microsoft.EventHub/namespaces@2021-11-01' = {
name: toLower(take('eventhubns${uniqueString(resourceGroup().id)}', 24))
location: location
tags: {
'aspire-resource-name': 'eventhubns'
}
sku: {
name: sku
}
properties: {
}
resource eventhubns 'Microsoft.EventHub/namespaces@2017-04-01' = {
name: take('eventhubns-${uniqueString(resourceGroup().id)}', 256)
location: location
eerhardt marked this conversation as resolved.
Show resolved Hide resolved
sku: {
name: sku
}
tags: {
'aspire-resource-name': 'eventhubns'
}
}

resource roleAssignment_2so8CKuFt 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: eventHubsNamespace_wORIGuvCQ
name: guid(eventHubsNamespace_wORIGuvCQ.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')
principalId: principalId
principalType: principalType
}
resource eventhubns_AzureEventHubsDataOwner 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(eventhubns.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec'))
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')
principalType: principalType
}
scope: eventhubns
}

resource eventHub_4BpPMTltx 'Microsoft.EventHub/namespaces/eventhubs@2021-11-01' = {
parent: eventHubsNamespace_wORIGuvCQ
name: 'hub'
location: location
properties: {
}
resource hub 'Microsoft.EventHub/namespaces/eventhubs@2024-01-01' = {
name: 'hub'
parent: eventhubns
}

output eventHubsEndpoint string = eventHubsNamespace_wORIGuvCQ.properties.serviceBusEndpoint
output eventHubsEndpoint string = eventhubns.properties.serviceBusEndpoint
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
"HTTP_PORTS": "{webstory.bindings.http.targetPort}",
"ConnectionStrings__openai": "{openai.connectionString}",
"OpenAI__DeploymentName": "gpt-35-turbo"
"OpenAI__DeploymentName": "gpt-4o"
},
"bindings": {
"http": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
targetScope = 'resourceGroup'

@description('')
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location

@description('')
param principalId string

@description('')
param principalType string


resource cognitiveServicesAccount_wXAGTFUId 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: toLower(take('openai${uniqueString(resourceGroup().id)}', 24))
location: location
kind: 'OpenAI'
sku: {
name: 'S0'
}
properties: {
customSubDomainName: toLower(take(concat('openai', uniqueString(resourceGroup().id)), 24))
publicNetworkAccess: 'Enabled'
}
resource openai 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
name: take('openai-${uniqueString(resourceGroup().id)}', 64)
location: location
kind: 'OpenAI'
properties: {
customSubDomainName: toLower(take(concat('openai', uniqueString(resourceGroup().id)), 24))
publicNetworkAccess: 'Enabled'
disableLocalAuth: true
}
sku: {
name: 'S0'
}
tags: {
'aspire-resource-name': 'openai'
}
}

resource roleAssignment_Hsk8rxWY8 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: cognitiveServicesAccount_wXAGTFUId
name: guid(cognitiveServicesAccount_wXAGTFUId.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442'))
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')
principalId: principalId
principalType: principalType
}
resource openai_CognitiveServicesOpenAIContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(openai.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442'))
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')
principalType: principalType
}
scope: openai
}

resource cognitiveServicesAccountDeployment_hU1MaqMLH 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
parent: cognitiveServicesAccount_wXAGTFUId
name: 'gpt-35-turbo'
sku: {
name: 'Standard'
capacity: 1
}
properties: {
model: {
format: 'OpenAI'
name: 'gpt-35-turbo'
version: '0613'
resource gpt-4o 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
name: 'gpt-4o'
properties: {
model: {
format: 'OpenAI'
name: 'gpt-4o'
version: '2024-05-13'
}
}
sku: {
name: 'Standard'
capacity: 8
}
}
parent: openai
}

output connectionString string = 'Endpoint=${cognitiveServicesAccount_wXAGTFUId.properties.endpoint}'
output connectionString string = 'Endpoint=${openai.properties.endpoint}'
Loading
Loading