Created
February 7, 2020 13:30
-
-
Save mikhailshilkov/3efa3fb93d936220a346ecfd4280e76f to your computer and use it in GitHub Desktop.
.NET API change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Pulumi; | |
using Pulumi.Serialization; | |
using Pulumi.Azure.Core; | |
using Pulumi.Azure.Storage; | |
class MyStack : Stack | |
{ | |
public MyStack() | |
{ | |
// Create an Azure Resource Group | |
var resourceGroup = new ResourceGroup("resourceGroup"); | |
// Create an Azure Storage Account | |
var storageAccount = new Account("storage", new AccountArgs | |
{ | |
ResourceGroupName = resourceGroup.Name, | |
AccountReplicationType = "LRS", | |
AccountTier = "Standard", | |
}); | |
// Export the connection string for the storage account | |
this.ConnectionString = storageAccount.PrimaryConnectionString; | |
} | |
[Output] public Output<string> ConnectionString { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Pulumi; | |
class Program | |
{ | |
static Task<int> Main() => Deployment.RunAsync<MyStack>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Pulumi; | |
using Pulumi.Azure.Core; | |
using Pulumi.Azure.Storage; | |
class Program | |
{ | |
static Task<int> Main() | |
{ | |
return Deployment.RunAsync(() => { | |
// Create an Azure Resource Group | |
var resourceGroup = new ResourceGroup("resourceGroup"); | |
// Create an Azure Storage Account | |
var storageAccount = new Account("storage", new AccountArgs | |
{ | |
ResourceGroupName = resourceGroup.Name, | |
AccountReplicationType = "LRS", | |
AccountTier = "Standard", | |
}); | |
// Export the connection string for the storage account | |
return new Dictionary<string, object> | |
{ | |
{ "connectionString", storageAccount.PrimaryConnectionString }, | |
}; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment