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
typescript
  • w

    worried-city-86458

    09/10/2019, 8:45 PM
    https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/cluster.ts#L894 https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L88 It would be nice if
    eks.Cluster
    also passes through
    keyName
    to
    NodeGroupOptions
    . (Currently it only passes
    nodePublicKey
    .) ... would probably be called
    nodeKeyName
    for consistency, and should be mutually exclusive with
    nodePublicKey
    .
    w
    • 2
    • 2
  • c

    crooked-jelly-50877

    09/11/2019, 8:42 PM
    Typescript noob question (feel free to tell me to RTFM): What is the canonical way to conditionally create a resource in pulumi? I have a module that does
    export const nginxControllerChart = new ingressController.NginxIngressController( nginxValues );
    g
    c
    • 3
    • 8
  • c

    crooked-jelly-50877

    09/11/2019, 8:43 PM
    I can’t wrap an
    export
    in a conditional (not legal typescript)
  • c

    crooked-jelly-50877

    09/11/2019, 8:46 PM
    (To be clear, I can create a config flag OK, I’m fuzzy on where to control the creation. That line above is from my ./ingress-controller.ts. Should I export a function from that module that does the create, instead of the const variable?)
  • c

    crooked-jelly-50877

    09/11/2019, 8:46 PM
    i.e. defer the call to my index.ts?
  • w

    worried-city-86458

    09/11/2019, 11:13 PM
    https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/index.ts
  • w

    worried-city-86458

    09/11/2019, 11:13 PM
    Is there any reason
    ServiceRole
    is not exported?
  • w

    worried-city-86458

    09/11/2019, 11:42 PM
    All of the eks examples have the same common
    iam.ts
    helper, e.g. https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/examples/nodegroup/iam.ts
  • w

    worried-city-86458

    09/11/2019, 11:44 PM
    My first thought is I don't want to have to copy the same boiler plate code; why can't I just use
    ServiceRole
    ctor? https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/servicerole.ts#L60
  • w

    worried-city-86458

    09/11/2019, 11:45 PM
    That combined with something that returns the minimum default policy arns would be nice
  • w

    worried-city-86458

    09/11/2019, 11:45 PM
    https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/examples/nodegroup/iam.ts#L4-L8
  • w

    white-balloon-205

    09/12/2019, 9:13 AM
    Good points on exposing more of the helpers here. Could you open an issue in the repo with the same points? Would love to add that.
    w
    • 2
    • 1
  • b

    big-nail-28315

    09/16/2019, 2:37 PM
    Is there a way to convert Output<string>[] to either a single Output<string> or Input<string>?
    t
    • 2
    • 3
  • c

    cool-kite-89497

    09/17/2019, 5:57 PM
    Hey all! Has anyone had luck setting up a
    launch.json
    that can be used to set up breakpoints in VS Code on Pulumi programs?
  • c

    cool-kite-89497

    09/17/2019, 6:00 PM
    Ah, I see https://github.com/pulumi/pulumi/issues/1372. nvm : P
  • w

    worried-city-86458

    09/17/2019, 6:40 PM
    const callerIdentity = aws.getCallerIdentity();
    const accountId = callerIdentity.accountId;
    Just came across this funk after wondering how to await a promise in
    index.ts
    . Looking through the source it looks like Pulumi handles this using a deasync library followed by "lifting" the promised object behind the scenes. Even the JS/TS devs here hadn't heard of deasync. Cool stuff!
    m
    • 2
    • 1
  • w

    worried-city-86458

    09/18/2019, 9:20 PM
    I'm new to JS/TS but it seems to me what is needed is "top-level await" support - I just want to await something in
    index.ts
    c
    w
    t
    • 4
    • 8
  • w

    worried-city-86458

    09/18/2019, 9:22 PM
    Pulumi is hiding the details with deasync and lift to make it work for now
  • r

    rhythmic-finland-36256

    09/30/2019, 3:34 PM
    When using the node runtime with TypeScript, is there some special handling concerning the TypeScript compiler flags (e.g.
    noImplicitAny
    ?) I’m using some third-party javascript library which doesn’t provide good type definitions and as I’m only using two methods, I went with a custom
    thelib.d.ts
    file containing
    declare module 'thelib';
    This works with
    noImplicitAny
    in my IDE and on the command line but fails when it is handed over to the pulumi runtime. Not sure if this a Pulumi issue as I would somehow also expect it to fail locally. (i added my d.ts file to the files array and the typeRoots in tsconfig)
    w
    • 2
    • 14
  • a

    acceptable-army-69872

    10/01/2019, 4:43 PM
    I'm trying to pull the route-table-id from a subnet , and I'm getting a
    Object is possibly 'undefined'.
    . I get it, it's possible for a route table not to be associated, we're type safe, cool. I tried a few things like
    let x: string | undefined
    but didn't get very far. what the google foo i need to figure this kind of thing out
    const allSubnets = vpc.privateSubnets.concat(vpc.publicSubnets)
    
    for (var sn of allSubnets) {
      var rtid = sn.routeTableAssociation.routeTableId;
    }
    • 1
    • 1
  • a

    acceptable-army-69872

    10/02/2019, 2:45 PM
    I'm trying to use a remote state reference, and keep getting a
    index.ts(39,35): error TS2345: Argument of type '{ peerVpcId: string; filters: ({ name: string; values: string[]; } | { name: string; values: Output<string>[]; })[]; }' is not assignable to parameter of type 'GetVpcPeeringConnectionArgs'.
    const peerId = remoteState.getOutput("peerId"); // export const peerId = VpcPeeringConnection.id
    
    let doVpcPeeringRoutes = true
    try {
      aws.ec2.getVpcPeeringConnection({
          peerVpcId: "vpc-XYZ",
          filters: [
            {
              name: "status-code",
              values: ["active"],
            },
            {
              name: "vpc-peering-connection-id",
              values: [ peerId.apply(x => `${x}`) ]
            }
          ],
      })
    }
    catch(x) {
      doVpcPeeringRoutes = false
    }
    • 1
    • 2
  • a

    acceptable-army-69872

    10/02/2019, 2:47 PM
    I thought doing the apply would unwrap/flatmap/whatever the typescript term is for it the Output<string> to a string, but it doesn't seem to.
  • a

    ambitious-helmet-24352

    10/02/2019, 3:08 PM
    hey peps have a question concerning GKE and private k8s clusters trying to implement the Use --no-enable-master-authorized-networks flag but I can’t seem to find it I get a reference to
    masterIpv4CidrBlock?:`
    ? any suggestions
  • g

    great-london-15787

    10/03/2019, 2:07 PM
    Hi guys✌️ Does anybody has used the custom plugin for Hetzner Cloud? (https://github.com/akoenig/pulumi-hcloud) I don't know how to install the plugin. Any hints?
  • a

    acoustic-noon-6208

    10/06/2019, 12:05 PM
    Hello, I still can't get my head around issues with getting ecr images (
    awsx.ecs.Image
    ) to be used with k8s deployments, however I narrow down issues to this:
    // generate and push ECR image
    const image = awsx.ecr.buildAndPushImage(apiRepoName, config.dockerContextPath, ...);
    How can I use that
    image
    in the k8s.apps.v1.Deployment container spec? It expects string value of path to the image published in some registry and all samples I can found in Pulumi just use some 'nginx' image, not custom build image like above with
    buildAndPushImage
    method, which returns
    awsx.ecs.Image
    type object. It's also very confusing how to get any information from
    image
    object above, e.g. say registry path or even how to "await" such image to be built... (assuming I somehow can interpolate path to use it later). Totally stuck, please HELP 🙂 (more details in https://pulumi-community.slack.com/archives/C84L4E3N1/p1569874384140300)
    g
    • 2
    • 8
  • a

    acoustic-noon-6208

    10/06/2019, 12:08 PM
    P.S. I can use that
    image
    easy with ECS Fargate, only got issues to use it with k8s 😞 P.P.S if in short, summary of question above: "how to get
    Input<string>
    from
    awsx.ecs.Image
    object to be used in the k8s deployments"
  • a

    alert-france-93241

    10/08/2019, 7:02 AM
    Hey all, I am trying to create and attach an EBS volume to an EC2 instance, how do I detach the volume before deleting and reattach the image after every update?
  • a

    alert-france-93241

    10/08/2019, 7:03 AM
    Any help would be much appreciated.
  • s

    stocky-spoon-28903

    10/08/2019, 8:08 AM
    Hi @alert-france-93241, can you confirm what you mean by image here?
  • a

    alert-france-93241

    10/08/2019, 8:15 AM
    the EBS volume.
Powered by Linen
Title
a

alert-france-93241

10/08/2019, 8:15 AM
the EBS volume.
View count: 2