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
  • a

    adventurous-garage-59192

    09/08/2020, 2:50 AM
    Is this the recommend way to combine a stack output with an invoke? Stack outputs are still a tad clunky by only outputting as
    object
    and invoke args don't accept
    Output<T>
    .
    var globalKv = Output
                .Tuple(cloudInfra.RequireOutput("").Apply(x => (string) x), cloudInfra.RequireOutput("").Apply(x => (string) x))
                .Apply(tuple => 
                        GetKeyVault.InvokeAsync(new GetKeyVaultArgs
                            {
                                Name = tuple.Item1,
                                ResourceGroupName = tuple.Item2
                            }
                    ));
    t
    • 2
    • 1
  • f

    fresh-lifeguard-12682

    09/09/2020, 4:55 PM
    Welcome @brainy-sandwich-22143
    👍 1
  • f

    fresh-lifeguard-12682

    09/09/2020, 5:00 PM
    welcome @busy-dress-78329
    🙌 1
  • w

    worried-city-86458

    09/10/2020, 8:28 PM
    I've got some helpers to create aws iam roles which I've switched from using c# string interpolation tricks to using
    Pulumi.Aws.Iam.GetPolicyDocument
    but this has two side effects... •
    Sid
    is being passed as an empty string despite being a `string?`; I would expect not specifying this to omit the value • I'm now working with an output which causes problems with preview not propagating the value; can this be handled better?
    • 1
    • 4
  • a

    adamant-advantage-95831

    09/11/2020, 3:42 PM
    I've somehow managed to make my pulumi preview / up not work. It just hangs ... but I'm not sure what I managed to do. I've tried spinning up another test project and that works just fine. Any ideas?
    • 1
    • 2
  • w

    worried-city-86458

    09/11/2020, 7:25 PM
    Playing with the binary option ... can we please make this a pulumi cli option too? I want to use source during development (on Windows) but use binaries during deployment (on Linux, in a container). Also, I noticed it only works with the dll, despite generating an exe. I’ll probably want to switch to a single file exe when dotnet 5.0 lands...
    👍 1
    t
    • 2
    • 2
  • f

    fresh-lifeguard-12682

    09/13/2020, 3:21 AM
    How can I access an existing resources on Azure? For example I want to be able to deploy an App Service and get an existing connection string from Azure Service Bus and set it in the App Service Configuration
    t
    • 2
    • 1
  • f

    fierce-memory-34976

    09/14/2020, 9:35 AM
    Hi guys, just starting with Pulumi and trying to learn something, however the documentation wasn't really useful so far. What I need is to deploy an ASP.NET Core Web API project to GCP in GKE (kubernetes). I already have a docker image of the service in GCP but I'm unsure on how to deploy the app and set the proper ingress service through Pulumi. Can anyone help or does anyone know a guide/tutorial where I could read more on this?
    t
    • 2
    • 2
  • w

    worried-city-86458

    09/15/2020, 3:26 AM
    I'm having a play with .NET 5.0 RC1 and C# 9.0... I think the improved target typing will help reduce ceremony:
    var cluster = new Cluster($"{prefix}-cluster",
        new ClusterArgs
        {
            RoleArn = clusterRole.Arn,
            Version = config.KubeVersion,
            VpcConfig = new ClusterVpcConfigArgs { SubnetIds = subnetIds }
        },
        new CustomResourceOptions { DependsOn = clusterPolicies });
    becomes:
    var cluster = new Cluster($"{prefix}-cluster",
        new()
        {
            RoleArn = clusterRole.Arn,
            Version = config.KubeVersion,
            VpcConfig = new ClusterVpcConfigArgs { SubnetIds = subnetIds }
        },
        new() { DependsOn = clusterPolicies });
    But there is a problem that
    Input<T>
    types don't play nice. For example, trying to remove
    ClusterVpcConfigArgs
    above causes a compiler error:
  • w

    worried-city-86458

    09/15/2020, 3:35 AM
    It would help even more with Kubernetes types used to express yaml equivalents... just need to improve the Pulumi C# types. What do you reckon, @tall-librarian-49374?
    t
    • 2
    • 10
  • w

    worried-city-86458

    09/15/2020, 5:46 AM
    FYI: I hit an issue with .NET 5.0 RC1 and gRPC (used by Pulumi) on Ubuntu 20.04: https://github.com/grpc/grpc/issues/24153
  • f

    fierce-memory-34976

    09/17/2020, 12:23 PM
    Hi, am I using something wrong?
    Retry #5; creation failed: no matches for kind "Ingress" in version "<http://networking.k8s.io/v1|networking.k8s.io/v1>
    var ingress = new Ingress("test-ingress", new Pulumi.Kubernetes.Types.Inputs.Networking.V1.IngressArgs
    {
    Metadata = new ObjectMetaArgs
    {
    Annotations = new InputMap<string>
    {
    {"<http://kubernetes.io/ingress.global-static-ip-name|kubernetes.io/ingress.global-static-ip-name>", "ip-dev" },
    //{"<http://networking.gke.io/managed-certificates|networking.gke.io/managed-certificates>", "" }
    }
    },
    Spec = new Pulumi.Kubernetes.Types.Inputs.Networking.V1.IngressSpecArgs
    {
    DefaultBackend = new Pulumi.Kubernetes.Types.Inputs.Networking.V1.IngressBackendArgs
    {
    Service = new Pulumi.Kubernetes.Types.Inputs.Networking.V1.IngressServiceBackendArgs
    {
    Name = "test-service-nodeportapi",
    Port = new Pulumi.Kubernetes.Types.Inputs.Networking.V1.ServiceBackendPortArgs
    {
    Number = 80
    }
    }
    }
    }
    },
    new CustomResourceOptions
    {
    Provider = provider
    });
    I am working with GCP/GKE
    w
    c
    • 3
    • 6
  • f

    fierce-memory-34976

    09/21/2020, 10:11 AM
    Is it not possible to use Pulumi.Kubernetes.Networking.V1.Ingress with GCP?
    error: creation of resource default/test-ingress-2ap83ye0 failed because the Kubernetes API server reported
    that the apiVersion for this resource does not exist. Verify that any required CRDs have been created: no matches for ki
    nd "Ingress" in version "<http://networking.k8s.io/v1|networking.k8s.io/v1>"
  • f

    fierce-memory-34976

    09/21/2020, 11:19 AM
    also, can anyone help me with the following:
    apiVersion: <http://cloud.google.com/v1|cloud.google.com/v1>
    kind: BackendConfig
    metadata:
      name: my-backendconfig
    spec:
      healthCheck:
        checkIntervalSec: interval
        timeoutSec: timeout
        healthyThreshold: health-threshold
        unhealthyThreshold: unhealthy-threshold
        type: protocol
        requestPath: path
        port: port
    Is it possible to create such resource with pulumi C# and if yes, what's it's name and how do i tell the ingress resource to use this config? i need this to customize the health check endpoint for my ingress configuration
    • 1
    • 1
  • f

    fierce-memory-34976

    09/23/2020, 11:02 AM
    env: [
                                {
                                    name: "DD_KUBERNETES_KUBELET_HOST",
                                    valueFrom: {
                                        fieldRef: {
                                            fieldPath: "status.hostIP",
                                        },
                                    },
                                },
    Is it possible to use "valueFrom" and how in Pulumi in C#?
    t
    • 2
    • 2
  • f

    fierce-memory-34976

    09/23/2020, 1:06 PM
    is it possible to read the output variables from inside the code? eg. i run one stack, get some variables from it, run another stack? what i actually need is to run one stack.. then run some c# code, then run another stack
  • n

    nice-scientist-89715

    09/23/2020, 8:05 PM
    So I'm using the digital ocean dotnet package. It doesn't seem like I can pass in UserData, for a startup script, and was trying to determine why.
    g
    • 2
    • 1
  • g

    gorgeous-cpu-53034

    09/24/2020, 1:23 PM
    We are looking to Integrate Infrastructure as a code with Web Application . In our case we are using ASP.net core 3.1 mvc app which displays onprem inventory we want to spill up resource in Azure cloud provider using dynamic variable or inputs from data source and provision resources in Azure cloud. Is there why to integrate Pulum with web application
  • a

    able-rose-67471

    09/25/2020, 8:11 AM
    I currently have the default entry point:
    static _Task_<int> Main() => Deployment.RunAsync<_AppStack_>();
    The
    AppStack
    class is just one of the services for my applications supporting infrastructure. If I have other services, for example
    PaymentApiStack
    ,
    SmtpStack
    , etc; is it possible to have multiple stacks in one Pulumi program or would I have to create many programs to achieve this? Or am I misunderstanding the purpose of a Stacks?
    t
    w
    l
    • 4
    • 8
  • m

    miniature-leather-70472

    09/25/2020, 4:26 PM
    probably missing something obvious but how can I take an array in a stack config file and trun it into a C# array?
    c
    m
    • 3
    • 4
  • b

    bored-activity-40468

    09/25/2020, 9:15 PM
    In the docker provider, I noticed the process.Start() is executed before the process.Exited event is even registered, could that potentially cause problems.
    b
    • 2
    • 3
  • f

    fresh-lifeguard-12682

    10/02/2020, 8:01 PM
    Is there a c# version of this? https://www.pulumi.com/blog/hosting-a-static-website-on-azure-with-pulumi/#custom-domain-and-tls
    const customDomain = new CDNCustomDomainResource("cdn-custom-domain", {
        resourceGroupName: resourceGroup.name,
        // Ensure that there is a CNAME record for demo <http://pointing.pulumi.com|pointing.pulumi.com> to <http://demopulumi.azureedge.net|demopulumi.azureedge.net>.
        // You would do that in your domain registrar's portal.
        customDomainHostName: "<http://demo.pulumi.com|demo.pulumi.com>",
        profileName: cdn.name,
        endpointName: endpoint.name,
        // This will enable HTTPS through Azure's one-click automated certificate deployment.
        // The certificate is fully managed by Azure from provisioning to automatic renewal
        // at no additional cost to you.
        httpsEnabled: true,
    }, { parent: endpoint });
  • s

    sticky-jordan-27156

    10/06/2020, 8:33 PM
    I've updated my API Management stack to the next gen azure provider. Is there any way to use a constant for the
    "West Europe"
    in https://github.com/nojaf/apim/commit/7cb09a7f2b14c28a5b8e3655a5c7df7282a3a7d0#diff-c018afa905d693ab55e41476844fd5d0R24 for example.
    t
    • 2
    • 3
  • c

    chilly-hairdresser-56259

    10/08/2020, 6:47 PM
    Was curious if anyone has thoughts on below: - When creating a JsonElement of RDS Parameter Groups based off a/n list/array of configuration entires in Pulumi.ENV.yaml, upon updating or just running a dry preview causes an update to all the parameters in the RDS Parameter Group. Even in the config and loop everything goes in Alphabetical order it still states there are updates.
    Untitled
  • b

    bored-activity-40468

    10/12/2020, 6:14 PM
    @tall-librarian-49374 In this example, using AzureNextGen, https://gist.github.com/dbeattie71/5b67c25b06adb8bf143c171c0ff1d284 I would expect changing the vnet address space and the subnet address prefix to result in a replace for the nic but instead I'm seeing update. So when up runs, I get the error that the Code="InUseSubnetCannotBeDeleted" error. Am I doing something wrong? If that looks correct, I can submit a issue.
    t
    • 2
    • 7
  • f

    fresh-summer-65887

    10/14/2020, 8:14 PM
    🆘 I'm trying to emit a collection of
    Outputstring
    as a stack output and failing hard 😞. The error I get with this is:
    System.InvalidOperationException: [Output] Global.GlobalStack.UserPasswords contains invalid type Pulumi.Output`1[[System.String, System.Private.CoreLib, Version=4.0.0.0
    , Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]:
            The only generic types allowed are ImmutableArray... and ImmutableDictionarystring, ...`.
     at Pulumi.Serialization.Converter.CheckTargetType(String context, Type targetType, HashSet`1 seenTypes)
           at Pulumi.Serialization.Converter.CheckTargetType(String context, Type targetType, HashSet`1 seenTypes)
           at Pulumi.Serialization.OutputCompletionSource.InitializeOutputs(Resource resource)
           at Pulumi.Deployment.Pulumi.IDeploymentInternal.ReadOrRegisterResource(Resource resource, ResourceArgs args, ResourceOptions options)
           at Pulumi.Resource..ctor(String type, String name, Boolean custom, ResourceArgs args, ResourceOptions options)
           at Pulumi.ComponentResource..ctor(String type, String name, ComponentResourceOptions options)
           at Pulumi.Stack..ctor(StackOptions options)
           at Global.GlobalStack..ctor() in C:\dev\logicality\cloud-infra\aws\global\Global\GlobalStack.cs:line 13
    Untitled.txt
    t
    • 2
    • 5
  • w

    wet-noon-14291

    10/14/2020, 9:59 PM
    How do I access the current stack name from code? Is there something like
    Deployment.Stack.Name
    that would give me `Dev`/`Test`... depending on the name?
    w
    t
    • 3
    • 6
  • b

    bored-activity-40468

    10/17/2020, 3:37 PM
    Would that be the correct way to get the principalId from a azure nextgen scaleset? I'm trying to create a role assignment for a scaleset that has SystemAssigned set for Identity.
    Untitled
    g
    • 2
    • 6
  • r

    red-lighter-44012

    10/21/2020, 10:16 AM
    Is there a way to step through the Stack code and effectively - debug?
    l
    w
    • 3
    • 4
  • r

    red-lighter-44012

    10/21/2020, 2:15 PM
    Having some trouble printing Output<string> and similar values for debugging purposes, I guess the same would apply to using the actual output values in code. Apply() didnt help here, im obviously missing a critical piece of information / documentation. Any links welcome 😄
Powered by Linen
Title
r

red-lighter-44012

10/21/2020, 2:15 PM
Having some trouble printing Output<string> and similar values for debugging purposes, I guess the same would apply to using the actual output values in code. Apply() didnt help here, im obviously missing a critical piece of information / documentation. Any links welcome 😄
View count: 1