Skip to content

Commit

Permalink
Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Arambarri committed Sep 16, 2024
1 parent f9a0a6f commit 8b45ee1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions solutions/azure-automation-state-configuration/azuredeploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ resource windowsVM 'Microsoft.Compute/virtualMachines@2023-09-01' = [
networkProfile: {
networkInterfaces: [
{
id: resourceId('Microsoft.Network/networkInterfaces', '${windowsNicName}${i}')
id: resourceId('Microsoft.Network/networkInterfaces', windowsNic[i].name)
}
]
}
Expand All @@ -366,16 +366,13 @@ resource windowsVM 'Microsoft.Compute/virtualMachines@2023-09-01' = [
encryptionAtHost: true
}
}
dependsOn: [
windowsNic
]
}
]

resource guestConfigExtensionWindows 'Microsoft.Compute/virtualMachines/extensions@2021-03-01' = [
for i in range(0, windowsVMCount): {
parent: windowsVM[i]
name: 'Microsoft.GuestConfiguration${windowsVM[i].name}'
name: 'AzurePolicyforWindows${windowsVM[i].name}'
location: location
properties: {
publisher: 'Microsoft.GuestConfiguration'
Expand Down Expand Up @@ -556,7 +553,7 @@ resource linuxVMN 'Microsoft.Compute/virtualMachines@2023-09-01' = [
networkProfile: {
networkInterfaces: [
{
id: resourceId('Microsoft.Network/networkInterfaces', '${linuxNicName}${i}')
id: resourceId('Microsoft.Network/networkInterfaces', linuxNic[i].name)
}
]
}
Expand All @@ -565,20 +562,17 @@ resource linuxVMN 'Microsoft.Compute/virtualMachines@2023-09-01' = [
encryptionAtHost: true
}
}
dependsOn: [
linuxNic
]
}
]

resource guestConfigExtensionLinux 'Microsoft.Compute/virtualMachines/extensions@2021-03-01' = [
for i in range(0, linuxVMCount): {
parent: linuxVMN[i]
name: 'Microsoft.GuestConfiguration${linuxVMN[i].name}'
name: 'Microsoft.AzurePolicyforLinux${linuxVMN[i].name}'
location: location
properties: {
publisher: 'Microsoft.GuestConfiguration'
type: 'ConfigurationforLinux'
type: 'ConfigurationForLinux'
typeHandlerVersion: '1.0'
autoUpgradeMinorVersion: true
enableAutomaticUpgrade: true
Expand Down

0 comments on commit 8b45ee1

Please sign in to comment.