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
general
  • r

    rough-arm-38844

    03/10/2021, 9:48 AM
    hi, sorry this is probably such a dumb question.. we're just learning and getting started with IaC and Pulumi - so bear with! How do you tell Pulumi to execute some PowerShell script on the creation of, say, a new EC2 instance on AWS?
    f
    m
    p
    • 4
    • 8
  • w

    worried-knife-31967

    03/10/2021, 12:21 PM
    Has anyone played with getting good outputs from github actions?
    ➕ 1
    b
    c
    e
    • 4
    • 23
  • h

    helpful-van-82564

    03/10/2021, 2:23 PM
    I'm importing a GKE cluster with no default nodepool but with three defined nodepools, I was going to just import the cluster first and deal with the nodepools later since they are seperate objects, however importing the cluster also imports the nodepools into the stack - but doesnt actually generate code for the nodepools. I did this just monday (on the same cluster!) and it didn't import the nodepools then. Am I missing something?
  • m

    miniature-leather-70472

    03/10/2021, 3:52 PM
    If we wanted to separate Pulumi resources over multiple files, to aid in organisation and readability, would the only way to do this be through creating Component Resources inside the project and then calling those, or is there an easier way? This is in C# specifically. I'm thinking of how in Terraform I could create resources in different tf files in the same folder and Terraform would merge them togther
    n
    b
    +3
    • 6
    • 10
  • w

    worried-knife-31967

    03/10/2021, 3:56 PM
    I've played with calling methods on static classes for that... seems to work quite well
  • w

    worried-knife-31967

    03/10/2021, 4:16 PM
    Thoughts on Unit Testing in C#, when you have a resource that calls out to a HttpEndpoint using HttpClient? I'm currently thinking that I need "inject" something somehow so I can override the handler in the HttpClient... but I'm not sure... would love some thoughts.
    b
    t
    • 3
    • 56
  • b

    big-apartment-95438

    03/10/2021, 4:48 PM
    Hi everyone! How can I get a service created by helm? I want in the end to access the loadbalancer that service created 🙂 Thanks Referring to this module: https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/
    • 1
    • 1
  • b

    big-potato-91793

    03/10/2021, 9:08 PM
    Is there a tutorial to create a pulumi provider?
    c
    r
    b
    • 4
    • 9
  • s

    stocky-france-59380

    03/11/2021, 1:29 AM
    given this
    export const ymml = new k8s.yaml.ConfigFile('yamlfile', {
      file: 'foo.yaml',
    });
    and a test like this
    describe('yaml', function () {
        it('reads', function (done) {
          pulumi.all([infra.ymml.urn, infra.ymml]).apply(([urn, thefile]) => {
            console.log(urn);
            var val = thefile.getResource('v1/Service', 'my-service');
            console.log(val);
            done();
          });
        });
      });
    in a unit test is there away to see the output of the file? At the moment I get this
    yaml
    urn:pulumi:stack::project::kubernetes:yaml:ConfigFile::yamlfile
    OutputImpl {
      __pulumiOutput: true,
      resources: [Function (anonymous)],
      allResources: [Function (anonymous)],
      isKnown: Promise { <pending> },
      isSecret: Promise { <pending> },
      promise: [Function (anonymous)],
      toString: [Function (anonymous)],
      toJSON: [Function (anonymous)]
    }
          ✓ reads
    (node:58505) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:58505) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)
    I am trying to understand an error that looks like this when running that deploys a blackbox exporter. I can apply it using
    kubectl apply
    but it's failing as below in pulumi
    Error: invocation of kubernetes:yaml:decode returned an error: error converting YAML to JSON: yaml control characters are not allowed
    l
    • 2
    • 16
  • w

    worried-knife-31967

    03/11/2021, 11:24 AM
    Unit testing against properties in an Apply with C#.... How do you do that? Assert's throw and exception, which is how the frameworks pick it up, but Exceptions in an Apply are swallowed. How do you get access to the value "outside" of the apply? or should I look at some kind of extension to extract the value outside the method and assert there?
    t
    l
    b
    • 4
    • 15
  • b

    bulky-continent-73012

    03/11/2021, 11:28 AM
    Hi, At the moment i am using Pulumi with IAM user to manage my AWS infrastructure. In creating the EKS cluster it works just fine. The cluster is created and i have all the necessary resources. In Deletion, on the other hand, i receive error. From the IAM user side it says I do not have permission to perform this action which is of course true because the IAM user should not be able to delete every resource and delete the resources which only he/she has created as pic 1: From the Admin side, however it says that this resource can not be found as pic 2: How can i resolve this issue? any suggestions would be appreciated. somewhere in creating or deleting the cluster pulumi is effecting the process and i don not know why and how?
    m
    • 2
    • 5
  • e

    early-intern-90238

    03/11/2021, 2:29 PM
    Anyone using Pulumi with Nrwl monorepo?
  • w

    worried-knife-31967

    03/11/2021, 2:53 PM
    Anyone know the structure i'd need to mock to get a stackreference to return outputs? specifically in c#
    b
    • 2
    • 8
  • h

    helpful-van-82564

    03/11/2021, 3:44 PM
    I have an imported GKE cluster where seemingly minMasterVersion isnt set. If I set this to the version that's currently running, will this have any impact on the running cluster?
    g
    • 2
    • 1
  • c

    creamy-iron-5034

    03/11/2021, 4:22 PM
    Hey 🙂 I am looking at deploying a Nextjs application as a Google Cloud Run Service. https://next-auth.js.org/ I am using this for authentication, and one of the environment variables that is needed is
    NEXTAUTH_URL
    which should be the URL used on deployed instance, however, for my staging environment this is dynamic and not known e.g.
    const app = new gcp.cloudrun.Service(`app`, {
      location,
      template: {
        spec: {
          containers: [
            {
              // Use pushed image from CI (assume local if not)
              image: pulumi.interpolate`<http://gcr.io/${gcp.config.project}/app:${prNumber}|gcr.io/${gcp.config.project}/app:${prNumber}>`,
              ports: [{ containerPort: 3000 }],
              resources: {
                limits: {
                  memory: `1Gi`,
                },
              },
            },
          ],
          containerConcurrency: 50,
        },
      },
      metadata: {
        annotations: {
          "<http://run.googleapis.com/cloudsql-instances|run.googleapis.com/cloudsql-instances>": pgInstance.connectionName,
        },
      },
    });
    e.g. yields https://some-chars.a.run.app and is available as
    // Export the URL
    export const appUrl = app.statuses[0].url;
    But I am not sure you can include setting this back to the cloud run env variable?
    a
    • 2
    • 3
  • c

    creamy-iron-5034

    03/11/2021, 4:25 PM
    app.template.get()?.spec.containers[0].envs?.push({
      name: "NEXTAUTH_URL",
      value: app.statuses[0].url.get(),
    });
    Was thinking I might be able to do something like this, but obviously
    get()
    is documented that it will throw if ran during deployment
  • b

    big-apartment-95438

    03/11/2021, 5:16 PM
    When getting an AWS LoadBalancer created by a helm chart all I have found is the following: https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/service/#loadbalanceringress But I am attempting to get the ARN of the LoadBalancer and not the hostname or ip :S So I tried to do the following:
    const currentLoadBalancer = pulumi.all([service.status.loadBalancer.ingress[0].hostname]).apply(([hostname]) => {
        return aws.lb.getLoadBalancer({
            name: hostname.split("-")[0] // Get the name part from the hostname (before the first hyphen)
        });
    });
    but hostname is undefined 😞 Is there a better way to find a load balancer created from a helm chart?
    • 1
    • 2
  • s

    straight-cartoon-24485

    03/12/2021, 1:31 AM
    Am I translating the helm
    --set-file key=myfile
    install requirement correctly into pulumi speak?
    const linkerdName = 'mesh'
    const linkerdNamespaceName = 'linkerd'
    const linkerdNamespace = new k8s.core.v1.Namespace(linkerdNamespaceName, {
      metadata: { name: linkerdNamespaceName, labels: { name: linkerdName } }
    })
    
    let aYearFromNow = new Date()
    aYearFromNow.setFullYear(aYearFromNow.getFullYear() + 1)
    
    const identityTrustAnchorsPEM: string = fs.readFileSync('ca/ca.crt', { encoding: 'utf8', flag: 'r' }).toString().trim()
    const crtPEM: string = fs.readFileSync('ca/issuer.crt', { encoding: 'utf8', flag: 'r' }).toString().trim()
    const keyPEM: string = fs.readFileSync('ca/issuer.key', { encoding: 'utf8', flag: 'r' }).toString().trim()
    
    const linkerd = new k8s.helm.v3.Chart(linkerdName, {
      repo: "linkerd",
      chart: "linkerd2",
      namespace: linkerdNamespace.metadata.name, values: {
        global: {
          identityTrustAnchorsPEM
        },
        identity: {
          issuer: {
            tls: { crtPEM, keyPEM },
            crtExpiry: aYearFromNow.toDateString()
          }
        }
      }
    })
    On https://linkerd.io/2/tasks/install-helm/ they're asking for:
    helm install linkerd2 \
      --set-file global.identityTrustAnchorsPEM=ca.crt \
      --set-file identity.issuer.tls.crtPEM=issuer.crt \
      --set-file identity.issuer.tls.keyPEM=issuer.key \
      --set identity.issuer.crtExpiry=$exp \
      linkerd/linkerd2
    I'm getting this error from within the helm chart on
    pulumi up
    error: Running program '/home/paul/code/deposition/infra/haze' failed with an unhandled exception:
        Error: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to create chart from template: execution error at (linkerd2/templates/sp-validator.yaml:129:12): Please provide the identity trust anchors
    • 1
    • 1
  • s

    salmon-australia-89174

    03/12/2021, 8:44 AM
    Hi guys Do you know, is there a Pulumi integration for other european cloud providers like https://www.exoscale.com (I saw Hetzner) or do you have plans to integrate more of them? Where is the correct point to ask for such integrations etc.? 🙂 I ask, because often there are customer requirements to use EU/CH providers because of law reasons. Thank you.
    b
    • 2
    • 2
  • m

    mammoth-caravan-51104

    03/12/2021, 11:07 AM
    Hello, I'm experiencing very slow
    pulumi up
    execution times. Preview phase and update phase are excruciately slow. stack has ~200 resources. is there a way to speed it up?
    b
    b
    • 3
    • 22
  • s

    steep-beard-51215

    03/12/2021, 2:35 PM
    Hello! I have a panic message that has been driving me crazy:
    panic: fatal: An assertion has failed
    
    goroutine 51 [running]:
    <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/sdk/go/common/util/contract/failfast.go:23
    <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assert(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assert(...)>
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/sdk/go/common/util/contract/assert.go:26
    <http://github.com/pulumi/pulumi/pkg/v2/engine.printPropertyValue|github.com/pulumi/pulumi/pkg/v2/engine.printPropertyValue>(0xc001d10570, 0x5718b60, 0xc0022a2c30, 0x1, 0x1, 0x587150a, 0x6, 0xc001d10001)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:511 +0x1485
    <http://github.com/pulumi/pulumi/pkg/v2/engine.printAdd(0xc001d10570|github.com/pulumi/pulumi/pkg/v2/engine.printAdd(0xc001d10570>, 0x5718b60, 0xc0022a2c30, 0xc001b6f828, 0xc001d18101, 0x1, 0xc001b6f800)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:730 +0x9f
    <http://github.com/pulumi/pulumi/pkg/v2/engine.printObjectPropertyDiff(0xc001d10570|github.com/pulumi/pulumi/pkg/v2/engine.printObjectPropertyDiff(0xc001d10570>, 0xc000a90ea0, 0x8, 0x22, 0xc001d10480, 0xc001d104b0, 0xc001d104e0, 0xc001d10510, 0xc001d12b01, 0x1, ...)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:600 +0x130
    <http://github.com/pulumi/pulumi/pkg/v2/engine.GetResourceOutputsPropertiesString(0x586e7bf|github.com/pulumi/pulumi/pkg/v2/engine.GetResourceOutputsPropertiesString(0x586e7bf>, 0x4, 0xc001603d10, 0x41, 0xc0007e0720, 0x13, 0xc0019c0990, 0xc0019c0a20, 0xc0019c0ab0, 0x0, ...)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:405 +0x3e8
    <http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).printOutputs(0xc000a00780)|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).printOutputs(0xc000a00780)>
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:901 +0x146
    <http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEndSteps(0xc000a00780)|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEndSteps(0xc000a00780)>
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:739 +0x32e
    <http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEvents(0xc000a00780|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEvents(0xc000a00780>, 0xc0001501e0, 0xc0015a46c0)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:1199 +0x11f
    <http://github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents.func1(0xc000a00780|github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents.func1(0xc000a00780>, 0xc0001501e0, 0xc0015a46c0, 0xc000e7e300)
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:343 +0x3f
    created by <http://github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents|github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents>
    	/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:342 +0x529
    Has anybody seen anything like this before? I checked https://pulumi-community.slack.com/archives/C84L4E3N1/p1614118830150300 but it doesn’t seem related. I am not using Apply anywhere in the code
    • 1
    • 2
  • c

    chilly-analyst-14900

    03/12/2021, 3:02 PM
    Azure Q: How would one best handle a move all resources to a new location (without data loss)? The Azure portal has a feature of "Move resource group", but I guess you would want the Pulumi config match this new change.
    • 1
    • 1
  • l

    lemon-machine-35564

    03/12/2021, 3:51 PM
    Is there anyone out there who DOESN’T deal with
    Type 'Output<string>' is not assignable to type 'string'.
    every single day? 😄
    🤣 2
    d
    a
    r
    • 4
    • 7
  • h

    helpful-van-82564

    03/12/2021, 5:04 PM
    Is it possible to import kubernetes objects? For example I'm rolling clusters and have pulumi also create a namespace and two secrets for argocd, however on currently running clusters I'd need to import these..
    g
    • 2
    • 1
  • a

    adamant-translator-31969

    03/12/2021, 5:21 PM
    Hi! I want to restore stack backup from buckup folder, but i receive this error
    error: could not deserialize deployment: unexpected end of JSON input
    when I run
    pulumi stack import --file <stack>.<number>.json
  • b

    breezy-apartment-46543

    03/12/2021, 7:29 PM
    Is there any way to speed up pulumi up and pulumi destroy for an individual use account? It seems especially slow for Azure
  • w

    worried-knife-31967

    03/12/2021, 7:43 PM
    Which part is slow? I imagine the interaction. With the pulumi backend isn't the slow thing.
  • b

    breezy-apartment-46543

    03/12/2021, 7:46 PM
    Well it takes a good while until all resources are created and deployed
  • b

    breezy-apartment-46543

    03/12/2021, 7:47 PM
    From running pulumi up until the outputs are printed
  • l

    loud-battery-37784

    03/12/2021, 7:52 PM
    Any more specifics? Some resources just take a long time to provision on the provider and it has nothing to do to Pulumi. Are you comparing the time it takes against something else?
Powered by Linen
Title
l

loud-battery-37784

03/12/2021, 7:52 PM
Any more specifics? Some resources just take a long time to provision on the provider and it has nothing to do to Pulumi. Are you comparing the time it takes against something else?
View count: 1