Skip to content

Commit

Permalink
Update .NET versions to latest and fix warnings (pulumi#499)
Browse files Browse the repository at this point in the history
Update .NET versions to latest and fix warnings
  • Loading branch information
mikhailshilkov committed Dec 12, 2019
1 parent fdb81aa commit ef02fd2
Show file tree
Hide file tree
Showing 31 changed files with 57 additions and 268 deletions.
2 changes: 1 addition & 1 deletion aws-cs-lambda/pulumi/Infra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Aws" Version="1.8.0-preview" />
<PackageReference Include="Pulumi.Aws" Version="1.15.0-preview" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion aws-cs-webserver/AWS.Webserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Aws" Version="1.8.0-preview" />
<PackageReference Include="Pulumi.Aws" Version="1.15.0-preview" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions aws-cs-webserver/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class Program
{
private const string size = "t2.micro";
private const string Size = "t2.micro";

static Task<int> Main()
{
Expand Down Expand Up @@ -48,17 +48,17 @@ static Task<int> Main()
var server = new Instance("web-server-www", new InstanceArgs
{
InstanceType = size,
InstanceType = Size,
SecurityGroups = { group.Name },
UserData = userData,
Ami = ami.Id,
});
return new Dictionary<string, object>
return new Dictionary<string, object?>
{
{ "publicIp", server.PublicIp },
{ "publicDns", server.PublicDns }
};
});
}
}
}
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.5.0-preview" />
<PackageReference Include="Pulumi.Azuread" Version="1.1.0-preview" />
<PackageReference Include="Pulumi.Random" Version="1.2.0-preview" />
<PackageReference Include="Pulumi.Tls" Version="1.1.0-preview" />
<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" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions azure-cs-aks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ static Task<int> Main()
},
});
return new Dictionary<string, object>
return new Dictionary<string, object?>
{
{ "kubeconfig", cluster.KubeConfigRaw },
};
});
}
}
}
2 changes: 1 addition & 1 deletion azure-cs-appservice/Azure.AppService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Azure" Version="1.8.0-preview" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions azure-cs-appservice/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Program
{
static Task<int> Main(string[] args)
static Task<int> Main()
{
return Deployment.RunAsync(() => {
var resourceGroup = new ResourceGroup("appservice-rg");
Expand Down Expand Up @@ -92,11 +92,11 @@ static Task<int> Main(string[] args)
},
});
return new Dictionary<string, object>
return new Dictionary<string, object?>
{
{ "endpoint", app.DefaultSiteHostname },
};
});
}
}
}
38 changes: 0 additions & 38 deletions azure-cs-appservice/SharedAccessSignature.cs

This file was deleted.

6 changes: 3 additions & 3 deletions azure-cs-botservice/Azure.BotService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.AzureAD" Version="1.2.0-preview" />
<PackageReference Include="Pulumi.Random" Version="1.2.0-preview" />
<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" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions azure-cs-botservice/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

class Program
{
static Task<int> Main(string[] args)
static Task<int> Main()
{
return Deployment.RunAsync(() =>
{
var config = new Config();
var config = new Pulumi.Config();
var botName = config.Require("botName");
var resourceGroup = new ResourceGroup("botservice-rg");
Expand Down Expand Up @@ -128,7 +128,7 @@ static Task<int> Main(string[] args)
DeveloperAppInsightsKey = appInsights.InstrumentationKey
});
return new Dictionary<string, object>
return new Dictionary<string, object?>
{
{ "Bot Endpoint", bot.Endpoint },
{ "MicrosoftAppId", msa.ApplicationId },
Expand Down
38 changes: 0 additions & 38 deletions azure-cs-botservice/SharedAccessSignature.cs

This file was deleted.

6 changes: 3 additions & 3 deletions azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public ArchiveFunctionApp(string name, ArchiveFunctionAppArgs args, ResourceOpti

public class ArchiveFunctionAppArgs
{
public Input<string> ResourceGroupName { get; set; }
public string Location { get; set; }
public Input<Archive> Archive { get; set; }
public Input<string> ResourceGroupName { get; set; } = null!;
public string Location { get; set; } = null!;
public Input<Archive> Archive { get; set; } = null!;

private InputMap<string>? _appSettings;
public InputMap<string> AppSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Azure" Version="1.8.0-preview" />
</ItemGroup>

<PropertyGroup>
Expand Down
14 changes: 7 additions & 7 deletions azure-cs-cosmosapp-component/CosmosApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public ExternalEndpoint(Input<string> url)

public class CosmosAppArgs
{
public ResourceGroup ResourceGroup { get; set; }
public string[] Locations { get; set; }
public Func<GlobalContext, Func<RegionalContext, IRegionalEndpoint>> Factory { get; set; }
public Input<string> DatabaseName { get; set; }
public Input<string> ContainerName { get; set; }
public Input<bool> EnableMultiMaster { get; set; }
public ResourceGroup ResourceGroup { get; set; } = null!;
public string[] Locations { get; set; } = null!;
public Func<GlobalContext, Func<RegionalContext, IRegionalEndpoint>> Factory { get; set; } = null!;
public Input<string> DatabaseName { get; set; } = null!;
public Input<string> ContainerName { get; set; } = null!;
public Input<bool>? EnableMultiMaster { get; set; }
}

public class CosmosApp : ComponentResource
Expand Down Expand Up @@ -182,4 +182,4 @@ public CosmosApp(string name, CosmosAppArgs args, ComponentResourceOptions? opti
this.Endpoint = Output.Format($"http:https://{profile.Fqdn}");
this.RegisterOutputs();
}
}
}
10 changes: 5 additions & 5 deletions azure-cs-cosmosapp-component/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

class Program
{
static Task<int> Main(string[] args)
static Task<int> Main()
{
return Deployment.RunAsync(() =>
{
var functions = Functions.Run();
// var vmss = VmScaleSets.Run();
return new Dictionary<string, object>
var vmss = VmScaleSets.Run();
return new Dictionary<string, object?>
{
{ "functionsEndpoint", functions["functionsEndpoint"] },
// { "vmssEndpoint", vmss["vmssEndpoint"] },
{ "vmssEndpoint", vmss["vmssEndpoint"] },
};
});
}
}
}
38 changes: 0 additions & 38 deletions azure-cs-cosmosapp-component/SharedAccessSignature.cs

This file was deleted.

2 changes: 1 addition & 1 deletion azure-cs-functions-raw/Azure.FunctionsRaw.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Azure" Version="1.8.0-preview" />
</ItemGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions azure-cs-functions-raw/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ static Task<int> Main()
Version = "~3",
});
return new Dictionary<string, object>
return new Dictionary<string, object?>
{
{ "endpoint", Output.Format($"https://{app.DefaultHostname}/api/Hello?name=Pulumi") },
};
});
}
}
}
38 changes: 0 additions & 38 deletions azure-cs-functions-raw/SharedAccessSignature.cs

This file was deleted.

Loading

0 comments on commit ef02fd2

Please sign in to comment.