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

Fixed Linter warnings & build errors #354

Merged
merged 16 commits into from
Feb 24, 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 azresources/containers/aks/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ var virtualNetworkName = subnetIdSplit[8]
var privateDnsZoneIdSplit = split(privateDNSZoneId, '/')
var privateDnsZoneSubscriptionId = privateDnsZoneIdSplit[2]
var privateZoneDnsResourceGroupName = privateDnsZoneIdSplit[4]
var privateZoneResourceName = last(privateDnsZoneIdSplit)
var privateZoneResourceName = last(privateDnsZoneIdSplit)!

module identity '../../iam/user-assigned-identity.bicep' = {
name: 'deploy-aks-identity'
Expand Down
4 changes: 2 additions & 2 deletions azresources/data/sqldb/sqldb-with-cmk.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ resource sqlserver 'Microsoft.Sql/servers@2021-02-01-preview' = {
}

resource sqlserver_va 'Microsoft.Sql/servers/vulnerabilityAssessments@2020-11-01-preview' = {
name: '${sqlServerName}/default'
parent: sqlserver
name: 'default'
dependsOn: [
sqlserver
roleAssignSQLToSALogging
]
properties: {
Expand Down
4 changes: 2 additions & 2 deletions azresources/data/sqldb/sqldb-without-cmk.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ resource sqlserver 'Microsoft.Sql/servers@2021-02-01-preview' = {
}

resource sqlserver_va 'Microsoft.Sql/servers/vulnerabilityAssessments@2020-11-01-preview' = {
name: '${sqlServerName}/default'
parent: sqlserver
name: 'default'
dependsOn: [
sqlserver
roleAssignSQLToSALogging
]
properties: {
Expand Down
4 changes: 2 additions & 2 deletions azresources/data/sqlmi/sqlmi-with-cmk.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ resource sqlmi 'Microsoft.Sql/managedInstances@2020-11-01-preview' = {
}

resource sqlmi_va 'Microsoft.Sql/managedInstances/vulnerabilityAssessments@2020-11-01-preview' = {
name: '${name}/default'
parent: sqlmi
name: 'default'
dependsOn: [
sqlmi
roleAssignSQLMIToSALogging
]
properties: {
Expand Down
4 changes: 2 additions & 2 deletions azresources/data/sqlmi/sqlmi-without-cmk.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ resource sqlmi 'Microsoft.Sql/managedInstances@2020-11-01-preview' = {
}

resource sqlmi_va 'Microsoft.Sql/managedInstances/vulnerabilityAssessments@2020-11-01-preview' = {
name: '${name}/default'
parent: sqlmi
name: 'default'
dependsOn: [
sqlmi
roleAssignSQLMIToSALogging
]
properties: {
Expand Down
2 changes: 1 addition & 1 deletion azresources/security/key-vault-key-rsa2048.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ resource akvKey 'Microsoft.KeyVault/vaults/keys@2020-04-01-preview' = {
// Outputs
output keyName string = keyName
output keyId string = akvKey.id
output keyVersion string = last(split(akvKey.properties.keyUriWithVersion, '/'))
output keyVersion string = last(split(akvKey.properties.keyUriWithVersion, '/'))!
output keyUri string = akvKey.properties.keyUri
output keyUriWithVersion string = akvKey.properties.keyUriWithVersion
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "ALZ action group",
"actionGroupShortName": "alz-alert",
Expand Down
120 changes: 87 additions & 33 deletions bicepconfig.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,94 @@
{
"analyzers": {
"core": {
"verbose": false,
"enabled": true,
"rules": {
"adminusername-should-not-be-literal": {
"level": "error"
},
"no-hardcoded-env-urls": {
"level": "error"
},
"no-unnecessary-dependson": {
"level": "error"
},
"no-unused-params": {
"level": "error"
},
"no-unused-vars": {
"level": "error"
},
"prefer-interpolation": {
"level": "error"
},
"secure-parameter-default": {
"level": "error"
},
"simplify-interpolation": {
"level": "error"
},
"no-loc-expr-outside-params": {
"level": "error"
},
"explicit-values-for-loc-params": {
"level": "error"
}
"verbose": false,
"enabled": true,
"rules": {
"adminusername-should-not-be-literal": {
"level": "error"
},
"artifacts-parameters": {
"level": "warning"
},
"decompiler-cleanup": {
"level": "warning"
},
"explicit-values-for-loc-params": {
"level": "error"
},
"max-outputs": {
"level": "warning"
},
"max-params": {
"level": "warning"
},
"max-resources": {
"level": "warning"
},
"max-variables": {
"level": "warning"
},
"no-hardcoded-env-urls": {
"level": "warning"
},
"no-hardcoded-location": {
"level": "error"
},
"no-loc-expr-outside-params": {
"level": "error"
},
"no-unnecessary-dependson": {
"level": "error"
},
"no-unused-existing-resources": {
"level": "warning"
},
"no-unused-params": {
"level": "error"
},
"no-unused-vars": {
"level": "error"
},
"outputs-should-not-contain-secrets": {
"level": "warning"
},
"prefer-interpolation": {
"level": "error"
},
"prefer-unquoted-property-names": {
"level": "warning"
},
"protect-commandtoexecute-secrets": {
"level": "warning"
},
"secure-parameter-default": {
"level": "error"
},
"secure-params-in-nested-deploy": {
"level": "warning"
},
"secure-secrets-in-params": {
"level": "warning"
},
"simplify-interpolation": {
"level": "error"
},
"use-parent-property": {
"level": "warning"
},
"use-recent-api-versions": {
"level": "off"
},
"use-resource-id-functions": {
"level": "warning"
},
"use-stable-resource-identifiers": {
"level": "warning"
},
"use-stable-vm-image": {
"level": "warning"
}
}
}
}
}
6 changes: 3 additions & 3 deletions config/logging/CanadaESLZ-main/logging.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -25,7 +25,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down Expand Up @@ -82,7 +82,7 @@
},
"aks": {
"value": {
"version": "1.22.6",
"version": "1.25.5",
"enabled": true,
"networkPlugin": "kubenet",
"networkPolicy": "calico",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down Expand Up @@ -89,7 +89,7 @@
},
"aks": {
"value": {
"version": "1.22.6",
"version": "1.25.5",
"enabled": true,
"networkPlugin": "kubenet",
"networkPolicy": "calico",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"receivers": {
"app": [ "[email protected]" ],
"email": [ "[email protected]" ],
"sms": [ { "countryCode": "1", "phoneNumber": "5555555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "5555555555" } ]
"sms": [ { "countryCode": "1", "phoneNumber": "6045555555" } ],
"voice": [ { "countryCode": "1", "phoneNumber": "6045555555" } ]
},
"actionGroupName": "Service health action group",
"actionGroupShortName": "health-alert",
Expand All @@ -22,7 +22,7 @@
"securityCenter": {
"value": {
"email": "[email protected]",
"phone": "5555555555"
"phone": "6045555555"
}
},
"subscriptionRoleAssignments": {
Expand Down Expand Up @@ -89,7 +89,7 @@
},
"aks": {
"value": {
"version": "1.22.6",
"version": "1.25.5",
"enabled": true,
"networkPlugin": "kubenet",
"networkPolicy": "calico",
Expand Down
Loading