-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Azure.Provisioning to latest version (#5592)
* Update Azure.Provisioning to latest version Fix #5583 WIP: This first stab converts KeyVault to the new Provisioning version. * Add AsBicepParameter * Update more stuff to make it deployable. * Add a location parameter so azd up works. * Update Storage to use the new CDK * Update PostgreSQL to use the new CDK * Sort the bicep statements so that parameters appear at the top and outputs at the bottom * Update Redis to use the new CDK * Update CosmosDB to use the new CDK * Update Sql to use the new CDK * Update ServiceBus to use the new CDK * Update SignalR to use the new CDK * Update Search to use the new CDK * Update ApplicationInsights and OperationalInsights to use the new CDK * Update AppConfiguration to use the new CDK * Update CognitiveServices to use the new CDK * Update WebPubSub to use the new CDK * Update the CDK to version 1.0.0-alpha.20240912 * Update to latest CDK version to fix CognitiveServices * Update EventHubs to use new CDK * Get tests building * Fix up so azd up works - Use resource versions in more places - Always add a location parameter - Can remove sorting now that the CDK has it * Use GetTenant function * Fix bicep tests Also consolidate ResourceVersions into a shared file. Use defined ResourceVersions in more places. * Update test nuget.configs * Update the rest of the bicep in the playground apps. * Use simpler expression to set SqlFirewallRule addresses * Add XML docs to the new APIs. * Remove hard-coded ResourceVersions. The ones that still need to be specified are: Top-level - RedisResource - SignalRService - WebPubSubService Child resources - CognitiveServicesAccountDeployment - CosmosDBSqlDatabase - PostgreSqlFlexibleServerFirewallRule - PostgreSqlFlexibleServerDatabase - SqlFirewallRule - SqlDatabase * Fix up whitespace * Use 8.x naming scheme. * Fix deployment name in OpenAI * Respond to PR feedback - Default Storage AccessTier = Hot, to keep existing behavior - Use IPAddress when setting PostgreSQL firewall rules
- Loading branch information
Showing
65 changed files
with
2,844 additions
and
2,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 50 additions & 55 deletions
105
playground/AspireEventHub/EventHubs.AppHost/ehstorage.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,67 @@ | ||
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@2023-01-01' = { | ||
name: toLower(take('ehstorage${uniqueString(resourceGroup().id)}', 24)) | ||
kind: 'StorageV2' | ||
location: location | ||
sku: { | ||
name: 'Standard_GRS' | ||
} | ||
properties: { | ||
accessTier: 'Hot' | ||
allowSharedKeyAccess: false | ||
minimumTlsVersion: 'TLS1_2' | ||
networkAcls: { | ||
defaultAction: 'Allow' | ||
} | ||
} | ||
tags: { | ||
'aspire-resource-name': 'ehstorage' | ||
} | ||
minimumTlsVersion: 'TLS1_2' | ||
allowSharedKeyAccess: false | ||
} | ||
} | ||
|
||
resource blobService_5WQ0wIU09 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01' = { | ||
parent: storageAccount_59pNEh4K4 | ||
name: 'default' | ||
properties: { | ||
} | ||
resource blobs 'Microsoft.Storage/storageAccounts/blobServices@2023-01-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
55
playground/AspireEventHub/EventHubs.AppHost/eventhubns.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: toLower(take('eventhubns${uniqueString(resourceGroup().id)}', 24)) | ||
location: location | ||
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 |
71 changes: 33 additions & 38 deletions
71
playground/AzureSearchEndToEnd/AzureSearch.AppHost/search.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,45 @@ | ||
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 searchService_j3umigYGT 'Microsoft.Search/searchServices@2023-11-01' = { | ||
name: toLower(take('search${uniqueString(resourceGroup().id)}', 24)) | ||
location: location | ||
tags: { | ||
'aspire-resource-name': 'search' | ||
} | ||
sku: { | ||
name: 'basic' | ||
} | ||
properties: { | ||
replicaCount: 1 | ||
partitionCount: 1 | ||
hostingMode: 'default' | ||
disableLocalAuth: true | ||
} | ||
resource search 'Microsoft.Search/searchServices@2023-11-01' = { | ||
name: toLower(take('search${uniqueString(resourceGroup().id)}', 24)) | ||
location: location | ||
properties: { | ||
hostingMode: 'default' | ||
disableLocalAuth: true | ||
partitionCount: 1 | ||
replicaCount: 1 | ||
} | ||
sku: { | ||
name: 'basic' | ||
} | ||
tags: { | ||
'aspire-resource-name': 'search' | ||
} | ||
} | ||
|
||
resource roleAssignment_f77ijNEYF 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
scope: searchService_j3umigYGT | ||
name: guid(searchService_j3umigYGT.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8ebe5a00-799e-43f5-93ac-243d3dce84a7')) | ||
properties: { | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8ebe5a00-799e-43f5-93ac-243d3dce84a7') | ||
principalId: principalId | ||
principalType: principalType | ||
} | ||
resource search_SearchIndexDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(search.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8ebe5a00-799e-43f5-93ac-243d3dce84a7')) | ||
properties: { | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8ebe5a00-799e-43f5-93ac-243d3dce84a7') | ||
principalType: principalType | ||
} | ||
scope: search | ||
} | ||
|
||
resource roleAssignment_s0J7B4aGN 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
scope: searchService_j3umigYGT | ||
name: guid(searchService_j3umigYGT.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0')) | ||
properties: { | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0') | ||
principalId: principalId | ||
principalType: principalType | ||
} | ||
resource search_SearchServiceContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(search.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0')) | ||
properties: { | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0') | ||
principalType: principalType | ||
} | ||
scope: search | ||
} | ||
|
||
output connectionString string = 'Endpoint=https://${searchService_j3umigYGT.name}.search.windows.net' | ||
output connectionString string = 'Endpoint=https://${search.name}.search.windows.net' |
Oops, something went wrong.