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-painting-67291

    08/24/2020, 9:26 PM
    It seems like such a common thing to do, that I was hoping that there was a standard template/function/whatever to instruct the stack to use (but don't own) a resource if it exists, otherwise create and own it.
    h
    • 2
    • 2
  • b

    busy-magazine-48939

    08/25/2020, 4:03 AM
    Is there a way to decrypt secrets masked with “_additionalSecretOutputs” ?_
    l
    c
    • 3
    • 4
  • n

    nice-portugal-52925

    08/26/2020, 10:41 PM
    Has anyone had any luck uploading a docker image to
    gcp container registry
    ? I keep running into this issue:
    error: Error: ' docker login' failed with exit code 1
        
            at /Documents/work/infra/node_modules/@pulumi/docker.ts:583:15
            at Generator.next (<anonymous>)
            at fulfilled (/Documents/work/infra/node_modules/@pulumi/docker/docker.js:18:58)
            at processTicksAndRejections (internal/process/task_queues.js:86:5)
     
        error: Error response from daemon: login attempt to <https://www.googleapis.com/v2/> failed with status: 404 Not Found
  • n

    nice-portugal-52925

    08/26/2020, 10:43 PM
    CODE:
    export const registry = new gcp.container.Registry("registry", {
      location: "US",
      project: "dev",
    });
    
    const services = ["service1"]
    
    export const services = services.reduce((acc, serviceName) => {
      acc[serviceName] = new docker.Image(`backend-${serviceName}`, {
        imageName: `${pulumi.getProject()}-${serviceName.toLowerCase()}`,
        build: {
          context: "../backend",
          dockerfile: `../backend/${serviceName}.prod.dockerfile`,
        },
        registry: {
          server: registry.bucketSelfLink,
          username: user,
          password: pass,
        },
      })
    
      return acc
    }, {})
  • c

    cuddly-smartphone-89735

    08/27/2020, 5:30 PM
    Why doesn't pulumi use typescript's sum types for parameters with a fixed set of possible values? Like
    type SkuTier = "Free" | "Paid"
    instead of just
    string
    that allows all kinds of inputs?
    ✅ 1
    s
    • 2
    • 1
  • n

    numerous-psychiatrist-20856

    08/27/2020, 6:02 PM
    Hello! I'm trying to setup a project where in one repo I define all the infrastructure, and in other I have the application building its docker image, but I'm running into issues referencing stacks. Here is the simplified infra code:
    import * as awsx from "@pulumi/awsx";
    
    const repository = new awsx.ecr.Repository("repository");
    
    export const ecrRepository = repository;
    and application code:
    import * as pulumi from "@pulumi/pulumi";
    import * as awsx from "@pulumi/awsx";
    
    const env = pulumi.getStack();
    const infra = new pulumi.StackReference(`cakper/infrastructure/${env}`);
    
    infra.requireOutput("ecrRepository").apply(repository => {
        const repo = new awsx.ecr.Repository("repository", repository);
    });
    problem that I'm running into, is that I can't properly reference the repository and both stacks end up creating it. Can someone please help me wrap my head around it? 🙂
    f
    h
    • 3
    • 5
  • b

    breezy-butcher-78604

    09/07/2020, 3:32 AM
    is there a way I can set the type of a dynamic resource like I can for a component resource? eg I have a class that extends
    pulumi.dynamic.Resource
    but when I run
    pulumi up
    it shows up with the type
    pulumi-nodejs:dynamic:Resource
    .
    • 1
    • 1
  • l

    limited-rainbow-51650

    09/08/2020, 5:55 PM
    Can I use
    <http://pulumi.log.info|pulumi.log.info>(...)
    during
    preview
    operations? I want to debug
    ResourceTransformation
    callback functions.
    g
    h
    • 3
    • 8
  • r

    red-area-47037

    09/09/2020, 9:00 PM
    Any chance someone can point me to an example using the RAPID release channel to create a GKE cluster.. and the second example would be for a private GKE cluster.. 😉 thx for the help
    g
    • 2
    • 9
  • s

    steep-angle-29984

    09/10/2020, 9:02 AM
    I experienced unexpected behavior when accessing the name of a k8s.core.v1.Secret resource. I created a k8s.core.v1.Secret resource and wanted to read the name output: First try:
    secret.metdata.name.apply(applyFunc)
    -> In this case the applyFunc is executed in preview phase and 'undefined' is passed as value Second try:
    secret.metdata.apply(applyFunc)
    -> In this case the applyFunc is not executed in preview phase Does anyone know if the different behavior is intended?
    g
    • 2
    • 5
  • l

    limited-rainbow-51650

    09/10/2020, 3:13 PM
    Struggling again to get a value unwrapped from an Output. I have an
    Output<string>
    coming from
    StackReference.requireOutput(<key>)
    . I now need the
    string
    value so I can pass it as one of the properties to
    azure.network.getVirtualNetwork({ string, string })
    . How can I do that?
    l
    • 2
    • 1
  • w

    worried-painting-67291

    09/10/2020, 11:58 PM
    I have some custom code that I want to run.. but only after my call to
    const mybucket = new aws.s3.Bucket(...)
    has completed. I tried to do
    mybucket.bucket.apply(bkt => ...}
  • w

    worried-painting-67291

    09/10/2020, 11:58 PM
    but it still runs at startup time instead of during the actual infrastructure creation phase
  • w

    worried-painting-67291

    09/10/2020, 11:58 PM
    (and the code fails because the bucket doesn't exist)
  • w

    worried-city-86458

    09/11/2020, 2:00 AM
    @worried-painting-67291 Wrap your continuation with
    if (!pulumi.runtime.isDryRun()) { }
    ? i.e. inside the
    apply
  • w

    worried-painting-67291

    09/11/2020, 2:00 AM
    @worried-city-86458 - huh.. that seems like a hack.. but it's just crazy enough to work. Thanks :)
  • d

    dazzling-sundown-39670

    09/11/2020, 9:30 AM
    Anyone tried caching pulumi docker builds in Github actions? Not really sure where to start
  • r

    red-area-47037

    09/11/2020, 10:20 AM
    Hey, is there an easy way to pass in a file containing all the values for a helm chart instead of specifying all values in place? I have a pretty extensive values.yml and would like to prevent to transfer this into a parameter for the function call…
    g
    • 2
    • 2
  • n

    nutritious-flower-51098

    09/11/2020, 10:32 AM
    Hi, we’re trying to write a StackValidation policy on a helm chart. However, we can’t filter on these resources:
    args.resources.filter(r => r.isType(kubernetes.helm.v3.Chart)).map( resource => {
          <http://pulumi.log.info|pulumi.log.info>(`We have a resource ${resource.type} = ${resource.name}`)
        }) // This doesn't print out anything
    But if we remove
    .filter()
    , we can see our
    kubernetes:<http://helm.sh/v3:Chart|helm.sh/v3:Chart>
    resource. Shouldn’t this work?
    g
    • 2
    • 4
  • e

    eager-analyst-8893

    09/11/2020, 2:41 PM
    Hi there! How do i convert Pulumi.output
    vpc.publicSubnetIds
    to String? (there is don't have
    apply
    ...)
    l
    • 2
    • 1
  • i

    incalculable-dawn-53071

    09/14/2020, 11:42 AM
    One of the typescript examples doesn't work and I wonder if anyone can point me in the right direction? I've raised an issue here: https://github.com/pulumi/examples/issues/795
  • i

    incalculable-dawn-53071

    09/14/2020, 11:42 AM
    TypeError: Class extends value undefined is not a constructor or null
  • m

    many-psychiatrist-74327

    09/14/2020, 5:01 PM
    👋 hello! is there a way to achieve
    deleteBeforeReplace
    behavior when using the
    @pulumi/eks
    package?
    More specifically, I want to basically call:
    const cluster = new eks.Cluster('my-cluster', {}, { deleteBeforeReplace: true })
    but looks like the property
    deleteBeforeReplace
    does not exist in ComponentResourceOptions. (asking in #typescript since this library is only available for TS/JS, but may cross-post to #aws )
    g
    • 2
    • 2
  • b

    breezy-butcher-78604

    09/15/2020, 3:45 AM
    is it possible to get the result of a
    getVpc()
    call immediately?
    l
    • 2
    • 26
  • m

    mammoth-elephant-55302

    09/15/2020, 5:23 AM
    I have a function inside of a package like this:
    import * as gcp from '@pulumi/gcp';
    import { asset, interpolate } from '@pulumi/pulumi';
    
    export function createServerlessInvokedVM(opts: ContainerSettings): gcp.cloudfunctions.Function
    l
    • 2
    • 4
  • b

    breezy-butcher-78604

    09/15/2020, 7:06 AM
    Is there a way I force a resource to be replace if any (or a specific list) of it's dependant resources change? My use case is I have an EC2 instance that downloads some files from S3 on boot up (via user data scripts). These files are instances of
    aws.s3.BucketObjects
    defined in the same template. If the contents of these files change, they are correctly identified as requiring an update, but because their file names don't change, the instance's user data doesn't change and therefore the instance isn't flagged for any changes. i'm hoping I can tell Pulumi that the instance needs replacing if any of the files are updated - is this doable?
    h
    • 2
    • 2
  • c

    calm-parrot-72437

    09/15/2020, 5:18 PM
    I'm being an idiot can someone save me from myself? I've got: const instance = password.apply(pw => { const vm = new aws.ec2.Instance(....); return vm; }) export const ipaddress = instance.privateIp; The instance is created but pulumi conceals the value of the exported ipaddress. How can I fix this up so I can see the stack exports from the commandline?
    g
    l
    c
    • 4
    • 25
  • b

    breezy-butcher-78604

    09/16/2020, 9:39 AM
    i keep getting the following panic when trying to to update the list of security group IDs on an `aws.ec2.instance`:
    panic: fatal: An assertion has failed: Expected diff to not require deletion or replacement during Update of <instance-urn>
        goroutine 659 [running]:
        <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
            /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/go/common/util/contract/failfast.go:23
        <http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc000f52c00|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc000f52c00>, 0x6005215, 0x48, 0xc000bcb7a8, 0x1, 0x1)
            /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/go/common/util/contract/assert.go:33 +0x197
        <http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Update(0xc0007fe1c0|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Update(0xc0007fe1c0>, 0x6a97a00, 0xc00187a690, 0xc001136700, 0xc0007fe1c0, 0x5295201, 0xc001d66140)
            /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.7.3/pkg/tfbridge/provider.go:971 +0x81d
        <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler.func1(0x6a97a00|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler.func1(0x6a97a00>, 0xc00187a690, 0x5d22400, 0xc001136700, 0x5d19580, 0xaa6b360, 0x6a97a00, 0xc00187a690)
            /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/proto/go/provider.pb.go:1920 +0x89
        <http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x6a97a00|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x6a97a00>, 0xc00187a330, 0x5d22400, 0xc001136700, 0xc0007ee3e0, 0xc0007ee400, 0x0, 0x0, 0x69d9820, 0xc0004ae010)
            /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2eb
        <http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler(0x5ddd380|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler(0x5ddd380>, 0xc0007fe1c0, 0x6a97a00, 0xc00187a330, 0xc00125f560, 0xc0007ee080, 0x6a97a00, 0xc00187a330, 0xc000195500, 0x290a)
            /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/proto/go/provider.pb.go:1922 +0x14b
        <http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0007fe000|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0007fe000>, 0x6abc2e0, 0xc001220480, 0xc000883000, 0xc0007ec390, 0xaa2d518, 0x0, 0x0, 0x0)
            /home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:1171 +0x50a
        <http://google.golang.org/grpc.(*Server).handleStream(0xc0007fe000|google.golang.org/grpc.(*Server).handleStream(0xc0007fe000>, 0x6abc2e0, 0xc001220480, 0xc000883000, 0x0)
            /home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:1494 +0xccd
        <http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0008244e0|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0008244e0>, 0xc0007fe000, 0x6abc2e0, 0xc001220480, 0xc000883000)
            /home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:834 +0xa1
        created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
            /home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:832 +0x204
    i have no idea whats causing it. any ideas?
    b
    • 2
    • 29
  • k

    kind-addition-90773

    09/16/2020, 7:19 PM
    Hi All, it's my first day using Pulumi and I'm hitting an error creating an EKS cluster -
    Error: providerCredentialOpts and AWS config setting aws:profile must be set together
  • k

    kind-addition-90773

    09/16/2020, 7:19 PM
    Has anyone faced this?
    b
    • 2
    • 3
Powered by Linen
Title
k

kind-addition-90773

09/16/2020, 7:19 PM
Has anyone faced this?
b

best-lifeguard-91445

09/16/2020, 9:34 PM
Are you using named profiles? (is aws:profile set?), if so, you have to provide
providerCredentialOpts
like so:
providerCredentialOpts: {
        profileName: aws.config.profile,
        roleArn: yourRoleHere.arn
      },
see source: https://github.com/pulumi/pulumi-eks/blob/1bcbb24dd24d44e07f34cfed40050e31c65646cd/nodejs/eks/cluster.ts#L1315'
k

kind-addition-90773

09/16/2020, 11:18 PM
Thank you!
👍 1
View count: 1