Skip to content

Commit

Permalink
templates: Address Bicep Lint Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ellismg committed Nov 15, 2024
1 parent 6e16f37 commit 7060465
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check failure on line 29 in templates/common/infra/bicep/core/host/container-apps.bicep

View workflow job for this annotation

GitHub Actions / bicep-lint / bicep-lint

Error BCP036 : The property "scope" expected a value of type "resourceGroup" but the provided value is of type "{ id string, location string, managedBy string, name string, properties properties, tags Tags, type string }". [https //aka.ms/bicep/core-diagnostics#BCP036]

Check failure on line 29 in templates/common/infra/bicep/core/host/container-apps.bicep

View workflow job for this annotation

GitHub Actions / bicep-lint / bicep-lint

Error BCP036 : The property "scope" expected a value of type "resourceGroup" but the provided value is of type "{ id string, location string, managedBy string, name string, properties properties, tags Tags, type string }". [https //aka.ms/bicep/core-diagnostics#BCP036]

Check failure on line 29 in templates/common/infra/bicep/core/host/container-apps.bicep

View workflow job for this annotation

GitHub Actions / bicep-lint / bicep-lint

Error BCP036 : The property "scope" expected a value of type "resourceGroup" but the provided value is of type "{ id string, location string, managedBy string, name string, properties properties, tags Tags, type string }". [https //aka.ms/bicep/core-diagnostics#BCP036]

Check failure on line 29 in templates/common/infra/bicep/core/host/container-apps.bicep

View workflow job for this annotation

GitHub Actions / bicep-lint / bicep-lint

Error BCP036 : The property "scope" expected a value of type "resourceGroup" but the provided value is of type "{ id string, location string, managedBy string, name string, properties properties, tags Tags, type string }". [https //aka.ms/bicep/core-diagnostics#BCP036]
params: {
name: containerRegistryName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
"webAppExists": {
"value": "${SERVICE_WEB_RESOURCE_EXISTS=false}"
},
"webApiBaseUrl": {
"value": "${REACT_APP_API_BASE_URL}"
},
"useAPIM": {
"value": "${USE_APIM=false}"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
"webAppExists": {
"value": "${SERVICE_WEB_RESOURCE_EXISTS=false}"
},
"webApiBaseUrl": {
"value": "${REACT_APP_API_BASE_URL}"
},
"useAPIM": {
"value": "${USE_APIM=false}"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
"webAppExists": {
"value": "${SERVICE_WEB_RESOURCE_EXISTS=false}"
},
"webApiBaseUrl": {
"value": "${API_BASE_URL}"
},
"useAPIM": {
"value": "${USE_APIM=false}"
},
Expand Down

0 comments on commit 7060465

Please sign in to comment.