-
-
Save johnlokerse/f7f2a3a78c0f48b463ede9c0b367a060 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param parVnetObject object | |
param parNsgObject object | |
param parNicObject object | |
resource resVirtualNetwork 'Microsoft.Network/virtualNetworks@2021-08-01' existing = { | |
name: parVnetObject.name | |
} | |
resource resNetworkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2021-08-01' = { | |
name: parNsgObject.Name | |
properties: { | |
securityRules: parNsgObject.securityRules | |
} | |
} | |
resource resNic 'Microsoft.Network/networkInterfaces@2021-08-01' = { | |
name: parNicObject.name | |
properties:{ | |
ipConfigurations: [ | |
{ | |
name: 'ipconfig1' | |
properties: { | |
subnet: resVirtualNetwork.properties.subnets[0] | |
} | |
} | |
] | |
networkSecurityGroup: { | |
id: resNetworkSecurityGroup.id | |
} | |
} | |
} | |
output outNicId string = resNic.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment