From 7060465160ecb111ff5d9512754f3524eaff9f6a Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Fri, 15 Nov 2024 13:20:55 -0800 Subject: [PATCH] templates: Address Bicep Lint Warnings --- .../infra/bicep/core/host/container-apps.bicep | 1 + .../monitor/applicationinsights-dashboard.bicep | 16 ++++++++++++++++ .../java-mongo-aca/.repo/bicep/infra/main.bicep | 3 --- .../.repo/bicep/infra/main.parameters.json | 3 --- .../.repo/bicep/infra/main.bicep | 3 --- .../.repo/bicep/infra/main.parameters.json | 3 --- .../.repo/bicep/infra/main.bicep | 4 ---- .../.repo/bicep/infra/main.parameters.json | 3 --- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/templates/common/infra/bicep/core/host/container-apps.bicep b/templates/common/infra/bicep/core/host/container-apps.bicep index 64f4f2aed30..cd44ee5fd0e 100644 --- a/templates/common/infra/bicep/core/host/container-apps.bicep +++ b/templates/common/infra/bicep/core/host/container-apps.bicep @@ -25,6 +25,7 @@ module containerAppsEnvironment 'container-apps-environment.bicep' = { module containerRegistry 'container-registry.bicep' = { name: '${name}-container-registry' + #disable-next-line BCP036 scope: !empty(containerRegistryResourceGroupName) ? resourceGroup(containerRegistryResourceGroupName) : resourceGroup() params: { name: containerRegistryName diff --git a/templates/common/infra/bicep/core/monitor/applicationinsights-dashboard.bicep b/templates/common/infra/bicep/core/monitor/applicationinsights-dashboard.bicep index d082e668ed9..fcd37ac5862 100644 --- a/templates/common/infra/bicep/core/monitor/applicationinsights-dashboard.bicep +++ b/templates/common/infra/bicep/core/monitor/applicationinsights-dashboard.bicep @@ -34,10 +34,12 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart' + #disable-next-line BCP037 asset: { idInputName: 'id' type: 'ApplicationInsights' } + #disable-next-line BCP037 defaultMenuItemId: 'overview' } } @@ -65,10 +67,12 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/ProactiveDetectionAsyncPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' } + #disable-next-line BCP037 defaultMenuItemId: 'ProactiveDetection' } } @@ -96,6 +100,7 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/QuickPulseButtonSmallPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' @@ -137,6 +142,7 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/AvailabilityNavButtonPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' @@ -178,6 +184,7 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/AppMapButtonPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' @@ -236,6 +243,7 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/UsageUsersOverviewPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' @@ -298,11 +306,14 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/CuratedBladeFailuresPinnedPart' + #disable-next-line BCP037 isAdapter: true + #disable-next-line BCP037 asset: { idInputName: 'ResourceId' type: 'ApplicationInsights' } + #disable-next-line BCP037 defaultMenuItemId: 'failures' } } @@ -362,11 +373,14 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/CuratedBladePerformancePinnedPart' + #disable-next-line BCP037 isAdapter: true + #disable-next-line BCP037 asset: { idInputName: 'ResourceId' type: 'ApplicationInsights' } + #disable-next-line BCP037 defaultMenuItemId: 'performance' } } @@ -453,10 +467,12 @@ resource applicationInsightsDashboard 'Microsoft.Portal/dashboards@2020-09-01-pr ] #disable-next-line BCP036 type: 'Extension/AppInsightsExtension/PartType/MetricsExplorerBladePinnedPart' + #disable-next-line BCP037 asset: { idInputName: 'ComponentId' type: 'ApplicationInsights' } + #disable-next-line BCP037 defaultMenuItemId: 'browser' } } diff --git a/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.bicep b/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.bicep index d857a3eee17..9e37f33dc09 100644 --- a/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.bicep +++ b/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.bicep @@ -40,9 +40,6 @@ param apimSku string = 'Consumption' @description('Id of the user or app to assign application roles') param principalId string = '' -@description('The base URL used by the web service for sending API requests') -param webApiBaseUrl string = '' - var abbrs = loadJsonContent('../../../../../../common/infra/bicep/abbreviations.json') var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) var tags = { 'azd-env-name': environmentName } diff --git a/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.parameters.json b/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.parameters.json index 1e60aae2895..ee6fbcec66c 100644 --- a/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.parameters.json +++ b/templates/todo/projects/java-mongo-aca/.repo/bicep/infra/main.parameters.json @@ -17,9 +17,6 @@ "webAppExists": { "value": "${SERVICE_WEB_RESOURCE_EXISTS=false}" }, - "webApiBaseUrl": { - "value": "${REACT_APP_API_BASE_URL}" - }, "useAPIM": { "value": "${USE_APIM=false}" }, diff --git a/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.bicep b/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.bicep index b2f2c491e8c..134424261e6 100644 --- a/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.bicep +++ b/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.bicep @@ -40,9 +40,6 @@ param containerRegistryHostSuffix string = 'azurecr.io' @description('Id of the user or app to assign application roles') param principalId string = '' -@description('The base URL used by the web service for sending API requests') -param webApiBaseUrl string = '' - var abbrs = loadJsonContent('../../../../../../common/infra/bicep/abbreviations.json') var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) var tags = { 'azd-env-name': environmentName } diff --git a/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.parameters.json b/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.parameters.json index 1e60aae2895..ee6fbcec66c 100644 --- a/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.parameters.json +++ b/templates/todo/projects/nodejs-mongo-aca/.repo/bicep/infra/main.parameters.json @@ -17,9 +17,6 @@ "webAppExists": { "value": "${SERVICE_WEB_RESOURCE_EXISTS=false}" }, - "webApiBaseUrl": { - "value": "${REACT_APP_API_BASE_URL}" - }, "useAPIM": { "value": "${USE_APIM=false}" }, diff --git a/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.bicep b/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.bicep index 96945b54d09..07d97a9773d 100644 --- a/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.bicep +++ b/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.bicep @@ -37,13 +37,9 @@ param apimSku string = 'Consumption' @description('Hostname suffix for container registry. Set when deploying to sovereign clouds') param containerRegistryHostSuffix string = 'azurecr.io' - @description('Id of the user or app to assign application roles') param principalId string = '' -@description('The base URL used by the web service for sending API requests') -param webApiBaseUrl string = '' - var abbrs = loadJsonContent('../../../../../../common/infra/bicep/abbreviations.json') var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) var tags = { 'azd-env-name': environmentName } diff --git a/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.parameters.json b/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.parameters.json index 6dc15a9a39d..ee6fbcec66c 100644 --- a/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.parameters.json +++ b/templates/todo/projects/python-mongo-aca/.repo/bicep/infra/main.parameters.json @@ -17,9 +17,6 @@ "webAppExists": { "value": "${SERVICE_WEB_RESOURCE_EXISTS=false}" }, - "webApiBaseUrl": { - "value": "${API_BASE_URL}" - }, "useAPIM": { "value": "${USE_APIM=false}" },