Skip to content

Commit

Permalink
policies
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-shandar committed Nov 9, 2017
1 parent a4aeca6 commit 6b2b72f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
ResourceConfig<NetworkInterface> networkInterface)
=> Policy.CreateConfig(
name,
_ => new VirtualMachine(),
state => new VirtualMachine
{
NetworkProfile = new NetworkProfile
{
NetworkInterfaces = new []
{
new NetworkInterfaceReference
{
Id = state.Get(networkInterface).Id
}
}
}
},
new[] { networkInterface });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static ResourceConfig<NetworkInterface> CreateNetworkInterfaceConfig(
{
new NetworkInterfaceIPConfiguration
{
Name = name.Name,
Subnet = new Subnet
{
Id = state.Get(subnet).Id
Expand Down

0 comments on commit 6b2b72f

Please sign in to comment.