Skip to content

Commit

Permalink
Improve C# AKS example (pulumi#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov committed Feb 14, 2020
1 parent 4cfc823 commit 8d484a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions azure-cs-aks/Azure.AKS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.8.0-preview" />
<PackageReference Include="Pulumi.AzureAD" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Random" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Tls" Version="1.2.0-preview" />
<PackageReference Include="Pulumi.Azure" Version="1.14.0-preview" />
<PackageReference Include="Pulumi.AzureAD" Version="1.5.0-preview" />
<PackageReference Include="Pulumi.Random" Version="1.5.0-preview" />
<PackageReference Include="Pulumi.Tls" Version="1.4.0-preview" />
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions azure-cs-aks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Pulumi.Azure.ContainerService.Inputs;
using Pulumi.Azure.Core;
using Pulumi.Azure.Network;
using Pulumi.Azure.Role;
using Pulumi.Random;
using Pulumi.Tls;

Expand Down Expand Up @@ -41,6 +42,14 @@ static Task<int> Main()
EndDate = "2099-01-01T00:00:00Z",
});
// Grant networking permissions to the SP (needed e.g. to provision Load Balancers)
var assignment = new Assignment("role-assignment", new AssignmentArgs
{
PrincipalId = adSp.Id,
Scope = resourceGroup.Id,
RoleDefinitionName = "Network Contributor"
});
// Create a Virtual Network for the cluster
var vnet = new VirtualNetwork("vnet", new VirtualNetworkArgs
{
Expand Down

0 comments on commit 8d484a9

Please sign in to comment.