witty-planet-6803
07/14/2025, 5:44 PMusing Pulumi;
using Pulumi.AzureNative.Storage;
using AzureNative = Pulumi.AzureNative;
namespace MyComponents;
public class MyStorageAccount : ComponentResource
{
    [Output("storageAccountId")]
    public Output<string> StorageAccountId { get; private set; }
    public MyStorageAccount(string name, MyStorageAccountResourceArgs args, ComponentResourceOptions? opts = null)
        : base("pkg:index:MyStorageAccount", name, opts)
    {
        var storageAccountArgs = new StorageAccountArgs
        {
            AccountName = name, // Ensure 'name' is valid for Azure Storagesss
            EnableHttpsTrafficOnly = true,
            ResourceGroupName = args.ResourceGroupName,
            Sku = new AzureNative.Storage.Inputs.SkuArgs
            {
                Name = SkuName.Standard_LRS,
            },
            Kind = Kind.StorageV2,
            Location = args.Location,
        };
        var storageAccount = new StorageAccount(name, storageAccountArgs);
        StorageAccountId = storageAccount.Id;
        this.RegisterOutputs(new Dictionary<string, object?>
        {
            ["storageAccountId"] = storageAccount.Id,
        });
    }
}using Pulumi;
namespace MyComponents;
public class MyStorageAccountResourceArgs : Pulumi.ResourceArgs
{
    [Input("location", required: true)]
    public Input<string> Location { get; set; } = null!;
    [Input("resourceGroupName", required: true)]
    public Input<string> ResourceGroupName { get; set; } = null!;
}git commit -m "v0.0.5"
git tag v0.0.5
git push origin v0.0.5
pulumi package publish github.com/Brutiquzz/pulumicomponents@v0.0.5 
// This succeedsusing Brutiquzz.Pulumicomponents;
using Pulumi;
public class MyStack : Pulumi.Stack
{
    public MyStack()
    {
        var config = new Pulumi.Config();
        var region = config.Require("region");
        var args = new MyStorageAccountArgs()
        {
            Location = region,
            ResourceGroupName = "brutiquzz1234"
        };
        var storageAccount = new MyStorageAccount("brutiquzz1234", args, null);
        this.StorageAccountId = storageAccount.StorageAccountId;
    }
    [Output("storageAccountId")] public Output<string> StorageAccountId { get; set; }
}using System.Threading.Tasks;
public class Program
{
    private static async Task<int> Main(string[] args)
    {
        return await Pulumi.Deployment.RunAsync<MyStack>();
    }
}pulumi new <https://github.com/Brutiquzz/pulumiexperiment/MyPulumiTemplate> // succeedspulumi upechoing-dinner-19531
07/14/2025, 5:46 PMnew StorageAccount(witty-planet-6803
07/14/2025, 7:14 PMwitty-planet-6803
07/14/2025, 7:33 PMechoing-dinner-19531
07/14/2025, 7:51 PMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by