Skip to content

Commit

Permalink
included preview api versions
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlabs committed Aug 30, 2023
1 parent f60885b commit 4e83d7b
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
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@2022-12-01' existing = {
resource acr 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' existing = {
name: acrName
}

Expand Down
2 changes: 1 addition & 1 deletion bicep/aksagentpool.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ param autoTaintWindows bool = false

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

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

Expand Down
2 changes: 1 addition & 1 deletion bicep/aksmetricalerts.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ resource PV_usage_violates_the_configured_threshold_for_clustername_CI_21 'micro
}


resource Daily_law_datacap 'Microsoft.Insights/scheduledQueryRules@2022-06-15' = {
resource Daily_law_datacap 'Microsoft.Insights/scheduledQueryRules@2022-08-01-preview' = {
name: 'Daily data cap breached for workspace ${logAnalyticsWorkspaceName} CIQ-1'
location: logAnalyticsWorkspaceLocation
properties: {
Expand Down
2 changes: 1 addition & 1 deletion bicep/appgw.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ var diagProperties = {
}
]
}
resource appgw_Diag 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (!empty(workspaceId)) {
resource appgw_Diag 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (!empty(workspaceId)) {
scope: appgw
name: 'appgwDiag'
properties: diagProperties
Expand Down
2 changes: 1 addition & 1 deletion bicep/automationrunbook/aksRbac.bicep
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
param principalId string
param aksName string

resource aks 'Microsoft.ContainerService/managedClusters@2023-05-01' existing = {
resource aks 'Microsoft.ContainerService/managedClusters@2023-05-02-preview' existing = {
name: aksName
}

Expand Down
2 changes: 1 addition & 1 deletion bicep/automationrunbook/automation.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08'
}
}

resource automationAccountDiagLogging 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if(!empty(loganalyticsWorkspaceId)) {
resource automationAccountDiagLogging 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if(!empty(loganalyticsWorkspaceId)) {
name: 'diags'
scope: automationAccount
properties: {
Expand Down
2 changes: 1 addition & 1 deletion bicep/firewall.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource fwManagementIp_pip 'Microsoft.Network/publicIPAddresses@2023-04-01' = i
}
}

resource fwDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (!empty(workspaceDiagsId)) {
resource fwDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (!empty(workspaceDiagsId)) {
scope: fw
name: 'fwDiags'
properties: {
Expand Down
2 changes: 1 addition & 1 deletion bicep/keyvault.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ resource kv 'Microsoft.KeyVault/vaults@2022-07-01' = {
}
}

resource kvDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (!empty(logAnalyticsWorkspaceId)) {
resource kvDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (!empty(logAnalyticsWorkspaceId)) {
name: 'kvDiags'
scope: kv
properties: {
Expand Down
18 changes: 9 additions & 9 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@2022-12-01' = if (!empty(registries_sku)) {
resource acr 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = if (!empty(registries_sku)) {
name: acrName
location: location
sku: {
Expand Down Expand Up @@ -449,7 +449,7 @@ output containerRegistryName string = !empty(registries_sku) ? acr.name : ''
output containerRegistryId string = !empty(registries_sku) ? acr.id : ''


resource acrDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (createLaw && !empty(registries_sku)) {
resource acrDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (createLaw && !empty(registries_sku)) {
name: 'acrDiags'
scope: acr
properties: {
Expand Down Expand Up @@ -812,7 +812,7 @@ resource appGwAGICMIOp 'Microsoft.Authorization/roleAssignments@2022-04-01' = if
}

// AppGW Diagnostics
resource appgw_Diag 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (createLaw && deployAppGw) {
resource appgw_Diag 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (createLaw && deployAppGw) {
scope: appgw
name: 'appgwDiag'
properties: {
Expand Down Expand Up @@ -1336,7 +1336,7 @@ keyVaultKmsCreateAndPrereqs || !empty(keyVaultKmsByoKeyId) ? azureKeyVaultKms :
!empty(serviceMeshProfile) ? { serviceMeshProfile: serviceMeshProfileObj } : {}
)

resource aks 'Microsoft.ContainerService/managedClusters@2023-05-01' = {
resource aks 'Microsoft.ContainerService/managedClusters@2023-05-02-preview' = {
name: 'aks-${resourceName}'
location: location
properties: aksProperties
Expand Down Expand Up @@ -1532,7 +1532,7 @@ param AksDiagCategories array = [
@description('Enable SysLogs and send to log analytics')
param enableSysLog bool = false

resource AksDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (createLaw && omsagent) {
resource AksDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (createLaw && omsagent) {
name: 'aksDiags'
scope: aks
properties: {
Expand All @@ -1550,7 +1550,7 @@ resource AksDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (crea
}
}

resource sysLog 'Microsoft.Insights/dataCollectionRules@2021-04-01' = if (createLaw && omsagent && enableSysLog) {
resource sysLog 'Microsoft.Insights/dataCollectionRules@2021-09-01-preview' = if (createLaw && omsagent && enableSysLog) {
name: 'MSCI-${location}-${aks.name}'
location: location
kind: 'Linux'
Expand Down Expand Up @@ -1633,7 +1633,7 @@ resource sysLog 'Microsoft.Insights/dataCollectionRules@2021-04-01' = if (create
}
}

resource association 'Microsoft.Insights/dataCollectionRuleAssociations@2021-04-01' = if (createLaw && omsagent && enableSysLog) {
resource association 'Microsoft.Insights/dataCollectionRuleAssociations@2021-09-01-preview' = if (createLaw && omsagent && enableSysLog) {
name: '${aks.name}-${aks_law.name}-association'
scope: aks
properties: {
Expand Down Expand Up @@ -1739,7 +1739,7 @@ output LogAnalyticsId string = (createLaw) ? aks_law.id : ''
@description('Create an Event Grid System Topic for AKS events')
param createEventGrid bool = false

resource eventGrid 'Microsoft.EventGrid/systemTopics@2022-06-15' = if(createEventGrid) {
resource eventGrid 'Microsoft.EventGrid/systemTopics@2023-06-01-preview' = if(createEventGrid) {
name: 'evgt-${aks.name}'
location: location
identity: {
Expand All @@ -1753,7 +1753,7 @@ resource eventGrid 'Microsoft.EventGrid/systemTopics@2022-06-15' = if(createEven

output eventGridName string = createEventGrid ? eventGrid.name : ''

resource eventGridDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (createLaw && createEventGrid) {
resource eventGridDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (createLaw && createEventGrid) {
name: 'eventGridDiags'
scope: eventGrid
properties: {
Expand Down
2 changes: 1 addition & 1 deletion bicep/nsg.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ param NsgDiagnosticCategories array = [
'NetworkSecurityGroupRuleCounter'
]

resource nsgDiags 'Microsoft.Insights/diagnosticSettings@2016-09-01' = if (!empty(workspaceResourceId)) {
resource nsgDiags 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if (!empty(workspaceResourceId)) {
name: 'diags-${nsgName}'
scope: nsg
properties: {
Expand Down

0 comments on commit 4e83d7b

Please sign in to comment.