Improve C# AKS example
MODIFY
azure-cs-aks/Azure.AKS.csproj
azure-cs-aks/Azure.AKS.csproj
</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>

MODIFY
azure-cs-aks/Program.cs
azure-cs-aks/Program.cs
@@ -9,6 +9,7 @@ using Pulumi.Azure.ContainerService;
using Pulumi.Azure.ContainerService.Inputs;
using Pulumi.Azure.Core;
using Pulumi.Azure.Network;
+using Pulumi.Azure.Role;
using Pulumi.Random;
using Pulumi.Tls;
@@ -41,6 +42,14 @@ class Program
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
{

Improve C# AKS example (#559)