diff --git a/aws-cs-lambda/pulumi/Infra.csproj b/aws-cs-lambda/pulumi/Infra.csproj
index 9d071adc0..4be263e15 100644
--- a/aws-cs-lambda/pulumi/Infra.csproj
+++ b/aws-cs-lambda/pulumi/Infra.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/aws-cs-webserver/AWS.Webserver.csproj b/aws-cs-webserver/AWS.Webserver.csproj
index 9d071adc0..4be263e15 100644
--- a/aws-cs-webserver/AWS.Webserver.csproj
+++ b/aws-cs-webserver/AWS.Webserver.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/aws-cs-webserver/Program.cs b/aws-cs-webserver/Program.cs
index 74c88aeef..9e70d1484 100644
--- a/aws-cs-webserver/Program.cs
+++ b/aws-cs-webserver/Program.cs
@@ -11,7 +11,7 @@
class Program
{
- private const string size = "t2.micro";
+ private const string Size = "t2.micro";
static Task Main()
{
@@ -48,17 +48,17 @@ static Task 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
+ return new Dictionary
{
{ "publicIp", server.PublicIp },
{ "publicDns", server.PublicDns }
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-aks/Azure.AKS.csproj b/azure-cs-aks/Azure.AKS.csproj
index b007ce5d1..2228ec4f2 100644
--- a/azure-cs-aks/Azure.AKS.csproj
+++ b/azure-cs-aks/Azure.AKS.csproj
@@ -7,10 +7,10 @@
-
-
-
-
+
+
+
+
diff --git a/azure-cs-aks/Program.cs b/azure-cs-aks/Program.cs
index 8c2ac2a8f..f525dff82 100644
--- a/azure-cs-aks/Program.cs
+++ b/azure-cs-aks/Program.cs
@@ -93,11 +93,11 @@ static Task Main()
},
});
- return new Dictionary
+ return new Dictionary
{
{ "kubeconfig", cluster.KubeConfigRaw },
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-appservice/Azure.AppService.csproj b/azure-cs-appservice/Azure.AppService.csproj
index abe6467cd..ee760094c 100644
--- a/azure-cs-appservice/Azure.AppService.csproj
+++ b/azure-cs-appservice/Azure.AppService.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/azure-cs-appservice/Program.cs b/azure-cs-appservice/Program.cs
index 03124bb8f..71174ceb0 100644
--- a/azure-cs-appservice/Program.cs
+++ b/azure-cs-appservice/Program.cs
@@ -12,7 +12,7 @@
class Program
{
- static Task Main(string[] args)
+ static Task Main()
{
return Deployment.RunAsync(() => {
var resourceGroup = new ResourceGroup("appservice-rg");
@@ -92,11 +92,11 @@ static Task Main(string[] args)
},
});
- return new Dictionary
+ return new Dictionary
{
{ "endpoint", app.DefaultSiteHostname },
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-appservice/SharedAccessSignature.cs b/azure-cs-appservice/SharedAccessSignature.cs
deleted file mode 100644
index 48c7f3cff..000000000
--- a/azure-cs-appservice/SharedAccessSignature.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Pulumi;
-using Pulumi.Azure.Storage;
-using Pulumi.Azure.Storage.Inputs;
-
- public static class SharedAccessSignature
-{
- public static Output SignedBlobReadUrl(ZipBlob blob, Account account)
- {
- return Output
- .All(account.Name, account.PrimaryConnectionString, blob.StorageContainerName, blob.Name)
- .Apply(async values =>
- {
- string accountName = values[0];
- string connectionString = values[1];
- string containerName = values[2];
- string blobName = values[3];
- var sas = await Invokes.GetAccountBlobContainerSAS(
- new GetAccountBlobContainerSASArgs
- {
- ConnectionString = connectionString,
- ContainerName = containerName,
- Start = "2019-01-01",
- Expiry = "2100-01-01",
- Permissions = new GetAccountBlobContainerSASPermissionsArgs
- {
- Read = true,
- Write = false,
- Delete = false,
- List = false,
- Add = false,
- Create = false,
- },
- }
- );
- return $"https://{accountName}.blob.core.windows.net/{containerName}/{blobName}{sas.Sas}";
- });
- }
-}
diff --git a/azure-cs-botservice/Azure.BotService.csproj b/azure-cs-botservice/Azure.BotService.csproj
index 4e5747122..809c10baf 100644
--- a/azure-cs-botservice/Azure.BotService.csproj
+++ b/azure-cs-botservice/Azure.BotService.csproj
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/azure-cs-botservice/Program.cs b/azure-cs-botservice/Program.cs
index c32b2b4d0..2544066c3 100644
--- a/azure-cs-botservice/Program.cs
+++ b/azure-cs-botservice/Program.cs
@@ -16,11 +16,11 @@
class Program
{
- static Task Main(string[] args)
+ static Task Main()
{
return Deployment.RunAsync(() =>
{
- var config = new Config();
+ var config = new Pulumi.Config();
var botName = config.Require("botName");
var resourceGroup = new ResourceGroup("botservice-rg");
@@ -128,7 +128,7 @@ static Task Main(string[] args)
DeveloperAppInsightsKey = appInsights.InstrumentationKey
});
- return new Dictionary
+ return new Dictionary
{
{ "Bot Endpoint", bot.Endpoint },
{ "MicrosoftAppId", msa.ApplicationId },
diff --git a/azure-cs-botservice/SharedAccessSignature.cs b/azure-cs-botservice/SharedAccessSignature.cs
deleted file mode 100644
index 48c7f3cff..000000000
--- a/azure-cs-botservice/SharedAccessSignature.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Pulumi;
-using Pulumi.Azure.Storage;
-using Pulumi.Azure.Storage.Inputs;
-
- public static class SharedAccessSignature
-{
- public static Output SignedBlobReadUrl(ZipBlob blob, Account account)
- {
- return Output
- .All(account.Name, account.PrimaryConnectionString, blob.StorageContainerName, blob.Name)
- .Apply(async values =>
- {
- string accountName = values[0];
- string connectionString = values[1];
- string containerName = values[2];
- string blobName = values[3];
- var sas = await Invokes.GetAccountBlobContainerSAS(
- new GetAccountBlobContainerSASArgs
- {
- ConnectionString = connectionString,
- ContainerName = containerName,
- Start = "2019-01-01",
- Expiry = "2100-01-01",
- Permissions = new GetAccountBlobContainerSASPermissionsArgs
- {
- Read = true,
- Write = false,
- Delete = false,
- List = false,
- Add = false,
- Create = false,
- },
- }
- );
- return $"https://{accountName}.blob.core.windows.net/{containerName}/{blobName}{sas.Sas}";
- });
- }
-}
diff --git a/azure-cs-cosmosapp-component/ArchiveFunctionApp.cs b/azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
index 2ef9150b1..d44ceeb48 100644
--- a/azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
+++ b/azure-cs-cosmosapp-component/ArchiveFunctionApp.cs
@@ -71,9 +71,9 @@ public ArchiveFunctionApp(string name, ArchiveFunctionAppArgs args, ResourceOpti
public class ArchiveFunctionAppArgs
{
- public Input ResourceGroupName { get; set; }
- public string Location { get; set; }
- public Input Archive { get; set; }
+ public Input ResourceGroupName { get; set; } = null!;
+ public string Location { get; set; } = null!;
+ public Input Archive { get; set; } = null!;
private InputMap? _appSettings;
public InputMap AppSettings
diff --git a/azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj b/azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj
index 3e51485b6..364c15444 100644
--- a/azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj
+++ b/azure-cs-cosmosapp-component/Azure.CosmosAppComponent.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/azure-cs-cosmosapp-component/CosmosApp.cs b/azure-cs-cosmosapp-component/CosmosApp.cs
index 81dd33552..47383005e 100644
--- a/azure-cs-cosmosapp-component/CosmosApp.cs
+++ b/azure-cs-cosmosapp-component/CosmosApp.cs
@@ -79,12 +79,12 @@ public ExternalEndpoint(Input url)
public class CosmosAppArgs
{
- public ResourceGroup ResourceGroup { get; set; }
- public string[] Locations { get; set; }
- public Func> Factory { get; set; }
- public Input DatabaseName { get; set; }
- public Input ContainerName { get; set; }
- public Input EnableMultiMaster { get; set; }
+ public ResourceGroup ResourceGroup { get; set; } = null!;
+ public string[] Locations { get; set; } = null!;
+ public Func> Factory { get; set; } = null!;
+ public Input DatabaseName { get; set; } = null!;
+ public Input ContainerName { get; set; } = null!;
+ public Input? EnableMultiMaster { get; set; }
}
public class CosmosApp : ComponentResource
@@ -182,4 +182,4 @@ public CosmosApp(string name, CosmosAppArgs args, ComponentResourceOptions? opti
this.Endpoint = Output.Format($"http://{profile.Fqdn}");
this.RegisterOutputs();
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-cosmosapp-component/Program.cs b/azure-cs-cosmosapp-component/Program.cs
index b52a32261..44e44281a 100644
--- a/azure-cs-cosmosapp-component/Program.cs
+++ b/azure-cs-cosmosapp-component/Program.cs
@@ -7,17 +7,17 @@
class Program
{
- static Task Main(string[] args)
+ static Task Main()
{
return Deployment.RunAsync(() =>
{
var functions = Functions.Run();
-// var vmss = VmScaleSets.Run();
- return new Dictionary
+ var vmss = VmScaleSets.Run();
+ return new Dictionary
{
{ "functionsEndpoint", functions["functionsEndpoint"] },
- // { "vmssEndpoint", vmss["vmssEndpoint"] },
+ { "vmssEndpoint", vmss["vmssEndpoint"] },
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-cosmosapp-component/SharedAccessSignature.cs b/azure-cs-cosmosapp-component/SharedAccessSignature.cs
deleted file mode 100644
index 48c7f3cff..000000000
--- a/azure-cs-cosmosapp-component/SharedAccessSignature.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Pulumi;
-using Pulumi.Azure.Storage;
-using Pulumi.Azure.Storage.Inputs;
-
- public static class SharedAccessSignature
-{
- public static Output SignedBlobReadUrl(ZipBlob blob, Account account)
- {
- return Output
- .All(account.Name, account.PrimaryConnectionString, blob.StorageContainerName, blob.Name)
- .Apply(async values =>
- {
- string accountName = values[0];
- string connectionString = values[1];
- string containerName = values[2];
- string blobName = values[3];
- var sas = await Invokes.GetAccountBlobContainerSAS(
- new GetAccountBlobContainerSASArgs
- {
- ConnectionString = connectionString,
- ContainerName = containerName,
- Start = "2019-01-01",
- Expiry = "2100-01-01",
- Permissions = new GetAccountBlobContainerSASPermissionsArgs
- {
- Read = true,
- Write = false,
- Delete = false,
- List = false,
- Add = false,
- Create = false,
- },
- }
- );
- return $"https://{accountName}.blob.core.windows.net/{containerName}/{blobName}{sas.Sas}";
- });
- }
-}
diff --git a/azure-cs-functions-raw/Azure.FunctionsRaw.csproj b/azure-cs-functions-raw/Azure.FunctionsRaw.csproj
index 55cb24dfc..36c21ae55 100644
--- a/azure-cs-functions-raw/Azure.FunctionsRaw.csproj
+++ b/azure-cs-functions-raw/Azure.FunctionsRaw.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/azure-cs-functions-raw/Program.cs b/azure-cs-functions-raw/Program.cs
index 117a59a1a..3acd6001f 100644
--- a/azure-cs-functions-raw/Program.cs
+++ b/azure-cs-functions-raw/Program.cs
@@ -63,11 +63,11 @@ static Task Main()
Version = "~3",
});
- return new Dictionary
+ return new Dictionary
{
{ "endpoint", Output.Format($"https://{app.DefaultHostname}/api/Hello?name=Pulumi") },
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-cs-functions-raw/SharedAccessSignature.cs b/azure-cs-functions-raw/SharedAccessSignature.cs
deleted file mode 100644
index 48c7f3cff..000000000
--- a/azure-cs-functions-raw/SharedAccessSignature.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Pulumi;
-using Pulumi.Azure.Storage;
-using Pulumi.Azure.Storage.Inputs;
-
- public static class SharedAccessSignature
-{
- public static Output SignedBlobReadUrl(ZipBlob blob, Account account)
- {
- return Output
- .All(account.Name, account.PrimaryConnectionString, blob.StorageContainerName, blob.Name)
- .Apply(async values =>
- {
- string accountName = values[0];
- string connectionString = values[1];
- string containerName = values[2];
- string blobName = values[3];
- var sas = await Invokes.GetAccountBlobContainerSAS(
- new GetAccountBlobContainerSASArgs
- {
- ConnectionString = connectionString,
- ContainerName = containerName,
- Start = "2019-01-01",
- Expiry = "2100-01-01",
- Permissions = new GetAccountBlobContainerSASPermissionsArgs
- {
- Read = true,
- Write = false,
- Delete = false,
- List = false,
- Add = false,
- Create = false,
- },
- }
- );
- return $"https://{accountName}.blob.core.windows.net/{containerName}/{blobName}{sas.Sas}";
- });
- }
-}
diff --git a/azure-cs-msi-keyvault-rbac/Azure.KeyVault.csproj b/azure-cs-msi-keyvault-rbac/Azure.KeyVault.csproj
index 12786368e..e4cf66f92 100644
--- a/azure-cs-msi-keyvault-rbac/Azure.KeyVault.csproj
+++ b/azure-cs-msi-keyvault-rbac/Azure.KeyVault.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/azure-cs-msi-keyvault-rbac/Program.cs b/azure-cs-msi-keyvault-rbac/Program.cs
index 9fbe5000c..a3432fdc8 100644
--- a/azure-cs-msi-keyvault-rbac/Program.cs
+++ b/azure-cs-msi-keyvault-rbac/Program.cs
@@ -191,7 +191,7 @@ static Task Main()
})
).ToList());
- return new Dictionary
+ return new Dictionary
{
{ "endpoint", Output.Format($"https://{app.DefaultSiteHostname}") },
};
diff --git a/azure-cs-msi-keyvault-rbac/SharedAccessSignature.cs b/azure-cs-msi-keyvault-rbac/SharedAccessSignature.cs
deleted file mode 100644
index 48c7f3cff..000000000
--- a/azure-cs-msi-keyvault-rbac/SharedAccessSignature.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Pulumi;
-using Pulumi.Azure.Storage;
-using Pulumi.Azure.Storage.Inputs;
-
- public static class SharedAccessSignature
-{
- public static Output SignedBlobReadUrl(ZipBlob blob, Account account)
- {
- return Output
- .All(account.Name, account.PrimaryConnectionString, blob.StorageContainerName, blob.Name)
- .Apply(async values =>
- {
- string accountName = values[0];
- string connectionString = values[1];
- string containerName = values[2];
- string blobName = values[3];
- var sas = await Invokes.GetAccountBlobContainerSAS(
- new GetAccountBlobContainerSASArgs
- {
- ConnectionString = connectionString,
- ContainerName = containerName,
- Start = "2019-01-01",
- Expiry = "2100-01-01",
- Permissions = new GetAccountBlobContainerSASPermissionsArgs
- {
- Read = true,
- Write = false,
- Delete = false,
- List = false,
- Add = false,
- Create = false,
- },
- }
- );
- return $"https://{accountName}.blob.core.windows.net/{containerName}/{blobName}{sas.Sas}";
- });
- }
-}
diff --git a/azure-cs-webserver/Azure.WebServer.csproj b/azure-cs-webserver/Azure.WebServer.csproj
index abe6467cd..ee760094c 100644
--- a/azure-cs-webserver/Azure.WebServer.csproj
+++ b/azure-cs-webserver/Azure.WebServer.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/azure-cs-webserver/Program.cs b/azure-cs-webserver/Program.cs
index ed832f1ee..90f2ca2d5 100644
--- a/azure-cs-webserver/Program.cs
+++ b/azure-cs-webserver/Program.cs
@@ -12,7 +12,7 @@
class Program
{
- static Task Main(string[] args)
+ static Task Main()
{
return Deployment.RunAsync(() => {
var resourceGroup = new ResourceGroup("server-rg");
@@ -99,10 +99,10 @@ static Task Main(string[] args)
return ip.IpAddress;
});
- return new Dictionary
+ return new Dictionary
{
{ "ipAddress", ipAddress }
};
});
}
-}
\ No newline at end of file
+}
diff --git a/azure-fs-appservice/Azure.AppService.fsproj b/azure-fs-appservice/Azure.AppService.fsproj
index f29918740..14e239d8c 100644
--- a/azure-fs-appservice/Azure.AppService.fsproj
+++ b/azure-fs-appservice/Azure.AppService.fsproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/azure-fs-appservice/Program.fs b/azure-fs-appservice/Program.fs
index 361c08aca..abc942f6c 100644
--- a/azure-fs-appservice/Program.fs
+++ b/azure-fs-appservice/Program.fs
@@ -7,27 +7,6 @@ open Pulumi.Azure.AppService.Inputs
open Pulumi.Azure.Core
open Pulumi.Azure.Sql
open Pulumi.Azure.Storage
-open Pulumi.Azure.Storage.Inputs
-
-let signedBlobReadUrl(blob: ZipBlob) (account: Account): Output =
- let getSasToken (accountName, connectionString, containerName, blobName) = async {
- let permissions =
- GetAccountBlobContainerSASPermissionsArgs
- (Read = input true, Write = input false, Delete = input false,
- List = input false, Add = input false, Create = input false)
- let args =
- GetAccountBlobContainerSASArgs
- (ConnectionString = input connectionString,
- ContainerName = input containerName,
- Start = input "2019-01-01",
- Expiry = input "2100-01-01",
- Permissions = input permissions)
- let! sas = Invokes.GetAccountBlobContainerSAS args |> Async.AwaitTask
- return sprintf "https://%s.blob.core.windows.net/%s/%s%s" accountName containerName blobName sas.Sas
- }
-
- Outputs.pair4 account.Name account.PrimaryConnectionString blob.StorageContainerName blob.Name
- |> Outputs.applyAsync getSasToken
let infra () =
let resourceGroup = ResourceGroup "appservice-rg"
@@ -62,7 +41,7 @@ let infra () =
Type = input "block",
Content = input archive))
- let codeBlobUrl = signedBlobReadUrl blob storageAccount
+ let codeBlobUrl = SharedAccessSignature.SignedBlobReadUrl(blob, storageAccount)
let config = Config()
let username = config.Get "sqlAdmin"
diff --git a/digitalocean-cs-k8s/Program.cs b/digitalocean-cs-k8s/Program.cs
index 5f1d6f2c3..2cc5bf253 100644
--- a/digitalocean-cs-k8s/Program.cs
+++ b/digitalocean-cs-k8s/Program.cs
@@ -87,7 +87,7 @@ class Program {
});
}
- return new Dictionary {
+ return new Dictionary {
{"ingressIp", ingressIp}
};
});
diff --git a/digitalocean-cs-loadbalanced-droplets/Program.cs b/digitalocean-cs-loadbalanced-droplets/Program.cs
index 469fc9927..65687789d 100644
--- a/digitalocean-cs-loadbalanced-droplets/Program.cs
+++ b/digitalocean-cs-loadbalanced-droplets/Program.cs
@@ -49,7 +49,7 @@ class Program {
Region = region
});
- return new Dictionary {
+ return new Dictionary {
{"endpoint", loadbalancer.Ip}
};
});
diff --git a/gcp-cs-functions/GCP.Functions.csproj b/gcp-cs-functions/GCP.Functions.csproj
index d15f4f78a..581409f9d 100644
--- a/gcp-cs-functions/GCP.Functions.csproj
+++ b/gcp-cs-functions/GCP.Functions.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/gcp-cs-functions/Program.cs b/gcp-cs-functions/Program.cs
index fc0a8f16e..161be00b8 100644
--- a/gcp-cs-functions/Program.cs
+++ b/gcp-cs-functions/Program.cs
@@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Pulumi;
-using Pulumi.Gcp.Cloudfunctions;
+using Pulumi.Gcp.CloudFunctions;
using Pulumi.Gcp.Storage;
class Program
@@ -30,7 +30,7 @@ static Task Main()
});
// Export the URL of the function
- return new Dictionary
+ return new Dictionary
{
{ "pythonEndpoint", function.HttpsTriggerUrl },
};
diff --git a/gcp-cs-gke/Infra.csproj b/gcp-cs-gke/Infra.csproj
index d15f4f78a..581409f9d 100644
--- a/gcp-cs-gke/Infra.csproj
+++ b/gcp-cs-gke/Infra.csproj
@@ -7,7 +7,7 @@
-
+