diff --git a/modules/analysis-services/server/README.md b/modules/analysis-services/server/README.md index 67343bda2a..803b3e6e39 100644 --- a/modules/analysis-services/server/README.md +++ b/modules/analysis-services/server/README.md @@ -29,7 +29,6 @@ The following section provides usage examples for the module, which were used to - [Using large parameter set](#example-1-using-large-parameter-set) - [Using only defaults](#example-2-using-only-defaults) -- [Max](#example-3-max) ### Example 1: _Using large parameter set_ @@ -51,6 +50,14 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { { eventHubAuthorizationRuleResourceId: '' eventHubName: '' + logCategoriesAndGroups: [ + { + category: 'Engine' + } + { + category: 'Service' + } + ] metricCategories: [ { category: 'AllMetrics' @@ -62,6 +69,16 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] enableDefaultTelemetry: '' + firewallSettings: { + enablePowerBIService: true + firewallRules: [ + { + firewallRuleName: 'AllowFromAll' + rangeEnd: '255.255.255.255' + rangeStart: '0.0.0.0' + } + ] + } lock: { kind: 'CanNotDelete' name: 'myCustomLockName' @@ -73,6 +90,7 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { roleDefinitionIdOrName: 'Reader' } ] + skuCapacity: 1 skuName: 'S0' tags: { Environment: 'Non-Prod' @@ -105,6 +123,14 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { { "eventHubAuthorizationRuleResourceId": "", "eventHubName": "", + "logCategoriesAndGroups": [ + { + "category": "Engine" + }, + { + "category": "Service" + } + ], "metricCategories": [ { "category": "AllMetrics" @@ -119,6 +145,18 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { "enableDefaultTelemetry": { "value": "" }, + "firewallSettings": { + "value": { + "enablePowerBIService": true, + "firewallRules": [ + { + "firewallRuleName": "AllowFromAll", + "rangeEnd": "255.255.255.255", + "rangeStart": "0.0.0.0" + } + ] + } + }, "lock": { "value": { "kind": "CanNotDelete", @@ -134,6 +172,9 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = { } ] }, + "skuCapacity": { + "value": 1 + }, "skuName": { "value": "S0" }, @@ -199,153 +240,6 @@ module server 'br:bicep/modules/analysis-services.server:1.0.0' = {

-### Example 3: _Max_ - -

- -via Bicep module - -```bicep -module server 'br:bicep/modules/analysis-services.server:1.0.0' = { - name: '${uniqueString(deployment().name)}-test-assmax' - params: { - // Required parameters - name: 'assmax' - // Non-required parameters - diagnosticSettings: [ - { - eventHubAuthorizationRuleResourceId: '' - eventHubName: '' - logCategoriesAndGroups: [ - { - category: 'Engine' - } - { - category: 'Service' - } - ] - metricCategories: [ - { - category: 'AllMetrics' - } - ] - name: 'customSetting' - storageAccountResourceId: '' - workspaceResourceId: '' - } - ] - enableDefaultTelemetry: '' - firewallSettings: { - enablePowerBIService: true - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeEnd: '255.255.255.255' - rangeStart: '0.0.0.0' - } - ] - } - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - roleAssignments: [ - { - principalId: '' - principalType: 'ServicePrincipal' - roleDefinitionIdOrName: 'Reader' - } - ] - skuCapacity: 1 - skuName: 'S0' - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - // Required parameters - "name": { - "value": "assmax" - }, - // Non-required parameters - "diagnosticSettings": { - "value": [ - { - "eventHubAuthorizationRuleResourceId": "", - "eventHubName": "", - "logCategoriesAndGroups": [ - { - "category": "Engine" - }, - { - "category": "Service" - } - ], - "metricCategories": [ - { - "category": "AllMetrics" - } - ], - "name": "customSetting", - "storageAccountResourceId": "", - "workspaceResourceId": "" - } - ] - }, - "enableDefaultTelemetry": { - "value": "" - }, - "firewallSettings": { - "value": { - "enablePowerBIService": true, - "firewallRules": [ - { - "firewallRuleName": "AllowFromAll", - "rangeEnd": "255.255.255.255", - "rangeStart": "0.0.0.0" - } - ] - } - }, - "lock": { - "value": { - "kind": "CanNotDelete", - "name": "myCustomLockName" - } - }, - "roleAssignments": { - "value": [ - { - "principalId": "", - "principalType": "ServicePrincipal", - "roleDefinitionIdOrName": "Reader" - } - ] - }, - "skuCapacity": { - "value": 1 - }, - "skuName": { - "value": "S0" - } - } -} -``` - -
-

- ## Parameters diff --git a/modules/analysis-services/server/tests/e2e/common/main.test.bicep b/modules/analysis-services/server/tests/e2e/common/main.test.bicep index f90426c6a4..c73e5c64c5 100644 --- a/modules/analysis-services/server/tests/e2e/common/main.test.bicep +++ b/modules/analysis-services/server/tests/e2e/common/main.test.bicep @@ -71,6 +71,17 @@ module testDeployment '../../../main.bicep' = { name: 'myCustomLockName' } skuName: 'S0' + skuCapacity: 1 + firewallSettings: { + firewallRules: [ + { + firewallRuleName: 'AllowFromAll' + rangeStart: '0.0.0.0' + rangeEnd: '255.255.255.255' + } + ] + enablePowerBIService: true + } roleAssignments: [ { roleDefinitionIdOrName: 'Reader' @@ -86,6 +97,14 @@ module testDeployment '../../../main.bicep' = { category: 'AllMetrics' } ] + logCategoriesAndGroups: [ + { + category: 'Engine' + } + { + category: 'Service' + } + ] eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId diff --git a/modules/analysis-services/server/tests/e2e/max/dependencies.bicep b/modules/analysis-services/server/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 29b9641692..0000000000 --- a/modules/analysis-services/server/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Required. The name of the managed identity to create.') -param managedIdentityName string - -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/analysis-services/server/tests/e2e/max/main.test.bicep b/modules/analysis-services/server/tests/e2e/max/main.test.bicep deleted file mode 100644 index 41b6b1dcd0..0000000000 --- a/modules/analysis-services/server/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,112 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${serviceShort}-rg' - -@description('Optional. The location to deploy resources to.') -param location string = deployment().location - -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') -param serviceShort string = 'assmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}azsa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -module testDeployment '../../../main.bicep' = { - scope: az.resourceGroup(resourceGroupName) - name: '${uniqueString(deployment().name)}-test-${serviceShort}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - skuName: 'S0' - skuCapacity: 1 - firewallSettings: { - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeStart: '0.0.0.0' - rangeEnd: '255.255.255.255' - } - ] - enablePowerBIService: true - } - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - logCategoriesAndGroups: [ - { - category: 'Engine' - } - { - category: 'Service' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - } -} diff --git a/modules/api-management/service/README.md b/modules/api-management/service/README.md index dda735bb01..7a7e701100 100644 --- a/modules/api-management/service/README.md +++ b/modules/api-management/service/README.md @@ -44,7 +44,6 @@ The following section provides usage examples for the module, which were used to - [Using large parameter set](#example-1-using-large-parameter-set) - [Using only defaults](#example-2-using-only-defaults) -- [Max](#example-3-max) ### Example 1: _Using large parameter set_ @@ -64,213 +63,6 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = { publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' publisherName: 'az-amorg-x-001' // Non-required parameters - enableDefaultTelemetry: '' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - managedIdentities: { - systemAssigned: true - } - policies: [ - { - format: 'xml' - value: ' ' - } - ] - portalsettings: [ - { - name: 'signin' - properties: { - enabled: false - } - } - { - name: 'signup' - properties: { - enabled: false - termsOfService: { - consentRequired: false - enabled: false - } - } - } - ] - roleAssignments: [ - { - principalId: '' - principalType: 'ServicePrincipal' - roleDefinitionIdOrName: 'Reader' - } - ] - tags: { - Environment: 'Non-Prod' - 'hidden-title': 'This is visible in the resource name' - Role: 'DeploymentValidation' - } - } -} -``` - - -

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - // Required parameters - "name": { - "value": "apiscom001" - }, - "publisherEmail": { - "value": "apimgmt-noreply@mail.windowsazure.com" - }, - "publisherName": { - "value": "az-amorg-x-001" - }, - // Non-required parameters - "enableDefaultTelemetry": { - "value": "" - }, - "lock": { - "value": { - "kind": "CanNotDelete", - "name": "myCustomLockName" - } - }, - "managedIdentities": { - "value": { - "systemAssigned": true - } - }, - "policies": { - "value": [ - { - "format": "xml", - "value": " " - } - ] - }, - "portalsettings": { - "value": [ - { - "name": "signin", - "properties": { - "enabled": false - } - }, - { - "name": "signup", - "properties": { - "enabled": false, - "termsOfService": { - "consentRequired": false, - "enabled": false - } - } - } - ] - }, - "roleAssignments": { - "value": [ - { - "principalId": "", - "principalType": "ServicePrincipal", - "roleDefinitionIdOrName": "Reader" - } - ] - }, - "tags": { - "value": { - "Environment": "Non-Prod", - "hidden-title": "This is visible in the resource name", - "Role": "DeploymentValidation" - } - } - } -} -``` - -
-

- -### Example 2: _Using only defaults_ - -This instance deploys the module with the minimum set of required parameters. - - -

- -via Bicep module - -```bicep -module service 'br:bicep/modules/api-management.service:1.0.0' = { - name: '${uniqueString(deployment().name, location)}-test-apismin' - params: { - // Required parameters - name: 'apismin001' - publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' - publisherName: 'az-amorg-x-001' - // Non-required parameters - enableDefaultTelemetry: '' - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - // Required parameters - "name": { - "value": "apismin001" - }, - "publisherEmail": { - "value": "apimgmt-noreply@mail.windowsazure.com" - }, - "publisherName": { - "value": "az-amorg-x-001" - }, - // Non-required parameters - "enableDefaultTelemetry": { - "value": "" - } - } -} -``` - -
-

- -### Example 3: _Max_ - -

- -via Bicep module - -```bicep -module service 'br:bicep/modules/api-management.service:1.0.0' = { - name: '${uniqueString(deployment().name, location)}-test-apismax' - params: { - // Required parameters - name: 'apismax001' - publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' - publisherName: 'az-amorg-x-001' - // Non-required parameters apis: [ { apiVersionSet: { @@ -432,7 +224,7 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = { "parameters": { // Required parameters "name": { - "value": "apismax001" + "value": "apiscom001" }, "publisherEmail": { "value": "apimgmt-noreply@mail.windowsazure.com" @@ -623,6 +415,62 @@ module service 'br:bicep/modules/api-management.service:1.0.0' = {

+### Example 2: _Using only defaults_ + +This instance deploys the module with the minimum set of required parameters. + + +

+ +via Bicep module + +```bicep +module service 'br:bicep/modules/api-management.service:1.0.0' = { + name: '${uniqueString(deployment().name, location)}-test-apismin' + params: { + // Required parameters + name: 'apismin001' + publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' + publisherName: 'az-amorg-x-001' + // Non-required parameters + enableDefaultTelemetry: '' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "name": { + "value": "apismin001" + }, + "publisherEmail": { + "value": "apimgmt-noreply@mail.windowsazure.com" + }, + "publisherName": { + "value": "az-amorg-x-001" + }, + // Non-required parameters + "enableDefaultTelemetry": { + "value": "" + } + } +} +``` + +
+

+ ## Parameters diff --git a/modules/api-management/service/tests/e2e/common/dependencies.bicep b/modules/api-management/service/tests/e2e/common/dependencies.bicep index 29b9641692..bd63a95634 100644 --- a/modules/api-management/service/tests/e2e/common/dependencies.bicep +++ b/modules/api-management/service/tests/e2e/common/dependencies.bicep @@ -11,3 +11,6 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018- @description('The principal ID of the created managed identity.') output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The resource ID of the created Managed Identity.') +output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/api-management/service/tests/e2e/common/main.test.bicep b/modules/api-management/service/tests/e2e/common/main.test.bicep index 36998d40bd..80806744ef 100644 --- a/modules/api-management/service/tests/e2e/common/main.test.bicep +++ b/modules/api-management/service/tests/e2e/common/main.test.bicep @@ -23,6 +23,10 @@ param enableDefaultTelemetry bool = true @description('Optional. A token to inject into the name of each resource.') param namePrefix string = '[[namePrefix]]' +@description('Optional. The secret to leverage for authorization server authentication.') +@secure() +param customSecret string = newGuid() + // ============ // // Dependencies // // ============ // @@ -42,6 +46,20 @@ module nestedDependencies 'dependencies.bicep' = { } } +// Diagnostics +// =========== +module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + params: { + storageAccountName: 'dep${namePrefix}azsa${serviceShort}01' + logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' + eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' + eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' + location: location + } +} + // ============== // // Test Execution // // ============== // @@ -54,10 +72,84 @@ module testDeployment '../../../main.bicep' = { name: '${namePrefix}${serviceShort}001' publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' publisherName: '${namePrefix}-az-amorg-x-001' + apis: [ + { + apiVersionSet: { + name: 'echo-version-set' + properties: { + description: 'echo-version-set' + displayName: 'echo-version-set' + versioningScheme: 'Segment' + } + } + displayName: 'Echo API' + name: 'echo-api' + path: 'echo' + serviceUrl: 'http://echoapi.cloudapp.net/api' + } + ] + authorizationServers: { + secureList: [ + { + authorizationEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/authorize' + clientId: 'apimclientid' + clientSecret: customSecret + clientRegistrationEndpoint: 'http://localhost' + grantTypes: [ + 'authorizationCode' + ] + name: 'AuthServer1' + tokenEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/token' + } + ] + } + backends: [ + { + name: 'backend' + tls: { + validateCertificateChain: false + validateCertificateName: false + } + url: 'http://echoapi.cloudapp.net/api' + } + ] + caches: [ + { + connectionString: 'connectionstringtest' + name: 'westeurope' + useFromLocation: 'westeurope' + } + ] + diagnosticSettings: [ + { + name: 'customSetting' + metricCategories: [ + { + category: 'AllMetrics' + } + ] + eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId + workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + } + ] + identityProviders: [ + { + name: 'aadProvider' + } + ] lock: { kind: 'CanNotDelete' name: 'myCustomLockName' } + namedValues: [ + { + displayName: 'apimkey' + name: 'apimkey' + secret: true + } + ] policies: [ { format: 'xml' @@ -82,9 +174,23 @@ module testDeployment '../../../main.bicep' = { } } ] - managedIdentities: { - systemAssigned: true - } + products: [ + { + apis: [ + { + name: 'echo-api' + } + ] + approvalRequired: false + groups: [ + { + name: 'developers' + } + ] + name: 'Starter' + subscriptionRequired: false + } + ] roleAssignments: [ { roleDefinitionIdOrName: 'Reader' @@ -92,6 +198,18 @@ module testDeployment '../../../main.bicep' = { principalType: 'ServicePrincipal' } ] + subscriptions: [ + { + name: 'testArmSubscriptionAllApis' + scope: '/apis' + } + ] + managedIdentities: { + systemAssigned: true + userAssignedResourcesIds: [ + nestedDependencies.outputs.managedIdentityResourceId + ] + } tags: { 'hidden-title': 'This is visible in the resource name' Environment: 'Non-Prod' diff --git a/modules/api-management/service/tests/e2e/max/dependencies.bicep b/modules/api-management/service/tests/e2e/max/dependencies.bicep deleted file mode 100644 index bd63a95634..0000000000 --- a/modules/api-management/service/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,16 +0,0 @@ -@description('Required. The name of the managed identity to create.') -param managedIdentityName string - -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/api-management/service/tests/e2e/max/main.test.bicep b/modules/api-management/service/tests/e2e/max/main.test.bicep deleted file mode 100644 index 75ed04fb5a..0000000000 --- a/modules/api-management/service/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,216 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${serviceShort}-rg' - -@description('Optional. The location to deploy resources to.') -param location string = deployment().location - -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') -param serviceShort string = 'apismax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -@description('Optional. The secret to leverage for authorization server authentication.') -@secure() -param customSecret string = newGuid() - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}azsa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -module testDeployment '../../../main.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' - publisherName: '${namePrefix}-az-amorg-x-001' - apis: [ - { - apiVersionSet: { - name: 'echo-version-set' - properties: { - description: 'echo-version-set' - displayName: 'echo-version-set' - versioningScheme: 'Segment' - } - } - displayName: 'Echo API' - name: 'echo-api' - path: 'echo' - serviceUrl: 'http://echoapi.cloudapp.net/api' - } - ] - authorizationServers: { - secureList: [ - { - authorizationEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/authorize' - clientId: 'apimclientid' - clientSecret: customSecret - clientRegistrationEndpoint: 'http://localhost' - grantTypes: [ - 'authorizationCode' - ] - name: 'AuthServer1' - tokenEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/token' - } - ] - } - backends: [ - { - name: 'backend' - tls: { - validateCertificateChain: false - validateCertificateName: false - } - url: 'http://echoapi.cloudapp.net/api' - } - ] - caches: [ - { - connectionString: 'connectionstringtest' - name: 'westeurope' - useFromLocation: 'westeurope' - } - ] - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - identityProviders: [ - { - name: 'aadProvider' - } - ] - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - namedValues: [ - { - displayName: 'apimkey' - name: 'apimkey' - secret: true - } - ] - policies: [ - { - format: 'xml' - value: ' ' - } - ] - portalsettings: [ - { - name: 'signin' - properties: { - enabled: false - } - } - { - name: 'signup' - properties: { - enabled: false - termsOfService: { - consentRequired: false - enabled: false - } - } - } - ] - products: [ - { - apis: [ - { - name: 'echo-api' - } - ] - approvalRequired: false - groups: [ - { - name: 'developers' - } - ] - name: 'Starter' - subscriptionRequired: false - } - ] - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - subscriptions: [ - { - name: 'testArmSubscriptionAllApis' - scope: '/apis' - } - ] - managedIdentities: { - systemAssigned: true - userAssignedResourcesIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}