Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bicep linter warnings for Bicep 0.20.4 #647

Merged
merged 6 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bicep/acragentpool.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ param location string = resourceGroup().location
param acrName string
param acrPoolSubnetId string = ''

resource acr 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' existing = {
resource acr 'Microsoft.ContainerRegistry/registries@2023-07-01' existing = {
name: acrName
}

Expand Down
4 changes: 2 additions & 2 deletions bicep/aksagentpool.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ param autoTaintWindows bool = false

var taints = autoTaintWindows ? union(nodeTaints, ['sku=Windows:NoSchedule']) : nodeTaints

resource aks 'Microsoft.ContainerService/managedClusters@2023-07-02-preview' existing = {
resource aks 'Microsoft.ContainerService/managedClusters@2023-08-02-preview' existing = {
name: AksName
}

resource userNodepool 'Microsoft.ContainerService/managedClusters/agentPools@2021-10-01' = {
resource userNodepool 'Microsoft.ContainerService/managedClusters/agentPools@2023-08-02-preview' = {
parent: aks
name: PoolName
properties: {
Expand Down
6 changes: 6 additions & 0 deletions bicep/bicepconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"enabled": true,
"verbose": false,
"rules": {
"prefer-unquoted-property-names" : {
"level": "warning"
},
"use-parent-property" : {
"level": "warning"
},
"use-recent-api-versions" : {
"level": "warning"
},
Expand Down
5 changes: 3 additions & 2 deletions bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ param acrUntaggedRetentionPolicy int = 30

var acrName = 'cr${replace(resourceName, '-', '')}${uniqueString(resourceGroup().id, resourceName)}'

resource acr 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = if (!empty(registries_sku)) {
resource acr 'Microsoft.ContainerRegistry/registries@2023-07-01' = if (!empty(registries_sku)) {
name: acrName
location: location
sku: {
Expand Down Expand Up @@ -1790,7 +1790,8 @@ var telemetryId = '3c1e2fc6-1c4b-44f9-8694-25d00ae30a3a-${location}'
|__| |_______||_______||_______||__| |__| |_______| |__| | _| `._____| |__| |_______/ |_______|| _| |_______| \______/ |__| |__| |__| |_______||__| \__| |__| */

// Telemetry Deployment
resource telemetrydeployment 'Microsoft.Resources/deployments@2022-09-01' = if (enableTelemetry) {
#disable-next-line no-deployments-resources
resource telemetrydeployment 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) {
name: telemetryId
properties: {
mode: 'Incremental'
Expand Down
6 changes: 3 additions & 3 deletions bicep/network.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ resource privateDnsAcrLink 'Microsoft.Network/privateDnsZones/virtualNetworkLink
}
}

resource privateDnsAcrZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2021-08-01' = if (!empty(privateLinkAcrId)) {
resource privateDnsAcrZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2023-04-01' = if (!empty(privateLinkAcrId)) {
parent: privateLinkAcr
name: 'default'
properties: {
Expand Down Expand Up @@ -337,7 +337,7 @@ resource privateDnsAkvLink 'Microsoft.Network/privateDnsZones/virtualNetworkLink
}
}

resource privateDnsAkvZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2021-08-01' = if (!empty(privateLinkAkvId)) {
resource privateDnsAkvZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2023-04-01' = if (!empty(privateLinkAkvId)) {
parent: privateLinkAkv
name: 'default'
properties: {
Expand Down Expand Up @@ -405,7 +405,7 @@ resource log 'Microsoft.OperationalInsights/workspaces@2022-10-01' existing = if
param CreateNsgFlowLogs bool = false

var flowLogStorageName = take(replace(toLower('stflow${resourceName}${uniqueString(resourceGroup().id, resourceName)}'),'-',''),24)
resource flowLogStor 'Microsoft.Storage/storageAccounts@2022-09-01' = if(CreateNsgFlowLogs && networkSecurityGroups) {
resource flowLogStor 'Microsoft.Storage/storageAccounts@2023-01-01' = if(CreateNsgFlowLogs && networkSecurityGroups) {
name: flowLogStorageName
kind: 'StorageV2'
sku: {
Expand Down
Loading