Skip to content

Commit

Permalink
Upgrade Azure CS examples to azure-native v2 and .NET 6 (pulumi#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas11 committed Feb 12, 2024
1 parent 43fb674 commit 70fa289
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 25 deletions.
2 changes: 1 addition & 1 deletion azure-cs-aci/Azure.Aci.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions azure-cs-aks-cosmos-helm/AksCosmosStack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureAD" Version="4.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Kubernetes" Version="3.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
<PackageReference Include="Pulumi.Tls" Version="4.*" />
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-aks-helm/MyConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MyConfig

public MyConfig()
{
var cfg = new Config();
var cfg = new Pulumi.Config();

this.K8SVersion = cfg.Get("k8sVersion") ?? "1.26.3";
this.NodeCount = cfg.GetInt32("nodeCount") ?? 2;
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-aks-helm/azure-cs-aks-helm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.AzureAd" Version="4.*" />
<PackageReference Include="Pulumi.Kubernetes" Version="3.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-aks-multicluster/MyStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using Pulumi.AzureAD;
using Pulumi.AzureNative.Resources;
using Pulumi.AzureNative.ContainerService;
using Pulumi.AzureNative.ContainerService.V20190201;
using Pulumi.AzureNative.ContainerService.Inputs;
using ManagedCluster = Pulumi.AzureNative.ContainerService.ManagedCluster;
using ManagedClusterArgs = Pulumi.AzureNative.ContainerService.ManagedClusterArgs;
using Pulumi.AzureNative.ContainerService.V20190601;

class MyStack : Stack
{
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-aks-multicluster/azure-cs-aks-multicluster.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Azuread" Version="4.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion azure-cs-aks/Azure.Aks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureAD" Version="4.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
<PackageReference Include="Pulumi.Tls" Version="4.*" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-appservice-docker/Azure.AppService.Docker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions azure-cs-appservice/AppServiceStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using Pulumi;
using Pulumi.AzureNative.Insights;
using Pulumi.AzureNative.OperationalInsights;
using Pulumi.AzureNative.Resources;
using Pulumi.AzureNative.Sql;
using Pulumi.AzureNative.Storage;
Expand Down Expand Up @@ -54,11 +55,16 @@ public AppServiceStack()

var codeBlobUrl = SignedBlobReadUrl(blob, container, storageAccount, resourceGroup);

var workspace = new Workspace("loganalyticsWorkspace", new WorkspaceArgs{
ResourceGroupName = resourceGroup.Name,
});

var appInsights = new Component("appInsights", new ComponentArgs
{
ApplicationType = "web",
Kind = "web",
ResourceGroupName = resourceGroup.Name,
WorkspaceResourceId = workspace.Id
});

var config = new Config();
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-appservice/Azure.AppService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions azure-cs-call-azure-api/azure-cs-call-azure-api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>azure_cs_call_azure_sdk</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion azure-cs-containerapps/Azure.ContainerApps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="3.*" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion azure-cs-cosmosdb-logicapp/CosmosDBLogicApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-credential-rotation-one-set/AppStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public AppStack()

var expiresAt = DateTimeOffset.Now.AddMinutes(1).ToUnixTimeSeconds();
var secret = new Secret("secret",
new SecretArgs
new KeyVault.SecretArgs
{
SecretName = secretName,
VaultName = keyVault.Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="3.*" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion azure-cs-functions/Azure.Functions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions azure-cs-net5-aks-webapp/Azure.Dotnet5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureAD" Version="4.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.*" />
<PackageReference Include="Pulumi.Kubernetes" Version="3.*" />
<PackageReference Include="Pulumi.Random" Version="3.*" />
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-sqlserver/Azure.SQLServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-static-website/Azure.StaticWebsite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Docker" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-cs-synapse/Azure.Synapse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
<PackageReference Include="Pulumi.Random" Version="4.*" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion docker-cs-multi-container-app/App/App.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion testing-unit-cs-mocks/UnitTesting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.*" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion testing-unit-cs-top-level-program/infra/Infra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.AzureNative" Version="1.67.0" />
<PackageReference Include="Pulumi.AzureNative" Version="2.*" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 70fa289

Please sign in to comment.