https://pulumi.com logo
Docs
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
  • f

    fast-dinner-32080

    03/12/2020, 4:47 PM
    What would be the recommended way to create/render a template file in Pulumi .net. I am trying to use the liquid engine but I cannot pass it the Input and Output variables since they are not real strings. Is there a way to get the raw string from an Input and Output or maybe a better way to generate rendered templates from files?
    t
    • 2
    • 1
  • f

    fast-dinner-32080

    03/14/2020, 8:22 PM
    @tall-librarian-49374 How do I fix this error when trying to create a helm v3 release?
    System.InvalidOperationException: dictionary contains invalid type System.Object.
    I see you merged a fix https://github.com/pulumi/pulumi/pull/4023 but I am unsure how to make sure I am using the version that includes this. I have v1.12.1 installed and using kubernetes plugin/nuget 1.6.0-alpha.1583869930+g9c001ff9
    t
    • 2
    • 4
  • f

    fast-dinner-32080

    03/16/2020, 4:21 PM
    @tall-librarian-49374 Do you know when the other providers will be released to be able to use 1.12.1? I tried upgrading to the newer Kubernetes version to test the fix but that broke all the other providers since they are not release with 1.12.1 support. The providers I am using are the VSphere, F5BigIP, Rancher2, and Vault.
    System.MissingMethodException: Method not found: 'Void Pulumi.CustomResource..ctor(System.String, System.String, Pulumi.ResourceArgs, Pulumi.ResourceOptions)'
    Looks to be related to the change from ResourceOptions to ComponentResourceOptions. I wonder if this should have been a deprecation instead of a breaking change?
    t
    • 2
    • 4
  • f

    fast-dinner-32080

    03/17/2020, 4:19 PM
    Is there anyway in .net to have Pulumi run commands such as direct kubectl commands? I need to modify an existing custom resource and it would be easy to just be able to run the kubectl command to patch it. I am unable to find a pulumi cmd provider so not sure if this is even possible today.
  • b

    better-rainbow-14549

    03/17/2020, 4:44 PM
    you could write a dynamic provider that calls out to kubectl, then you have control over what gets done for create / update / delete operations too
  • f

    fast-dinner-32080

    03/17/2020, 5:28 PM
    I started down that path until I found out that dynamic providers are not supported in .net.
  • f

    fast-dinner-32080

    03/17/2020, 6:13 PM
    Is there any options around this issue in dotnet? Running a command or being able to import/modify a kubernetes custom resource? If not then I will just have to do these steps manually for now.
  • f

    fast-dinner-32080

    03/17/2020, 8:03 PM
    So i found this project https://github.com/brandonkal/pulumi-command which builds a command provider. I extended it to add dotnet support https://github.com/brandonkal/pulumi-command/pull/2 I am going to try using this for running the commands.
  • t

    tall-librarian-49374

    03/17/2020, 8:12 PM
    Why not adopt those existing resources into your Pulumi stack?
    f
    g
    • 3
    • 5
  • f

    fast-dinner-32080

    03/18/2020, 1:47 AM
    How do I set a ComponentResource Args to be required or do conditional checks on the values? I found that I can add the [Input()] attribute on the ResourceArgs of my component but that doesn't seem to do anything. If I don't provide a value it just ends up throwing an error at the resource that was needing the properties value.
    t
    • 2
    • 12
  • p

    powerful-football-81694

    03/20/2020, 12:37 PM
    Hi folks - what’s the recommended approach for debugging a .NET based Pulumi program? I assume there is some way to attach the VS debugger? Can I configure VS to start my program through Pulumi instead of starting it directly as an .exe, and if so, can anyone tell me the steps for doing so?
    t
    • 2
    • 2
  • f

    flat-mouse-20634

    03/22/2020, 4:03 AM
    Just had a crack at writing unit tests with the dotnet SDK and it is pretty awesome so far
    t
    • 2
    • 7
  • f

    fast-dinner-32080

    03/25/2020, 8:27 PM
    @tall-librarian-49374 Just ran into this bug with the kubernetes helm resource. https://github.com/pulumi/pulumi-kubernetes/issues/1046 Looks like the chart I am using extracts more than one directory which breaks the expectation that there is a single directory extracted on the helm fetch.
    t
    • 2
    • 2
  • f

    fancy-nightfall-60106

    03/30/2020, 8:17 AM
    Is it possible to run the pulumi cli on prebuilt .net code? "pulumi preview" and "pulumi up" seems to try to build the .csproj and now that I already have built and published the app it exits with:
    MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
    t
    • 2
    • 1
  • s

    sparse-piano-12937

    03/30/2020, 2:16 PM
    What is the status of the .net core api? Ive not heard much about it? Does it work with kubernetes etc?
    t
    • 2
    • 3
  • g

    great-postman-59271

    03/31/2020, 6:30 AM
    i've run into troubles doing something which must be completely trivial. Im making an AWS stack where i need to get the AWS Account Number of the current account, so something i could get by GetCallerIdentity. I can see this object exists in the SDK, but somehow i cant find i locally. Maybe i am trying to invoke it in a wrong fashion. So can anyone tell me how to Get Caller Identity correctly? 🙂 Using latest pulumi version
    t
    • 2
    • 2
  • f

    fast-dinner-32080

    03/31/2020, 7:03 PM
    I am having an issue with the DependsOn property on resources. I have a helm release that needs to occur before another resource can run. I have that resource depend on the helm release but it still always runs first which errors. Here is the code snippet. I am trying to understand if I am just doing it incorrectly or if this is a bug. So after the helm release the bootstrap resource should run now that rancher has been installed.
    var rancherHelmRelease = new Pulumi.Kubernetes.Helm.V3.Chart("rancher",
        new ChartArgs
        {
            Repo = "rancher-latest",
            Chart = "rancher",
            Version = config.Require("rancherVersion"),
            Namespace = cattleSystemNamespace.Metadata.Apply(x => x.Name),
            Values =
            {
                {"ingress.tls.source", "external"},
                {"tls", "external"},
                {"hostname", config.Require("rancherHost")},
                {"debug", config.RequireBoolean("rancherEnableDebug")},
                {"replicas", 3}
            }
        },
        new ComponentResourceOptions
        {
            Provider = kubernetesProvider,
            DependsOn =
            {
                rkeCluster,
                cattleSystemNamespace
            }
        });
    
    var rancherBootstrapProvider = new Pulumi.Rancher2.Provider("rancherBootstrapProvider",
        new Pulumi.Rancher2.ProviderArgs
        {
            ApiUrl = $"https://{config.Require("rancherHost")}",
            Bootstrap = true
        });
    
    // Initially setup server the first time creating admin account
    var rancherBootstrap = new Pulumi.Rancher2.Bootstrap("rancherBootstrap",
        new BootstrapArgs
        {
            Password = commonEnvSecret.Data.Apply(x => (string)x["rancher_server_admin_password"]),
            Telemetry = false
        },
        new CustomResourceOptions
        {
            Provider = rancherBootstrapProvider,
            DependsOn =
            {
                rancherHelmRelease
            }
        });
    t
    • 2
    • 4
  • b

    bored-activity-40468

    04/05/2020, 4:25 PM
    Does assumeRoleARN in Pulimi.yaml do anything? In debug I'm seeing the message,
    debug: No assume_role block read from configuration
    • 1
    • 1
  • p

    plain-tiger-79744

    04/06/2020, 10:29 AM
    Hi! Any recommendations on how/where to run things like EF Core database migrations using Pulumi? How would I retrieve connection strings and pass them over to another CLI tool?
    t
    b
    f
    • 4
    • 3
  • m

    mysterious-australia-14256

    04/06/2020, 8:54 PM
    How can I extract an Azure resources ID as a string? I have created a new AppService which has an ID property in the form of Output<string>. I want to use the ID of this AppService object to call the Pulumi.Azure.Monitoring.Invokes.GetDiagnosticCategories method in order to get a list of the supported monitoring categories so I can enable them all. To call GetDiagnosticCategories I need to pass in a GetDiagnosticCategoriesArgs which has a single property of ResourceId as a string (not Output<string> so if I try and pass in myAppService.ID it errors. Is there a way to achieve this?
    t
    • 2
    • 5
  • p

    plain-tiger-79744

    04/08/2020, 7:26 AM
    Why is it not possible to use my own POCO when using [Output] Output<T> ? It seems like you have some marker attributes, but those also don't help. Is a dictionary the only way to produce complex outputs? See also: https://github.com/pulumi/pulumi/issues/3690
    t
    • 2
    • 9
  • b

    brainy-nest-61978

    04/10/2020, 9:28 AM
    Hi! I am new to Pulumi and wondering am I missing something. It seems to take forever to run. I've now switched to running locally (logged out from Pulumi) and its not much different. Have run through some examples and currently playing with https://github.com/pulumi/examples/tree/master/azure-cs-aks-private-container-registry it is creating the resources in Azure with some errors that I am working through. but the turn around is frustrating. The preview can take 10 minutes or longer and then it slow to deploy to Azure also. Have checked internet connection and pc performance (Win 10), which all seem ok. I am trying to run a trace to see if that provides some detail. Any tips to improve?
    t
    • 2
    • 1
  • b

    brainy-nest-61978

    04/10/2020, 11:07 AM
    Whats the best way to view trace files on win 10? I've run traces as follows:
    pulumi up  --tracing=file:./up.trace
    and I've installed appdash to try to view them. but not sure how to use it. I've also tried running the appdash listener
    appdash serve
    so that I can send try to send the trace directly there (if thats possible), but it exits immediately with the following message :
    appdash collector listening on :7701 (plaintext TCP (no security))
    appdash HTTP server listening on :7700
    rename C:\Users\MICHAE~1.GUI\AppData\Local\Temp\appdash785531047 /tmp/appdash.gob: The system cannot find the path specified.
    t
    w
    • 3
    • 9
  • c

    cold-caravan-83486

    04/14/2020, 2:17 PM
    Anyone else seeing
    System.MissingMethodException: Method not found: 'Pulumi.IDeployment Pulumi.Deployment.get_Instance()'.
           at Pulumi.Azure.Core.GetSubscription.InvokeAsync(GetSubscriptionArgs args, InvokeOptions options)
    ?
    b
    t
    • 3
    • 20
  • p

    plain-tiger-79744

    04/17/2020, 11:54 AM
    Is it already possible to use an executable (dll,exe) in order to start pulumi? When can we use that feature? It would also be nice if I could add a nuget package like Pulumi.Runner and I can just execute my compiled project instead of using the CLI.
    b
    t
    f
    • 4
    • 5
  • f

    fancy-nightfall-60106

    04/23/2020, 8:32 AM
    How do I reference other stacks from "MyStack"? I want to get output from other stacks and use them as "variables", similar to
    var p = new Config().Require("parameter")
    b
    • 2
    • 2
  • w

    wonderful-football-26193

    04/24/2020, 9:58 AM
    Hi there! Want to deploy a
    ConfigFile
    into an Azure K8s. How do I get the
    ProviderResource
    from my
    Pulumi.Azure.ContainerService.KubernetesCluster
    instance to use it in
    ComponentResourceOptions.Provider
    of
    ConfigFile()
    ?
    t
    • 2
    • 2
  • m

    mysterious-australia-14256

    04/25/2020, 3:24 PM
    Hi All, I'm hoping someone can help me clean up my code. I'm wondering what the "correct" way to use StackReference to read in an Output from another project is? I am trying to read in the name of an Azure Resource Group and then use it in a GetResourceGroup command. At the moment if I read it in like this...
    var rgName = proj.RequireObject("ResourceGroupName").Apply(name => name.ToString());
    rgName ends up being of type Output<string?> i.e. it can be null because this is what ToString returns even though I'm using RequireObject When I then cone to use rgName in my code to get the resource group
    var rg = rgName.Apply(rgName => GetResourceGroup.InvokeAsyn(new GetResourceGroupArgs { Name = rgName } ));
    I get a warning about a possible null reference assignment as I am passing in Output<string?>? rather than Output<string> which is what GetResourceGroupArgs wants for Name. The code works and I can hide the error using ! (i.e. { Name = rgName! }) but is there a cleaner way to do this i.e. get the value from RequireObject as Output<string> in the first place rather than Output<string?>
    t
    • 2
    • 4
  • n

    nutritious-judge-27316

    04/30/2020, 1:20 PM
    Getting the Stack Name and Project Name in C#? I am having troubles finding it in docs
    t
    b
    • 3
    • 3
  • b

    best-receptionist-98400

    05/05/2020, 1:14 PM
    Hello, Everyone! I am trying to go through the C# AWS Ec2 Tutorial and am not sure if I am doing something wrong, or if the tutorial needed some updates? I was not able to get through it the way it was, I proposed some changes here to step 2, which is what I ended up doing to get it to work but maybe I was going through it the wrong way/missing something? https://github.com/pulumi/docs/pull/3208
    t
    f
    • 3
    • 4
Powered by Linen
Title
b

best-receptionist-98400

05/05/2020, 1:14 PM
Hello, Everyone! I am trying to go through the C# AWS Ec2 Tutorial and am not sure if I am doing something wrong, or if the tutorial needed some updates? I was not able to get through it the way it was, I proposed some changes here to step 2, which is what I ended up doing to get it to work but maybe I was going through it the wrong way/missing something? https://github.com/pulumi/docs/pull/3208
t

tall-librarian-49374

05/06/2020, 7:07 PM
Honestly, our tutorials need some love. I believe @faint-table-42725 is tracking this work.
b

best-receptionist-98400

05/06/2020, 8:28 PM
Right. My only concern with going through it is if C# has the same level of support that the other languages do. I believe Pulumi started out with JavaScript and TypeScript as the two options and C# was added later.
f

faint-table-42725

05/06/2020, 8:54 PM
Sadly, it’s not just C#, but our tutorials in general need some examination. We don’t have a ‘preferred’ language over any other and support them all. Currently, there are some instances where there are differences between languages (e.g. dynamic provisioner support) and we’re working hard to close those gaps.
b

best-receptionist-98400

05/06/2020, 9:27 PM
Gotchya - thanks for the update @faint-table-42725! 🙂
View count: 1