https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
dotnet
  • m

    millions-journalist-34868

    01/30/2022, 9:51 AM
    Any news about this? I think the new template should default to .NET 6 as it is the new LTS. I asked the question on Twitter too, I hope you will answer.
    t
    • 2
    • 2
  • d

    damp-toddler-4614

    02/08/2022, 8:17 AM
    Hi Friends, I have a console app that runs fine with pulumi automation api and creates all the resources in AWS. However, when i try to integrate this app in CI/CD with github Action; I get this weird error which Im having a hard time understanding, Any ideas? . (workflow steps in thread) -
    Run docker run dockertest:dev
      docker run dockertest:dev
      shell: /usr/bin/bash -e {0}
      env:
        PULUMI_ACCESS_TOKEN: ***
        AWS_ACCESS_KEY_ID: ***
        AWS_SECRET_ACCESS_KEY: ***
    Hello Pulumi World!
    Unhandled exception. System.ComponentModel.Win32Exception (2): No such file or directory
       at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
       at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start()
       at CliWrap.Utils.ProcessEx.Start() in /home/runner/work/CliWrap/CliWrap/CliWrap/Utils/ProcessEx.cs:line 65
       at CliWrap.Command.ExecuteAsync(ProcessEx process, CancellationToken cancellationToken) in /home/runner/work/CliWrap/CliWrap/CliWrap/Command.cs:line 373
       at Pulumi.Automation.Commands.LocalPulumiCmd.RunAsyncInner(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, EventLogFile eventLogFile, CancellationToken cancellationToken)
       at Pulumi.Automation.Commands.LocalPulumiCmd.RunAsync(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, Action`1 onEngineEvent, CancellationToken cancellationToken)
       at Pulumi.Automation.LocalWorkspace.PopulatePulumiVersionAsync(CancellationToken cancellationToken)
       at Pulumi.Automation.LocalWorkspace.CreateStackHelperAsync(InlineProgramArgs args, Func`4 initFunc, CancellationToken cancellationToken)
    e
    • 2
    • 3
  • c

    colossal-vr-62639

    02/25/2022, 1:50 PM
    Is there a way to perform the following?
    var inputs = new Pulumi.InputList<Pulumi.Aws.Ec2.Subnet>();
    Pulumi.Output<string[]> subnetIds = //project inputs
    t
    • 2
    • 3
  • c

    clean-alarm-24426

    03/02/2022, 1:23 PM
    Hi all. I apologize if there's a thread on this already that I missed. I've been away from day-to-day coding and IaC for a while, so I'm just getting my head back into the game. I'm still new to Pulumi overall. I'm looking for a blog post, video, whatever to learn about best practice recommendations around organizing your .NET Pulumi code for modularization. As an example, I have a client that has a lot of Azure IaaS environments. They have a fair set of baseline configurations and standards around the VM configurations. Depending on the use case, I'd like to be able to use some class definitions (or even a class library) to create modules specific to VM types that they define (e.g. A domain controller, A VM hosting synthea (a synthic data creation tool, etc...). The goal would be to allow them to create a top level module project that would pull in classes/class libraries, allowing them to define the minimum number of properties for their local variation on the resource type and assemble the various custom resources into an environment. I hope this request is clear and makes sense. I'm happy to provide more detail and some examples where I've organized the same thing using BICEP. In the end, just links to samples, blog posts, etc to get me moving in the right direction will be helpful.
    e
    b
    • 3
    • 6
  • d

    damp-toddler-4614

    03/03/2022, 3:47 AM
    Hi - I am creating aws subnet as follows:
    var subnet = new Ec2.Subnet(subnetName, new Ec2.SubnetArgs
                {
                    CidrBlock = config.CidrBlock,
                    AvailabilityZone=config.AvailabilityZone,
                    VpcId = config.VpcId
                });
    but when the subnet is created in aws, it doesnt have the name defined. The
    SubnetArgs
    also doesnt have a
    Name
    property unlike most other resources. Is there a way I can specify the name?
    b
    • 2
    • 2
  • c

    colossal-vr-62639

    03/18/2022, 9:30 AM
    Is there a way to set outputs like the following?
    using System.Collections.Generic;
    using Pulumi;
    using Pulumi.Aws.S3;
    
    return await Deployment.RunAsync(async () =>
    {
        var outputs = new Dictionary<string, object?>();
    
        var bucket = new Bucket("items", new BucketArgs { });
    
        bucket.Arn.Apply(arn =>
        {
            outputs.Add("arn", arn); //here
            return arn;
        });
    
        return outputs;
    });
    t
    • 2
    • 3
  • m

    millions-journalist-34868

    03/26/2022, 12:34 PM
    When building a ComponentResource, should I create properties on it that are of type Output like in this sample https://github.com/pulumi/examples/blob/master/classic-azure-cs-cosmosapp-component/CosmosApp.cs or should we use a dictionary that is called with the method registerOutputs like on the documentation https://www.pulumi.com/docs/intro/concepts/resources/components/#registering-component-outputs I need outputs to pass some properties to another component.
    e
    • 2
    • 2
  • m

    millions-journalist-34868

    03/27/2022, 12:18 AM
    I have a ComponentResource that take as parameter an
    InputList<string>
    , I want to iterate on this list to create different resources. Does someone know how I can dod that ?
    s
    t
    • 3
    • 6
  • e

    eager-keyboard-30823

    04/21/2022, 1:28 PM
    Have there been any thoughts about generating computation expressions for the F# projects? This project shows how it could be useful: https://github.com/UnoSD/Pulumi.FSharp.Extensions. I’ve been using that so far, but it’s not kept up to date automatically and some of the design decisions I disagree with - but would love to see something similar directly from Pulumi.
    ➕ 1
    m
    • 2
    • 1
  • b

    bland-waitress-855

    05/13/2022, 5:10 PM
    I'm currently struggling to get unit tests to work in C#. Using the default mocks and getting a lot of null reference exceptions. On calls like
    var credentials = ListRegistryCredentials.Invoke(new ListRegistryCredentialsInvokeArgs
    {
    ResourceGroupName = _azureConfig.ResourceGroupName,
    RegistryName = $"{_azureConfig.Stack.ToLower()}services{_azureConfig.Env}cr"
    });
    This and all other calls work fine otherwise.
    The mocks:
    var mocks = new Mock<IMocks>();
    mocks.Setup(m => m.NewResourceAsync(It.IsAny<MockResourceArgs>()))
    .ReturnsAsync((MockResourceArgs args) => (args.Id ?? "", args.Inputs));
    mocks.Setup(m => m.CallAsync(It.IsAny<MockCallArgs>()))
    .ReturnsAsync((MockCallArgs args) => args.Args);
    return Deployment.TestWithServiceProviderAsync<T>(mocks.Object, serviceProvider,new TestOptions { IsPreview = false });
    b
    • 2
    • 8
  • b

    bland-waitress-855

    05/17/2022, 2:34 PM
    I couldn't get it to work, how do I fake it? Related to the message above. I have tried a lot of combinations by now
  • b

    bland-waitress-855

    05/17/2022, 2:35 PM
    mocks.Setup(m => m.CallAsync(It.IsAny<MockCallArgs>()))
    .ReturnsAsync((MockCallArgs args) =>
    {
    var outputs = ImmutableDictionary.CreateBuilder<string, object>();
    switch (args.Token)
    {
    case "azure-native:containerregistry:getRegistry":
    outputs.Add("loginserver", "server");
    break;
    case "azure-native:containerregistry:listRegistryCredentials":
    outputs.Add("username", "username");
    // outputs.Add("passwords", new List<KeyValuePair<string,string>>
    // {
    //     new("password","password")
    // });
    outputs.Add("passwords", "{\"test\",\"test\"}");
    break;
    case "azure-native:containerservice:listManagedClusterUserCredentials":
    outputs.Add("kubeconfigs","[{  \"name\":\"test\",  \"value\": \"test\"}]");
    break;
    }
    return outputs;
    });
  • s

    swift-island-2275

    05/30/2022, 3:47 PM
    Hi, I've a question regarding Azure LogicApps. On Pulumi page (https://www.pulumi.com/registry/packages/azure-native/api-docs/logic/workflow/) you show how to provide the Definition of a LA, but my question is how can I set the Definition from a json file rather then setting it as a nested obejcts graph ? I'd like to just go to Azure, copy the code from the "Logic app code view" and set it as a string - this doesn't seem to work, as I always get an error with Definition deserialization.
  • w

    worried-city-86458

    05/30/2022, 7:18 PM
    https://github.com/pulumi/pulumi-aws/releases/tag/v5.6.0 hasn't been published to https://www.nuget.org/packages/Pulumi.Aws; did something go wrong?
    b
    • 2
    • 2
  • e

    eager-keyboard-30823

    06/03/2022, 12:32 PM
    Are there any resources on best practices for combining e.g. the
    option
    type with
    Output
    types in F#?
  • c

    clever-address-74879

    06/06/2022, 12:30 PM
    Hey there #dotnet! What's the better way to access secrets in your Pulumi code (in C#)? Specifically during CI/CD
  • c

    clever-address-74879

    06/06/2022, 12:31 PM
    For example if I have a
    ${{ secrets.ConnectionString }}
    in GitHub actions. Do I just set it as environment variables on the pulumi action and use that access that in the code?
  • c

    clever-address-74879

    06/06/2022, 12:32 PM
    And get it with
    var config = new Pulumi.Config();
    var name = config.Require("ConnectionString");
    e
    d
    +2
    • 5
    • 12
  • l

    late-ability-31616

    06/11/2022, 8:24 PM
    Hi everybody, I'm new to Pulumi, and I'm using C#. Is there a straightforward way to get a value from an
    Output<string>
    ? I tried to do an assignment in the
    Apply
    method, but even though the resource has been provisioned, it doesn't seem to execute:
    var env = new CCloud.Environment(envName, args);
    string envId = "Not set";
    env.Id.Apply(v => envId = $"env-id = {v}");
    File.WriteAllText(@"env-id.txt", envId);
    
    File contains "Not set".
    Is there some sort of
    Wait
    that I need to wrap the
    Apply
    call in?
    b
    • 2
    • 10
  • g

    gentle-camera-53119

    06/13/2022, 1:45 PM
    Hi Team, I am trying to create Azure Service principles in C# but I am getting this error
    error CS0234: The type or namespace name 'AzureAD' does not exist in the namespace 'Pulumi' (are you missing an assembly reference?) [/Users/XXXXX/XXX/pulumi/cazure/cazure.csproj
    t
    • 2
    • 3
  • w

    witty-laptop-88449

    06/14/2022, 6:06 AM
    set the channel topic: Azure Action Group gets deleted on changing email address
    👀 1
  • w

    witty-laptop-88449

    06/14/2022, 6:07 AM
    set the channel description: Pulumi for .NET Core - C#, Azure
  • w

    witty-laptop-88449

    06/14/2022, 6:07 AM
    Hi Team, I created a Azure Service Bus and then an Action Group with email alerts to notify the dead lettered messages. The CI/CD is done through Azure DevOps pipelines. The email for the action group is configured as a settings property. I could successfully provision the service bus, action group with required alerts during the deployment. But when i edited the release to give a different email address and re-deployed the release the action group got deleted instead of updating the email address. Any thoughts on this issue, for me it looks more like a Pulumi issue than coding issue. Please advise me
    ✅ 1
    e
    • 2
    • 9
  • t

    tall-librarian-49374

    06/14/2022, 7:29 AM
    set the channel topic: Pulumi for .NET
  • c

    clever-address-74879

    06/21/2022, 8:04 PM
    Hi there! I found a bug in the C# SDK. It's not possible to use
    await Pulumi.Deployment.RunAsync(() => { ... });
    with workload identity federation. It only works with the "old" style
    Deployment.RunAsync<BigDayStack>();
    b
    • 2
    • 1
  • c

    clever-address-74879

    06/21/2022, 8:05 PM
    Not sure what the difference is, but it will not allow you to run it when using a service principal with workload identity federation.
  • h

    happy-grass-18954

    06/26/2022, 8:51 PM
    Hi, I’m new to Pulumi and have a basic question. How would I convert the command
    pulumi stacks ls
    to C#?
    b
    • 2
    • 6
  • g

    gentle-airplane-84691

    06/29/2022, 11:00 AM
    Hello, any example on getting/creating service bus queues?
  • g

    gentle-airplane-84691

    06/29/2022, 11:02 AM
    this is what i tried so far
    c
    • 2
    • 1
  • g

    gentle-airplane-84691

    06/29/2022, 11:02 AM
    but i still get an unhandled error
    Status=404 Code="EntityNotFound" Message="Queue does not exist"
Powered by Linen
Title
g

gentle-airplane-84691

06/29/2022, 11:02 AM
but i still get an unhandled error
Status=404 Code="EntityNotFound" Message="Queue does not exist"
View count: 2