From 233b3d4adda94fbff43c418f4a8da4246af2259b Mon Sep 17 00:00:00 2001 From: Bernie White Date: Thu, 4 Jan 2024 00:26:04 +1000 Subject: [PATCH] Relax `Azure.Cognitive.ManagedIdentity` to required configurations #2559 (#2626) --- .vscode/settings.json | 1 + docs/CHANGELOG-v1.md | 2 + .../rules/Azure.Cognitive.ManagedIdentity.md | 21 +- docs/examples-cognitive.bicep | 21 +- docs/examples-cognitive.json | 23 +- pipeline.build.ps1 | 2 +- .../rules/Azure.Cognitive.Rule.yaml | 6 +- .../Azure.Cognitive.Tests.ps1 | 24 +- .../Resources.Cognitive.json | 1120 ++++++++--------- .../cognitive.tests.bicep | 8 +- .../cognitive.tests.json | 10 +- 11 files changed, 645 insertions(+), 593 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 944b5748e7c..ae21178b8cc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -68,6 +68,7 @@ "DEPLOYIFNOTEXISTS", "DISPLAYNAME", "endregion", + "Entra", "exfiltration", "failover", "GREATEROREQUAL", diff --git a/docs/CHANGELOG-v1.md b/docs/CHANGELOG-v1.md index fd75423af45..b5d7020116a 100644 --- a/docs/CHANGELOG-v1.md +++ b/docs/CHANGELOG-v1.md @@ -40,6 +40,8 @@ What's changed since v1.32.1: - Added option for excluding subnets to `Azure.VNET.UseNSGs` by @BernieWhite. [#2572](https://github.com/Azure/PSRule.Rules.Azure/issues/2572) - To add a subnet exclusion, set the `AZURE_VNET_SUBNET_EXCLUDED_FROM_NSG` option. + - Relax `Azure.Cognitive.ManagedIdentity` to required configurations by @BernieWhite. + [#2559](https://github.com/Azure/PSRule.Rules.Azure/issues/2559) - Engineering: - Bump xunit to v2.6.4. [#2618](https://github.com/Azure/PSRule.Rules.Azure/pull/2618) diff --git a/docs/en/rules/Azure.Cognitive.ManagedIdentity.md b/docs/en/rules/Azure.Cognitive.ManagedIdentity.md index 52f89e96b5d..9e33ae7b586 100644 --- a/docs/en/rules/Azure.Cognitive.ManagedIdentity.md +++ b/docs/en/rules/Azure.Cognitive.ManagedIdentity.md @@ -1,8 +1,8 @@ --- -reviewed: 2023-10-01 +reviewed: 2024-01-03 severity: Important pillar: Security -category: Authentication +category: SE:05 Identity and access management resource: Cognitive Services online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.Cognitive.ManagedIdentity/ --- @@ -22,7 +22,7 @@ Using Azure managed identities have the following benefits: - You don't need to store or manage credentials. Azure automatically generates tokens and performs rotation. -- You can use managed identities to authenticate to any Azure service that supports Azure AD authentication. +- You can use managed identities to authenticate to any Azure service that supports Entra ID (previously Azure AD) authentication. - Managed identities can be used without any additional cost. ## RECOMMENDATION @@ -52,7 +52,7 @@ For example: "sku": { "name": "S0" }, - "kind": "CognitiveServices", + "kind": "TextAnalytics", "properties": { "publicNetworkAccess": "Disabled", "networkAcls": { @@ -73,7 +73,7 @@ To deploy accounts that pass this rule: For example: ```bicep -resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = { +resource language 'Microsoft.CognitiveServices/accounts@2023-05-01' = { name: name location: location identity: { @@ -82,7 +82,7 @@ resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = { sku: { name: 'S0' } - kind: 'CognitiveServices' + kind: 'TextAnalytics' properties: { publicNetworkAccess: 'Disabled' networkAcls: { @@ -101,9 +101,16 @@ To address this issue at runtime use the following policies: /providers/Microsoft.Authorization/policyDefinitions/fe3fd216-4f83-4fc1-8984-2bbec80a3418 ``` +## NOTES + +Configuration of additional Azure resources is not required for all Cognitive Services. +This rule will run for the following Cognitive Services: + +- `TextAnalytics` - Language service. + ## LINKS -- [Use identity-based authentication](https://learn.microsoft.com/azure/well-architected/security/design-identity-authentication#use-identity-based-authentication) +- [SE:05 Identity and access management](https://learn.microsoft.com/azure/well-architected/security/identity-access#resource-identity) - [Azure Policy built-in policy definitions for Azure AI services](https://learn.microsoft.com/azure/ai-services/policy-reference) - [IM-1: Use centralized identity and authentication system](https://learn.microsoft.com/security/benchmark/azure/baselines/cognitive-services-security-baseline#im-1-use-centralized-identity-and-authentication-system) - [IM-3: Manage application identities securely and automatically](https://learn.microsoft.com/security/benchmark/azure/baselines/cognitive-services-security-baseline#im-3-manage-application-identities-securely-and-automatically) diff --git a/docs/examples-cognitive.bicep b/docs/examples-cognitive.bicep index 38eff69db81..d9bf25770fd 100644 --- a/docs/examples-cognitive.bicep +++ b/docs/examples-cognitive.bicep @@ -9,8 +9,25 @@ param name string @description('The location resources will be deployed.') param location string = resourceGroup().location -// An example multi-service cognitive services account +// An example multi-service cognitive services account. resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = { + name: name + location: location + sku: { + name: 'S0' + } + kind: 'CognitiveServices' + properties: { + publicNetworkAccess: 'Disabled' + networkAcls: { + defaultAction: 'Deny' + } + disableLocalAuth: true + } +} + +// An example of the language services account. +resource language 'Microsoft.CognitiveServices/accounts@2023-05-01' = { name: name location: location identity: { @@ -19,7 +36,7 @@ resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = { sku: { name: 'S0' } - kind: 'CognitiveServices' + kind: 'TextAnalytics' properties: { publicNetworkAccess: 'Disabled' networkAcls: { diff --git a/docs/examples-cognitive.json b/docs/examples-cognitive.json index 9f3321c810c..652b57c2108 100644 --- a/docs/examples-cognitive.json +++ b/docs/examples-cognitive.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.21.1.54444", - "templateHash": "17850178672994683728" + "version": "0.24.24.22086", + "templateHash": "4359857000491870165" } }, "parameters": { @@ -24,6 +24,23 @@ } }, "resources": [ + { + "type": "Microsoft.CognitiveServices/accounts", + "apiVersion": "2023-05-01", + "name": "[parameters('name')]", + "location": "[parameters('location')]", + "sku": { + "name": "S0" + }, + "kind": "CognitiveServices", + "properties": { + "publicNetworkAccess": "Disabled", + "networkAcls": { + "defaultAction": "Deny" + }, + "disableLocalAuth": true + } + }, { "type": "Microsoft.CognitiveServices/accounts", "apiVersion": "2023-05-01", @@ -35,7 +52,7 @@ "sku": { "name": "S0" }, - "kind": "CognitiveServices", + "kind": "TextAnalytics", "properties": { "publicNetworkAccess": "Disabled", "networkAcls": { diff --git a/pipeline.build.ps1 b/pipeline.build.ps1 index 2e6b19c838f..01dc5d55f27 100644 --- a/pipeline.build.ps1 +++ b/pipeline.build.ps1 @@ -409,7 +409,7 @@ task BuildRuleDocs Build, Dependencies, { Recommendation = $_.Info.Recommendation Pillar = $_.Tag.'Azure.WAF/pillar' Control = $_.Tag.'Azure.MCSB.v1/control' - Source = "https://github.com/Azure/PSRule.Rules.Azure/blob/main/src/PSRule.Rules.Azure/rules/$(($_.Source.Path -split '/')[-1])" + Source = "https://github.com/Azure/PSRule.Rules.Azure/blob/main/src/PSRule.Rules.Azure/rules/$(($_.Source.Path -split '/', '\')[-1])" } } $metadata | ConvertTo-Json -Depth 5 | Set-Content -Path ./docs/es/rules/metadata.json -Force; diff --git a/src/PSRule.Rules.Azure/rules/Azure.Cognitive.Rule.yaml b/src/PSRule.Rules.Azure/rules/Azure.Cognitive.Rule.yaml index 0fc89abbe65..adf16bb725f 100644 --- a/src/PSRule.Rules.Azure/rules/Azure.Cognitive.Rule.yaml +++ b/src/PSRule.Rules.Azure/rules/Azure.Cognitive.Rule.yaml @@ -40,13 +40,17 @@ metadata: tags: release: GA ruleSet: 2022_09 - Azure.WAF/pillar: 'Security' + Azure.WAF/pillar: Security labels: Azure.MCSB.v1/control: [ 'IM-1', 'IM-3' ] Azure.Policy/id: /providers/Microsoft.Authorization/policyDefinitions/fe3fd216-4f83-4fc1-8984-2bbec80a3418 spec: type: - Microsoft.CognitiveServices/accounts + where: + field: kind + in: + - TextAnalytics condition: field: Identity.Type in: diff --git a/tests/PSRule.Rules.Azure.Tests/Azure.Cognitive.Tests.ps1 b/tests/PSRule.Rules.Azure.Tests/Azure.Cognitive.Tests.ps1 index 5d260102544..e14ae91d800 100644 --- a/tests/PSRule.Rules.Azure.Tests/Azure.Cognitive.Tests.ps1 +++ b/tests/PSRule.Rules.Azure.Tests/Azure.Cognitive.Tests.ps1 @@ -33,7 +33,7 @@ Describe 'Azure.Cognitive' -Tag 'Cognitive' { ErrorAction = 'Stop' } $dataPath = Join-Path -Path $here -ChildPath 'Resources.Cognitive.json'; - $result = Invoke-PSRule @invokeParams -InputPath $dataPath; + $result = Invoke-PSRule @invokeParams -InputPath $dataPath -Outcome All; } It 'Azure.Cognitive.PublicAccess' { @@ -58,14 +58,20 @@ Describe 'Azure.Cognitive' -Tag 'Cognitive' { # Fail $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Fail' }); $ruleResult | Should -Not -BeNullOrEmpty; - $ruleResult.Length | Should -Be 2; - $ruleResult.TargetName | Should -BeIn 'luis-A', 'luis-A-authoring'; + $ruleResult.Length | Should -Be 1; + $ruleResult.TargetName | Should -BeIn 'textanalytics-A'; # Pass $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' }); $ruleResult | Should -Not -BeNullOrEmpty; + $ruleResult.Length | Should -Be 1; + $ruleResult.TargetName | Should -BeIn 'textanalytics-B'; + + # Fail + $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'None' }); + $ruleResult | Should -Not -BeNullOrEmpty; $ruleResult.Length | Should -Be 2; - $ruleResult.TargetName | Should -BeIn 'textanalytics-A', 'textanalytics-B'; + $ruleResult.TargetName | Should -BeIn 'luis-A', 'luis-A-authoring'; } It 'Azure.Cognitive.DisableLocalAuth' { @@ -148,8 +154,14 @@ Describe 'Azure.Cognitive' -Tag 'Cognitive' { # Pass $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' }); $ruleResult | Should -Not -BeNullOrEmpty; - $ruleResult.Length | Should -Be 2; - $ruleResult.TargetName | Should -BeIn 'cognitive-01', 'cognitive-03'; + $ruleResult.Length | Should -Be 1; + $ruleResult.TargetName | Should -BeIn 'cognitive-03'; + + # None + $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'None' }); + $ruleResult | Should -Not -BeNullOrEmpty; + $ruleResult.Length | Should -Be 1; + $ruleResult.TargetName | Should -BeIn 'cognitive-01'; } It 'Azure.Cognitive.DisableLocalAuth' { diff --git a/tests/PSRule.Rules.Azure.Tests/Resources.Cognitive.json b/tests/PSRule.Rules.Azure.Tests/Resources.Cognitive.json index 06676fa0d68..2f7ed8e7cae 100644 --- a/tests/PSRule.Rules.Azure.Tests/Resources.Cognitive.json +++ b/tests/PSRule.Rules.Azure.Tests/Resources.Cognitive.json @@ -1,576 +1,570 @@ [ - { - "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A", - "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A", - "Identity": null, - "Kind": "LUIS", - "Location": "region", - "ManagedBy": null, - "ResourceName": "luis-A", - "Name": "luis-A", - "Plan": null, - "Properties": { - "endpoint": "https://luis-A.cognitiveservices.azure.com/", - "customSubDomainName": "luis-A", - "networkAcls": { - "defaultAction": "Allow", - "virtualNetworkRules": [], - "ipRules": [] - }, - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "capabilities": [ - { - "name": "VirtualNetworks" - }, - { - "name": "Container", - "value": "LUIS.LUIS" - } - ] - }, - "ResourceGroupName": "rg-test", - "Type": "Microsoft.CognitiveServices/accounts", - "ResourceType": "Microsoft.CognitiveServices/accounts", - "Sku": { - "Name": "F0", - "Tier": null, - "Size": null, - "Family": null, - "Model": null, - "Capacity": null + { + "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A", + "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A", + "Identity": null, + "Kind": "LUIS", + "Location": "region", + "ManagedBy": null, + "ResourceName": "luis-A", + "Name": "luis-A", + "Plan": null, + "Properties": { + "endpoint": "https://luis-A.cognitiveservices.azure.com/", + "customSubDomainName": "luis-A", + "networkAcls": { + "defaultAction": "Allow", + "virtualNetworkRules": [], + "ipRules": [] + }, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" }, - "Tags": null, - "SubscriptionId": "00000000-0000-0000-0000-000000000000" + { + "name": "Container", + "value": "LUIS.LUIS" + } + ] + }, + "ResourceGroupName": "rg-test", + "Type": "Microsoft.CognitiveServices/accounts", + "ResourceType": "Microsoft.CognitiveServices/accounts", + "Sku": { + "Name": "F0", + "Tier": null, + "Size": null, + "Family": null, + "Model": null, + "Capacity": null + }, + "Tags": null, + "SubscriptionId": "00000000-0000-0000-0000-000000000000" + }, + { + "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A-Authoring", + "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A-Authoring", + "Identity": null, + "Kind": "LUIS.Authoring", + "Location": "region", + "ManagedBy": null, + "ResourceName": "luis-A-Authoring", + "Name": "luis-A-Authoring", + "Plan": null, + "Properties": { + "endpoint": "https://luis-A-authoring.cognitiveservices.azure.com/", + "customSubDomainName": "luis-A-authoring", + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + } + ] + }, + "ResourceGroupName": "rg-test", + "Type": "Microsoft.CognitiveServices/accounts", + "ResourceType": "Microsoft.CognitiveServices/accounts", + "Sku": { + "Name": "F0", + "Tier": null, + "Size": null, + "Family": null, + "Model": null, + "Capacity": null }, - { - "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A-Authoring", - "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-test/providers/Microsoft.CognitiveServices/accounts/luis-A-Authoring", - "Identity": null, - "Kind": "LUIS.Authoring", - "Location": "region", - "ManagedBy": null, - "ResourceName": "luis-A-Authoring", - "Name": "luis-A-Authoring", - "Plan": null, - "Properties": { - "endpoint": "https://luis-A-authoring.cognitiveservices.azure.com/", - "customSubDomainName": "luis-A-authoring", - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "capabilities": [ - { - "name": "VirtualNetworks" - } + "Tags": null, + "SubscriptionId": "00000000-0000-0000-0000-000000000000" + }, + { + "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-A", + "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-A", + "Kind": "TextAnalytics", + "Location": "eastus", + "ManagedBy": null, + "ResourceName": "textanalytics-A", + "Name": "textanalytics-A", + "ExtensionResourceName": null, + "ParentResource": null, + "Plan": null, + "Properties": { + "endpoint": "https://textanalytics-A.cognitiveservices.azure.com/", + "provisioningState": "Succeeded", + "apiProperties": { + "qnaAzureSearchEndpointId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Search/searchServices/textanalytics-A-search", + "qnaAzureSearchEndpointKey": null + }, + "quotaLimit": { + "rules": [ + { + "key": "workflow.endpoint.postcalls", + "renewalPeriod": 2592000, + "count": 5000, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "/language/:analyze-conversations", + "method": "*" + } ] + } + ] + }, + "isMigrated": false, + "customSubDomainName": "textanalytics-A", + "networkAcls": { + "defaultAction": "Deny", + "virtualNetworkRules": [], + "ipRules": [] + }, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "DynamicThrottling" }, - "ResourceGroupName": "rg-test", - "Type": "Microsoft.CognitiveServices/accounts", - "ResourceType": "Microsoft.CognitiveServices/accounts", - "Sku": { - "Name": "F0", - "Tier": null, - "Size": null, - "Family": null, - "Model": null, - "Capacity": null + { + "name": "VirtualNetworks" }, - "Tags": null, - "SubscriptionId": "00000000-0000-0000-0000-000000000000" - }, - { - "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-A", - "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-A", - "Identity": { - "PrincipalId": "00000000-0000-0000-0000-000000000000", - "TenantId": "00000000-0000-0000-0000-000000000000", - "Type": "SystemAssigned", - "UserAssignedIdentities": null + { + "name": "CustomerManagedKey" }, - "Kind": "TextAnalytics", - "Location": "eastus", - "ManagedBy": null, - "ResourceName": "textanalytics-A", - "Name": "textanalytics-A", - "ExtensionResourceName": null, - "ParentResource": null, - "Plan": null, - "Properties": { - "endpoint": "https://textanalytics-A.cognitiveservices.azure.com/", - "provisioningState": "Succeeded", - "apiProperties": { - "qnaAzureSearchEndpointId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Search/searchServices/textanalytics-A-search", - "qnaAzureSearchEndpointKey": null - }, - "quotaLimit": { - "rules": [ - { - "key": "workflow.endpoint.postcalls", - "renewalPeriod": 2592000, - "count": 5000, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "/language/:analyze-conversations", - "method": "*" - } - ] - } - ] - }, - "isMigrated": false, - "customSubDomainName": "textanalytics-A", - "networkAcls": { - "defaultAction": "Deny", - "virtualNetworkRules": [], - "ipRules": [] - }, - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "capabilities": [ - { - "name": "DynamicThrottling" - }, - { - "name": "VirtualNetworks" - }, - { - "name": "CustomerManagedKey" - }, - { - "name": "CustomerManagedStorage" - }, - { - "name": "Container", - "value": "TextAnalytics.*,TextAnalytics.Healthcare,TextAnalytics.Keyphrase,TextAnalytics.KeyphraseV2,TextAnalytics.KeyPhraseONNX,TextAnalytics.LanguageFastText,TextAnalytics.Language,TextAnalytics.LanguageV2,TextAnalytics.Sentiment,TextAnalytics.SentimentV2,TextAnalytics.SentimentV3,TextAnalytics.SentimentV3Preview" - }, - { - "name": "Cloud", - "value": "TextAnalytics.Healthcare,TextAnalytics.Analyze,QuestionAnswer.AllApis,LanguageService.QuestionAnsweringApis" - } - ], - "endpoints": { - "Text Analytics": "https://textanalytics-A.cognitiveservices.azure.com/", - "Custom Text Authoring": "https://textanalytics-A.cognitiveservices.azure.com/", - "Conversational Language Understanding Authoring": "https://textanalytics-A.cognitiveservices.azure.com/", - "ConversationalLURuntime": "https://textanalytics-A.cognitiveservices.azure.com/", - "Language": "https://textanalytics-A.cognitiveservices.azure.com/", - "Language-2022-05-01": "https://textanalytics-A.cognitiveservices.azure.com/", - "QnAMaker": "https://textanalytics-A.cognitiveservices.azure.com/", - "turing": "https://textanalytics-A.cognitiveservices.azure.com/", - "Turing DeepWrite": "https://textanalytics-A.cognitiveservices.azure.com/", - "QuestionAnswering": "https://textanalytics-A.cognitiveservices.azure.com/", - "QuestionAnsweringBizQA": "https://textanalytics-A.cognitiveservices.azure.com/", - "QuestionAnsweringQnAGen": "https://textanalytics-A.cognitiveservices.azure.com/", - "LUIS.Authoring": "https://textanalytics-A.cognitiveservices.azure.com/" - } + { + "name": "CustomerManagedStorage" }, - "ResourceGroupName": "test-rg", - "Type": "Microsoft.CognitiveServices/accounts", - "ResourceType": "Microsoft.CognitiveServices/accounts", - "ExtensionResourceType": null, - "Sku": { - "Name": "F0", - "Tier": null, - "Size": null, - "Family": null, - "Model": null, - "Capacity": null + { + "name": "Container", + "value": "TextAnalytics.*,TextAnalytics.Healthcare,TextAnalytics.Keyphrase,TextAnalytics.KeyphraseV2,TextAnalytics.KeyPhraseONNX,TextAnalytics.LanguageFastText,TextAnalytics.Language,TextAnalytics.LanguageV2,TextAnalytics.Sentiment,TextAnalytics.SentimentV2,TextAnalytics.SentimentV3,TextAnalytics.SentimentV3Preview" }, - "SubscriptionId": "00000000-0000-0000-0000-000000000000" + { + "name": "Cloud", + "value": "TextAnalytics.Healthcare,TextAnalytics.Analyze,QuestionAnswer.AllApis,LanguageService.QuestionAnsweringApis" + } + ], + "endpoints": { + "Text Analytics": "https://textanalytics-A.cognitiveservices.azure.com/", + "Custom Text Authoring": "https://textanalytics-A.cognitiveservices.azure.com/", + "Conversational Language Understanding Authoring": "https://textanalytics-A.cognitiveservices.azure.com/", + "ConversationalLURuntime": "https://textanalytics-A.cognitiveservices.azure.com/", + "Language": "https://textanalytics-A.cognitiveservices.azure.com/", + "Language-2022-05-01": "https://textanalytics-A.cognitiveservices.azure.com/", + "QnAMaker": "https://textanalytics-A.cognitiveservices.azure.com/", + "turing": "https://textanalytics-A.cognitiveservices.azure.com/", + "Turing DeepWrite": "https://textanalytics-A.cognitiveservices.azure.com/", + "QuestionAnswering": "https://textanalytics-A.cognitiveservices.azure.com/", + "QuestionAnsweringBizQA": "https://textanalytics-A.cognitiveservices.azure.com/", + "QuestionAnsweringQnAGen": "https://textanalytics-A.cognitiveservices.azure.com/", + "LUIS.Authoring": "https://textanalytics-A.cognitiveservices.azure.com/" + } + }, + "ResourceGroupName": "test-rg", + "Type": "Microsoft.CognitiveServices/accounts", + "ResourceType": "Microsoft.CognitiveServices/accounts", + "ExtensionResourceType": null, + "Sku": { + "Name": "F0", + "Tier": null, + "Size": null, + "Family": null, + "Model": null, + "Capacity": null }, - { - "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-B", - "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-B", - "Identity": { - "PrincipalId": "00000000-0000-0000-0000-000000000000", - "TenantId": "00000000-0000-0000-0000-000000000000", - "Type": "SystemAssigned", - "UserAssignedIdentities": null + "SubscriptionId": "00000000-0000-0000-0000-000000000000" + }, + { + "ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-B", + "Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/textanalytics-B", + "Identity": { + "PrincipalId": "00000000-0000-0000-0000-000000000000", + "TenantId": "00000000-0000-0000-0000-000000000000", + "Type": "SystemAssigned", + "UserAssignedIdentities": null + }, + "Kind": "TextAnalytics", + "Location": "eastus", + "ManagedBy": null, + "ResourceName": "textanalytics-B", + "Name": "textanalytics-B", + "ExtensionResourceName": null, + "ParentResource": null, + "Plan": null, + "Properties": { + "endpoint": "https://textanalytics-B.cognitiveservices.azure.com/", + "provisioningState": "Succeeded", + "apiProperties": { + "qnaAzureSearchEndpointKey": null + }, + "callRateLimit": { + "rules": [ + { + "key": "workflow.endpoint.postcalls", + "renewalPeriod": 60, + "count": 1000, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "/language/:analyze-conversations", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.authoring.customtext.getcalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-text/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.updatecalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-text/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.authoring.customtext.march.getcalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/authoring/analyze-text/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.march.updatecalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/authoring/analyze-text/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.authoring.customtext.internal.getcalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-text/internal/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.internal.updatecalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-text/internal/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.getCalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-conversations/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.updateCalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-conversations/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.march.getCalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/authoring/analyze-conversations/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.march.updateCalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/authoring/analyze-conversations/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.internal.getCalls", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-conversations/internal/projects/*", + "method": "GET" + } + ] + }, + { + "key": "textAnalytics.unifiedAuthoring.clu.internal.updateCalls", + "renewalPeriod": 60, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/analyze-conversations/internal/projects/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.customText", + "renewalPeriod": 60, + "count": 100, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "text/analytics/v3.1-preview.ct.1/analyze/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.analyze", + "renewalPeriod": 60, + "count": 300, + "dynamicThrottlingEnabled": true, + "matchPatterns": [ + { + "path": "text/analytics/v3.1/analyze/*", + "method": "*" + }, + { + "path": "text/analytics/v3.2-preview.1/analyze/*", + "method": "*" + }, + { + "path": "text/analytics/v3.2-preview.2/analyze/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.healthcare", + "renewalPeriod": 60, + "count": 300, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "text/analytics/v3.1/entities/health/*", + "method": "*" + }, + { + "path": "text/analytics/v3.2-preview.1/health/*", + "method": "*" + }, + { + "path": "text/analytics/v3.2-preview.2/health/*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics", + "renewalPeriod": 60, + "count": 1000, + "dynamicThrottlingEnabled": true, + "matchPatterns": [ + { + "path": "text/analytics/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "questionanswering", + "renewalPeriod": 60, + "count": 600, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "qnamaker/*", + "method": "*" + } + ] + }, + { + "key": "unifiedlanguage.questionanswering", + "renewalPeriod": 60, + "count": 600, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "language/query-knowledgebases/*", + "method": "*" + }, + { + "path": "language/:query-*", + "method": "*" + } + ] + }, + { + "key": "textAnalytics.analyze.internal.autoTagging", + "renewalPeriod": 60, + "count": 150, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "TextAnalytics/ct-auto-tagging", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 20, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "quotaLimit": { + "rules": [ + { + "key": "workflow.endpoint.postcalls", + "renewalPeriod": 2592000, + "count": 100000, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "/language/:analyze-conversations", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "customSubDomainName": "textanalytics-B", + "networkAcls": { + "defaultAction": "Deny", + "virtualNetworkRules": [], + "ipRules": [] + }, + "userOwnedStorage": [ + { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/storage" + } + ], + "privateEndpointConnections": [], + "publicNetworkAccess": "Disabled", + "disableLocalAuth": true, + "capabilities": [ + { + "name": "DynamicThrottling" }, - "Kind": "TextAnalytics", - "Location": "eastus", - "ManagedBy": null, - "ResourceName": "textanalytics-B", - "Name": "textanalytics-B", - "ExtensionResourceName": null, - "ParentResource": null, - "Plan": null, - "Properties": { - "endpoint": "https://textanalytics-B.cognitiveservices.azure.com/", - "provisioningState": "Succeeded", - "apiProperties": { - "qnaAzureSearchEndpointKey": null - }, - "callRateLimit": { - "rules": [ - { - "key": "workflow.endpoint.postcalls", - "renewalPeriod": 60, - "count": 1000, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "/language/:analyze-conversations", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.authoring.customtext.getcalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-text/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.updatecalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-text/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.authoring.customtext.march.getcalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/authoring/analyze-text/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.march.updatecalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/authoring/analyze-text/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.authoring.customtext.internal.getcalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-text/internal/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.internal.updatecalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-text/internal/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.getCalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-conversations/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.updateCalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-conversations/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.march.getCalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/authoring/analyze-conversations/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.march.updateCalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/authoring/analyze-conversations/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.internal.getCalls", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-conversations/internal/projects/*", - "method": "GET" - } - ] - }, - { - "key": "textAnalytics.unifiedAuthoring.clu.internal.updateCalls", - "renewalPeriod": 60, - "count": 10, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/analyze-conversations/internal/projects/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.customText", - "renewalPeriod": 60, - "count": 100, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "text/analytics/v3.1-preview.ct.1/analyze/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.analyze", - "renewalPeriod": 60, - "count": 300, - "dynamicThrottlingEnabled": true, - "matchPatterns": [ - { - "path": "text/analytics/v3.1/analyze/*", - "method": "*" - }, - { - "path": "text/analytics/v3.2-preview.1/analyze/*", - "method": "*" - }, - { - "path": "text/analytics/v3.2-preview.2/analyze/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.healthcare", - "renewalPeriod": 60, - "count": 300, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "text/analytics/v3.1/entities/health/*", - "method": "*" - }, - { - "path": "text/analytics/v3.2-preview.1/health/*", - "method": "*" - }, - { - "path": "text/analytics/v3.2-preview.2/health/*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics", - "renewalPeriod": 60, - "count": 1000, - "dynamicThrottlingEnabled": true, - "matchPatterns": [ - { - "path": "text/analytics/*", - "method": "*" - } - ] - }, - { - "key": "container.billing", - "renewalPeriod": 10, - "count": 500, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "billing/*", - "method": "*" - } - ] - }, - { - "key": "questionanswering", - "renewalPeriod": 60, - "count": 600, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "qnamaker/*", - "method": "*" - } - ] - }, - { - "key": "unifiedlanguage.questionanswering", - "renewalPeriod": 60, - "count": 600, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "language/query-knowledgebases/*", - "method": "*" - }, - { - "path": "language/:query-*", - "method": "*" - } - ] - }, - { - "key": "textAnalytics.analyze.internal.autoTagging", - "renewalPeriod": 60, - "count": 150, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "TextAnalytics/ct-auto-tagging", - "method": "*" - } - ] - }, - { - "key": "default", - "renewalPeriod": 1, - "count": 20, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "*", - "method": "*" - } - ] - } - ] - }, - "quotaLimit": { - "rules": [ - { - "key": "workflow.endpoint.postcalls", - "renewalPeriod": 2592000, - "count": 100000, - "dynamicThrottlingEnabled": false, - "matchPatterns": [ - { - "path": "/language/:analyze-conversations", - "method": "*" - } - ] - } - ] - }, - "isMigrated": false, - "customSubDomainName": "textanalytics-B", - "networkAcls": { - "defaultAction": "Deny", - "virtualNetworkRules": [], - "ipRules": [] - }, - "userOwnedStorage": [ - { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/storage" - } - ], - "privateEndpointConnections": [], - "publicNetworkAccess": "Disabled", - "disableLocalAuth": true, - "capabilities": [ - { - "name": "DynamicThrottling" - }, - { - "name": "VirtualNetworks" - }, - { - "name": "CustomerManagedKey" - }, - { - "name": "CustomerManagedStorage" - }, - { - "name": "Container", - "value": "TextAnalytics.*,TextAnalytics.Healthcare,TextAnalytics.Keyphrase,TextAnalytics.KeyphraseV2,TextAnalytics.KeyPhraseONNX,TextAnalytics.LanguageFastText,TextAnalytics.Language,TextAnalytics.LanguageV2,TextAnalytics.Sentiment,TextAnalytics.SentimentV2,TextAnalytics.SentimentV3,TextAnalytics.SentimentV3Preview" - }, - { - "name": "Cloud", - "value": "TextAnalytics.Healthcare,TextAnalytics.Analyze,QuestionAnswer.AllApis,LanguageService.QuestionAnsweringApis" - } - ], - "endpoints": { - "Text Analytics": "https://textanalytics-B.cognitiveservices.azure.com/", - "Custom Text Authoring": "https://textanalytics-B.cognitiveservices.azure.com/", - "Conversational Language Understanding Authoring": "https://textanalytics-B.cognitiveservices.azure.com/", - "ConversationalLURuntime": "https://textanalytics-B.cognitiveservices.azure.com/", - "Language": "https://textanalytics-B.cognitiveservices.azure.com/", - "Language-2022-05-01": "https://textanalytics-B.cognitiveservices.azure.com/", - "QnAMaker": "https://textanalytics-B.cognitiveservices.azure.com/", - "turing": "https://textanalytics-B.cognitiveservices.azure.com/", - "Turing DeepWrite": "https://textanalytics-B.cognitiveservices.azure.com/", - "QuestionAnswering": "https://textanalytics-B.cognitiveservices.azure.com/", - "QuestionAnsweringBizQA": "https://textanalytics-B.cognitiveservices.azure.com/", - "QuestionAnsweringQnAGen": "https://textanalytics-B.cognitiveservices.azure.com/", - "LUIS.Authoring": "https://textanalytics-B.cognitiveservices.azure.com/" - } + { + "name": "VirtualNetworks" }, - "ResourceGroupName": "test-rg", - "Type": "Microsoft.CognitiveServices/accounts", - "ResourceType": "Microsoft.CognitiveServices/accounts", - "ExtensionResourceType": null, - "Sku": { - "Name": "S", - "Tier": null, - "Size": null, - "Family": null, - "Model": null, - "Capacity": null + { + "name": "CustomerManagedKey" }, - "SubscriptionId": "00000000-0000-0000-0000-000000000000" - } -] \ No newline at end of file + { + "name": "CustomerManagedStorage" + }, + { + "name": "Container", + "value": "TextAnalytics.*,TextAnalytics.Healthcare,TextAnalytics.Keyphrase,TextAnalytics.KeyphraseV2,TextAnalytics.KeyPhraseONNX,TextAnalytics.LanguageFastText,TextAnalytics.Language,TextAnalytics.LanguageV2,TextAnalytics.Sentiment,TextAnalytics.SentimentV2,TextAnalytics.SentimentV3,TextAnalytics.SentimentV3Preview" + }, + { + "name": "Cloud", + "value": "TextAnalytics.Healthcare,TextAnalytics.Analyze,QuestionAnswer.AllApis,LanguageService.QuestionAnsweringApis" + } + ], + "endpoints": { + "Text Analytics": "https://textanalytics-B.cognitiveservices.azure.com/", + "Custom Text Authoring": "https://textanalytics-B.cognitiveservices.azure.com/", + "Conversational Language Understanding Authoring": "https://textanalytics-B.cognitiveservices.azure.com/", + "ConversationalLURuntime": "https://textanalytics-B.cognitiveservices.azure.com/", + "Language": "https://textanalytics-B.cognitiveservices.azure.com/", + "Language-2022-05-01": "https://textanalytics-B.cognitiveservices.azure.com/", + "QnAMaker": "https://textanalytics-B.cognitiveservices.azure.com/", + "turing": "https://textanalytics-B.cognitiveservices.azure.com/", + "Turing DeepWrite": "https://textanalytics-B.cognitiveservices.azure.com/", + "QuestionAnswering": "https://textanalytics-B.cognitiveservices.azure.com/", + "QuestionAnsweringBizQA": "https://textanalytics-B.cognitiveservices.azure.com/", + "QuestionAnsweringQnAGen": "https://textanalytics-B.cognitiveservices.azure.com/", + "LUIS.Authoring": "https://textanalytics-B.cognitiveservices.azure.com/" + } + }, + "ResourceGroupName": "test-rg", + "Type": "Microsoft.CognitiveServices/accounts", + "ResourceType": "Microsoft.CognitiveServices/accounts", + "ExtensionResourceType": null, + "Sku": { + "Name": "S", + "Tier": null, + "Size": null, + "Family": null, + "Model": null, + "Capacity": null + }, + "SubscriptionId": "00000000-0000-0000-0000-000000000000" + } +] diff --git a/tests/PSRule.Rules.Azure.Tests/cognitive.tests.bicep b/tests/PSRule.Rules.Azure.Tests/cognitive.tests.bicep index aa05675ab60..bea1a096f1e 100644 --- a/tests/PSRule.Rules.Azure.Tests/cognitive.tests.bicep +++ b/tests/PSRule.Rules.Azure.Tests/cognitive.tests.bicep @@ -32,10 +32,8 @@ resource account02 'Microsoft.CognitiveServices/accounts@2022-03-01' = { sku: { name: 'S0' } - kind: 'CognitiveServices' - properties: { - - } + kind: 'TextAnalytics' + properties: {} } resource account03 'Microsoft.CognitiveServices/accounts@2022-03-01' = { @@ -47,7 +45,7 @@ resource account03 'Microsoft.CognitiveServices/accounts@2022-03-01' = { sku: { name: 'S0' } - kind: 'CognitiveServices' + kind: 'TextAnalytics' properties: { networkAcls: { defaultAction: 'Deny' diff --git a/tests/PSRule.Rules.Azure.Tests/cognitive.tests.json b/tests/PSRule.Rules.Azure.Tests/cognitive.tests.json index 9c35496a194..c8d6356b991 100644 --- a/tests/PSRule.Rules.Azure.Tests/cognitive.tests.json +++ b/tests/PSRule.Rules.Azure.Tests/cognitive.tests.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.8.9.13224", - "templateHash": "11908813895130022399" + "version": "0.24.24.22086", + "templateHash": "18405374500797131306" } }, "parameters": { @@ -13,7 +13,7 @@ "type": "string", "defaultValue": "cognitive", "metadata": { - "description": "The name of the cognitive services account." + "description": "The name of the resource." } }, "location": { @@ -53,7 +53,7 @@ "sku": { "name": "S0" }, - "kind": "CognitiveServices", + "kind": "TextAnalytics", "properties": {} }, { @@ -67,7 +67,7 @@ "sku": { "name": "S0" }, - "kind": "CognitiveServices", + "kind": "TextAnalytics", "properties": { "networkAcls": { "defaultAction": "Deny"