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

    chilly-laptop-44574

    03/26/2020, 3:43 AM
    Hello, quick question from newbie about projects and stacks naming. I have following folder structure (currently trying to migrate off terraform) that is kept in GIT.
    └── infrastructure
        └── network
            ├── dev
            ├── prod
            └── stage
                ├── 01-host-project
                │   ├── Pulumi.stage.yaml
                │   └── Pulumi.yaml
                └── 02-host-vpc
                    ├── Pulumi.stage.yaml
                    └── Pulumi.yaml
    So by default I am getting:
    <organisation>/02-host-vpc/stage
    as a stack name. What is the suggested approach to have project name aligned to my directory structure? Ideally something like:
    <organisation>/infrastructure/network/02-host-vpc/stage
    ? Also I use this directory structure as a template for different projects/customers does it mean that for each separate deployment I need to have different
    <organisation>
    ? Thanks!!😉
    f
    • 2
    • 4
  • s

    sparse-state-34229

    03/26/2020, 3:46 AM
    how do I get the string representation of a stack output? e.g. https://gist.github.com/ohlol/90cdf58e5a2ea49976470c06d8fb4afd
    f
    g
    • 3
    • 41
  • c

    chilly-laptop-44574

    03/26/2020, 9:55 AM
    What is the best way to bootstrap Pulumi project via CLI in automated fashion (non-interactive)? I am running following script:
    export PULUMI_CONFIG_PASSPHRASE=testtest
    
    pulumi new gcp-typescript \
      --name 02-host-vpc \
      --description "GCP host VPC" \
      --stack stage \
      --secrets-provider passphrase \
      --yes \
      --non-interactive \
      --force
    
    pulumi config set gcp:project "test"
    This creates new project
    Pulumi.yaml
    and
    Pulumi.stage.yaml
    as required but it overwrites my
    index.ts
    file. Is there any way to stop that? Thanks 😉
    l
    b
    b
    • 4
    • 9
  • b

    bitter-zebra-93800

    03/26/2020, 1:35 PM
    In this tutorial https://www.pulumi.com/docs/tutorials/aws/aws-ts-ec2-provisioners/ what is the significance of the final two dashes after each cat line? Are they necessary or is that a typo?
    $ cat rsa.pub | pulumi config set publicKey --
    $ cat rsa | pulumi config set privateKey --secret --
    g
    • 2
    • 1
  • b

    brave-angle-33257

    03/26/2020, 3:49 PM
    is this a bug? I went to use some existing code, and now it's complaining about this code, saying it should be a string rather than bool, seems like a bug
    • 1
    • 3
  • b

    brave-angle-33257

    03/26/2020, 3:50 PM
    networkInterfaces: [{
                        associatePublicIpAddress: false,
                        deleteOnTermination: true,
    interface LaunchTemplateNetworkInterface {
            associatePublicIpAddress?: pulumi.Input<string>;
            deleteOnTermination?: pulumi.Input<boolean>;
  • s

    sparse-state-34229

    03/26/2020, 5:48 PM
    am I doing something wrong with
    ec2.get_subnet_ids()
    in Python SDK? I pass
    vpc_id=vpc.id
    as I do with other resources but get an exception:
    Exception: invoke of aws:ec2/getSubnetIds:getSubnetIds failed: "vpc_id": required field is not set ()
    g
    • 2
    • 22
  • f

    famous-kite-69533

    03/26/2020, 7:14 PM
    Hi. Quick question. I have this code:
    const s3AccessKeyIdSecret = args.s3AccessKeyId || config.getSecret('s3AccessKeyId')
        const s3SecretAccessKeySecret = args.s3SecretAccessKey || config.getSecret('s3SecretAccessKey')
    
        const s3AccessKeyId = pulumi.all([s3AccessKeyIdSecret]).apply(([id]) => id)  
        const s3SecretAccessKey = pulumi.all([s3SecretAccessKeySecret]).apply(([secret]) => secret)
    How can I simplify this? I just want to get the secrets from Pulumi secrets if I don't specify them in the class. I am new to Typescript. Also, I am using these secrets in two objects, but for some reason the variables are not "empty" only when accessed the first time for the first object. When accessed for the second object the variables yield no values - I can see this in the config map that is created without those keys only for the second object; the objects are defined in the same scope and the keys that use these secrets are the same. Why aren't the variables working properly when used the second time? Thanks!
    w
    • 2
    • 18
  • f

    famous-kite-69533

    03/26/2020, 7:37 PM
    Uhm is it just me or is Pulumi really slow?
    w
    • 2
    • 12
  • c

    cool-egg-852

    03/26/2020, 7:44 PM
    Is it save to have a stack change from
    gcp.projects.Services
    to
    gcp.projects.Service
    ? Pulumi shows it will delete the resource, but will that disable all of the APIs?
    w
    • 2
    • 9
  • l

    loud-napkin-70080

    03/26/2020, 8:53 PM
    good afternoon, I have my code in typescript, everything turned out ok, but now I want to be able to run a script to copy files to my azure fileshare, only when I finish applying the changes. It can? How do I detect that I finish applying the changes, what is the callback? Is there an after apply method?
  • c

    chilly-laptop-44574

    03/27/2020, 3:42 AM
    For the CI/CD pipline how do we check that the stack already exists? When I call
    pulumi stack init my-stack
    and the stack already exists pulumi throws an error
    error: no stack named 'my-stack' found
    I think pulumi cli should rather say something like
    stack named 'my-stack' already exist. OK
    g
    • 2
    • 2
  • b

    better-account-3959

    03/27/2020, 10:30 AM
    hi
  • b

    better-account-3959

    03/27/2020, 10:30 AM
    my pulumi on command line hangs.
  • b

    better-account-3959

    03/27/2020, 10:31 AM
    and the login to "https://app.pulumi.com/" hangs too.
  • b

    better-account-3959

    03/27/2020, 10:31 AM
    any problems on the server side?
  • s

    stale-knife-36790

    03/27/2020, 10:31 AM
    Are there are any tutorials to create GCP cloud functions with Pulumi? 🤔
    b
    b
    o
    • 4
    • 14
  • b

    better-account-3959

    03/27/2020, 10:57 AM
    well the login now worked, but the console hangs, the previous call returned:
    error: could not deserialize deployment: reading response from API: read tcp 192.168.0.119:52138->52.26.53.20:443: read: connection reset by peer
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).getTarget|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).getTarget>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/state.go:291
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).newUpdate|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).newUpdate>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/state.go:247
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).runEngineAction|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).runEngineAction>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/backend.go:951
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).apply|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).apply>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/backend.go:934
    <http://github.com/pulumi/pulumi/pkg/backend.PreviewThenPrompt|github.com/pulumi/pulumi/pkg/backend.PreviewThenPrompt>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/apply.go:114
    <http://github.com/pulumi/pulumi/pkg/backend.PreviewThenPromptThenExecute|github.com/pulumi/pulumi/pkg/backend.PreviewThenPromptThenExecute>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/apply.go:199
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).Refresh|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudBackend).Refresh>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/backend.go:819
    <http://github.com/pulumi/pulumi/pkg/backend.RefreshStack|github.com/pulumi/pulumi/pkg/backend.RefreshStack>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/stack.go:87
    <http://github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudStack).Refresh|github.com/pulumi/pulumi/pkg/backend/httpstate.(*cloudStack).Refresh>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/backend/httpstate/stack.go:152
    <http://github.com/pulumi/pulumi/cmd.newRefreshCmd.func1|github.com/pulumi/pulumi/cmd.newRefreshCmd.func1>
    /home/travis/gopath/src/github.com/pulumi/pulumi/cmd/refresh.go:127
    <http://github.com/pulumi/pulumi/pkg/util/cmdutil.RunResultFunc.func1|github.com/pulumi/pulumi/pkg/util/cmdutil.RunResultFunc.func1>
    /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/util/cmdutil/exit.go:112
    <http://github.com/spf13/cobra.(*Command).execute|github.com/spf13/cobra.(*Command).execute>
    /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766
    <http://github.com/spf13/cobra.(*Command).ExecuteC|github.com/spf13/cobra.(*Command).ExecuteC>
    /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852
    <http://github.com/spf13/cobra.(*Command).Execute|github.com/spf13/cobra.(*Command).Execute>
    /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
    main.main
    /home/travis/gopath/src/github.com/pulumi/pulumi/main.go:49
    runtime.main
    /home/travis/.gimme/versions/go1.13.9.linux.amd64/src/runtime/proc.go:203
    runtime.goexit
    /home/travis/.gimme/versions/go1.13.9.linux.amd64/src/runtime/asm_amd64.s:1357
    b
    • 2
    • 1
  • l

    loud-napkin-70080

    03/27/2020, 12:24 PM
    Exist any event for execute method after apply changes (pulumi up - yes)?
    a
    • 2
    • 2
  • l

    loud-napkin-70080

    03/27/2020, 12:24 PM
    😞
  • a

    aloof-artist-9491

    03/27/2020, 2:17 PM
    Hi, I’m currently struggling with Pulumi and the cloudformation stack for my launch configuration (EC2 instances). Whenever I update the launch configuration (let’s say I update the user-data script) then it tries to update the cloud formation stack which timeout after 20 minutes (on the events section of the stack, I can see it’s stuck at Terminating instance(s) [i---------]; replacing with 1 new instance(s)), then it fails and rollback the cloudformation stack and thus I’m stuck with an unhealty stack. Edit : To be more specific, the “AWS::AutoScaling::AutoScalingGroup” ressource is stuck at “UPDATE_IN_PROGRESS” The only solution I have right now is to delete the cloudformation stack, pulumi refresh and then pulumi up which is OK because I’m still aat a development stage so I don’t mind if my EC2 instances are shutdown but it’s not the right solution when everything we’ll be in production. Anyone had this issue or an idea to resolve this? Thank
  • a

    aloof-artist-9491

    03/27/2020, 2:28 PM
    Obvisouly I just found out the root of the problem, well after some time spent in cloudtrail it appears the volume size of 8gb is smaller than my AMI snapshot (12gb) so I guess this is why it’s stuck. Maybe it can help someone in the future 🙂
  • l

    limited-librarian-23694

    03/27/2020, 5:14 PM
    Hi, I have a pulumi project that I pulled down from source control that was created by a teammate. It requires the AWS plugin, but I don't have that installed. It seems that it got installed for my teammate when he ran
    pulumi new aws-python
    . So now I want to install it via
    pulumi plugin install resource aws VERSION
    , but I cannot find any way to determine what the legal values of VERSION are... anyone able to point me in the right direction?
    • 1
    • 3
  • b

    breezy-hamburger-69619

    03/27/2020, 5:23 PM
    Hi folks, we’ll be hosting open office hours today @ 12pm PT in Zoom if anyone wants to join us! Bring Q/A on general Pulumi, AWS, GCP, Azure and Kubernetes, or stop by to say hello 👋 https://zoom.us/j/173438189?pwd=VmlFUFFRRmFvWHJsSTFmSjJKaDlRQT09
    👍 2
  • f

    famous-kite-69533

    03/27/2020, 6:46 PM
    Pulumi is absolutely amazing 😄 I have written code to automate basically everything that my app needs to work in Kubernetes: cert manager, velero, nginx ingress, postgres clusters, pgadmin, redis, anycable, memcached, csi drivers. Now if I need to rebuild everything from scratch, I first create the Kubernetes cluster with Rancher, and then I run a single
    pulumi update
    command. Finally, I deploy my app with CI/CD. Super awesome! I am doing some final tests of my code and then I will rebuild my actual cluster this way so I can maintain it with Pulumi in the future
    🎉 5
    😛artypus-8bit: 4
    c
    b
    • 3
    • 10
  • b

    breezy-hamburger-69619

    03/27/2020, 7:00 PM
    Office hours have started if folks would like to join! https://zoom.us/j/173438189?pwd=VmlFUFFRRmFvWHJsSTFmSjJKaDlRQT09
  • f

    famous-kite-69533

    03/27/2020, 7:43 PM
    I have two stacks, test and prod, and I have two files called Pulumi.test.yaml and Pulumi.prod.yaml with the different config and secrets. However I have one index.ts only with what I want Pulumi to deploy. Can I have two different files instead of the single index.ts and specify which one to use for each stack?
    s
    g
    f
    • 4
    • 16
  • s

    swift-painter-31084

    03/27/2020, 8:10 PM
    Is the current best practice for secrets inside magic/serialized functions to use a SSM Parameter Store / Secrets Manager resource and include that in the function via SDK? Is there anyway to ensure that the secret is serialized outside of the handler so it stays up inside Lambda execution context? Is there a simpler way or a component in the works for handling the above?
  • a

    abundant-art-60246

    03/27/2020, 10:02 PM
    got a quick question: does k8s pulumi support "kubectl user impersonation", so something like
    kubectl --as=system:serviceaccount:ns-sourcegraph:fake-user -n ns-sourcegraph apply -k .
    where fake-user is a service account with some policies attached.
  • w

    wonderful-zoo-8760

    03/27/2020, 10:13 PM
    I’m trying to create a pulumi provider for akamai CDN, they have a terraform plugin and I’m using the pulumi-tf-provider-boilerplate template. Somehow the generated TS code misses a closing bracket in the generated data resources TS files (but worked all right in other generated TS files). Anyone know how to investigate this type of issues? Related workaround in my repo: https://github.com/yliu-d/pulumi-akamai/commit/aeb5ad3f17be443dd41379cce493bf669807b97e
    w
    • 2
    • 4
Powered by Linen
Title
w

wonderful-zoo-8760

03/27/2020, 10:13 PM
I’m trying to create a pulumi provider for akamai CDN, they have a terraform plugin and I’m using the pulumi-tf-provider-boilerplate template. Somehow the generated TS code misses a closing bracket in the generated data resources TS files (but worked all right in other generated TS files). Anyone know how to investigate this type of issues? Related workaround in my repo: https://github.com/yliu-d/pulumi-akamai/commit/aeb5ad3f17be443dd41379cce493bf669807b97e
w

white-balloon-205

03/28/2020, 4:25 AM
That's really surprising. Do you have a link to the generated code?
w

wonderful-zoo-8760

03/28/2020, 5:21 AM
you can checkout this revision and run the regular build script: https://github.com/yliu-d/pulumi-akamai/commit/7817e1eb89fa1c29e1a28afd8cb1cec4cc8a1ba9
I have to use some of the old pulumi libraries as akamai terraform provider is not using the latest terraform plugin system: https://github.com/yliu-d/pulumi-akamai/commit/baf553193fdd49ae4eef22e90ce6adfaf5920a8c
not sure if that’s related to the issue
View count: 1