Skip to content

Commit

Permalink
Minor bicep updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebunting committed Sep 16, 2024
1 parent 408c522 commit ea3c3b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/01_deploy_app_resources/0101.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ The key tasks are as follows:
7. Use the `DeployAzureResources.bicep` script in the `src/InfrastructureAsCode/` folder to deploy resources out.

{: .note }
> You may receive an error while running this that you must accept the Responsible AI Notice before creating a TextAnalytics (Language) service. To do so, open the [Azure Portal](https://portal.azure.com) and search for "Language" in the menu. Choose the **Language** service and then select Create. On the first page of the form, select the **Continue to create your resource** button at the bottom of the screen. Then, check the box certifying that you have reviewed and acknowledge the terms in the Responsible AI Notice. You can then close the Create Language page and try running the Bicep script again.
> You may receive an error while running this that you must accept the Responsible AI Notice before creating a TextAnalytics (Language) service. To do so, open the [Azure Portal](https://portal.azure.com/) and search for "Language" in the menu. Choose the **Language** service and then select Create. On the first page of the form, select the **Continue to create your resource** button at the bottom of the screen. Then, check the box certifying that you have reviewed and acknowledge the terms in the Responsible AI Notice. You can then close the Create Language page and try running the Bicep script again.
8. Use the `DeployApimAndRedisResource.bicep` script in the `src/InfrastructureAsCode/` folder to deploy **Azure API Management** and **Azure Cache for Redis Enterprise** resources into your resource group.

**Azure API Management** and **Azure Cache for Redis Enterprise** resources can take a longer time to deploy, so they are provided in a separate file. You do not have to wait for the deployment of these resources to complete before starting on the remaining tasks in this exercise.

{: .note }
> **Azure API Management** and **Azure Cache for Redis Enterprise** resources can take a longer time to deploy, so they are provided in a separate file. You do not have to wait for the deployment of these resources to complete before starting on the remaining tasks in this exercise.
> You may receive an error while running this Bicep script related to a terminal provisioning state for the Redis Enterprise database. This may happen because you have not agreed to the legal terms and privacy statements associated with using Marketplace offerings in your subscription. To do so, open the [Azure Portal](https://portal.azure.com/), select **Create a resource** from the menu, and search for "Azure Cache for Redis". Choose the **Azure Cache for Redis** service and select Create. On the **Basics** tab of the **New Redis Cache** page, choose the **Enterprise** option under **Cache SKU**. This selection will display a **Terms** section on the form. Check the box agreeing to the legal terms and privacy statements associated with the Marketplace offering. You can then close the Create Language page and try running the Bicep script again.
## Success Criteria

Expand Down
11 changes: 8 additions & 3 deletions src/InfrastructureAsCode/DeployApimAndRedisResources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var redisCacheName = '${uniqueString(resourceGroup().id)}-redis'
var redisCacheSku = 'Enterprise_E1'
var redisCacheCapacity = 2

@description('Restore the service instead of creating a new instance. This is useful if you previously soft-deleted the service and want to restore it. If you are restoring a service, set this to true. Otherwise, leave this as false.')
param restore bool = false

resource apiManagementService 'Microsoft.ApiManagement/service@2023-09-01-preview' = {
name: apiManagementServiceName
location: location
Expand All @@ -26,6 +29,7 @@ resource apiManagementService 'Microsoft.ApiManagement/service@2023-09-01-previe
properties: {
publisherEmail: apimPublisherEmail
publisherName: apimPublisherName
restore: restore
}
}

Expand All @@ -39,18 +43,19 @@ resource redisCache 'Microsoft.Cache/redisEnterprise@2024-03-01-preview' = {
identity: {
type: 'SystemAssigned'
}
properties: {}
}

resource redisCacheDatabase 'Microsoft.Cache/redisEnterprise/databases@2024-03-01-preview' = {
parent: redisCache
name: 'default'
parent: redisCache
properties: {
clientProtocol: 'Encrypted'
evictionPolicy: 'NoEviction'
clusteringPolicy: 'EnterpriseCluster'
deferUpgrade: 'NotDeferred'
modules: [
{
name: 'RedisJSON'
}
{
name: 'RediSearch'
}
Expand Down
2 changes: 1 addition & 1 deletion src/InfrastructureAsCode/DeployAzureResources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ param deployments array = [
}
]

@description('Restore the service instead of creating a new instance. This is useful if you previously soft-delted the service and want to restore it. If you are restoring a service, set this to true. Otherwise, leave this as false.')
@description('Restore the service instead of creating a new instance. This is useful if you previously soft-deleted the service and want to restore it. If you are restoring a service, set this to true. Otherwise, leave this as false.')
param restore bool = false

var cosmosDbName = '${uniqueString(resourceGroup().id)}-cosmosdb'
Expand Down

0 comments on commit ea3c3b9

Please sign in to comment.