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

    bored-planet-52144

    04/17/2020, 11:32 AM
    @boundless-tailor-35598 Thanks
  • q

    quick-greece-34196

    04/17/2020, 4:08 PM
    Hi all ! I'm happy to join your community. @faint-motherboard-95438 kindly introduced me to the technology which I am learning and loving.
    šŸ‘‹ 7
    f
    • 2
    • 1
  • b

    big-potato-91793

    04/17/2020, 4:51 PM
    Does pulumi v2 is officially out?
    r
    w
    • 3
    • 4
  • q

    quick-greece-34196

    04/17/2020, 6:19 PM
    Hey all. Quick question for you. I have three projects/stacks: gcp -> cluster -> service. I have run into a situation where the service stack is trying to recreate the parent cluster resources any time a
    pulumi.ComponentResource
    is instantiated in the service program. What is going on? Is there anything I am missing?
  • a

    acceptable-stone-35112

    04/17/2020, 9:13 PM
    Is there a way to share resource between stacks without StackReference? I have only one resource in entire project (aws.iam.User whose credentials are used by 3rd party and it should be same for all environments) and it seems a bit overhead to create separate pulumi project and stack just to be able to get stackreference for that user in my dev/qa/prod stacks
    b
    • 2
    • 5
  • b

    brave-glass-88708

    04/17/2020, 9:42 PM
    With pulumi when you create a Kubernetes service account, is there a way to get that service account token?
    f
    • 2
    • 1
  • f

    fast-dinner-32080

    04/17/2020, 10:23 PM
    Is there a way to just print out the current stack name using the CLI? Running stack prints out a lot more than just the name.
  • f

    fast-dinner-32080

    04/17/2020, 10:26 PM
    Well came up with this command but wondering if there is a built in way.
    pulumi stack ls | grep "*" | awk '{print $1}' | sed 's/\*//g'
    a
    • 2
    • 1
  • q

    quiet-wolf-18467

    04/18/2020, 11:00 AM
    I understand there's a reason for Pulumi to exit and ask me to export my stack, remove pending operations, and reimport ... but the UX here is painful. Can't you just remove the pending operations, refresh the stack, and give me another preview? If there are resources created that are now unmanaged, give me a flag to accept that please. I've hit this issue about 9 times in 24 hours because of timeouts on CI 😫
    šŸ‘ 2
    s
    s
    • 3
    • 4
  • q

    quiet-wolf-18467

    04/18/2020, 11:01 AM
    Please make my life easier šŸ˜
  • t

    tall-librarian-49374

    04/18/2020, 7:04 PM
    This is tracked in https://github.com/pulumi/pulumi/issues/4265
  • m

    mammoth-journalist-45153

    04/18/2020, 9:17 PM
    I couldn't find pulumi/aws support for Lex, more specifically I am looking to use the start import https://docs.aws.amazon.com/lex/latest/dg/API_StartImport.html as part of my environment. If this isn't supported, is there a way for me to do the import using the aws client as part of my pulumi deployment and manage it as part of my pulumi stack? And another small question, can I use the pulumi.asset modules to generate the SmartImport payload? which requires a zip archive with a json file.? Thanks for the guidance,
  • h

    high-orange-18933

    04/19/2020, 12:27 AM
    Hi guys, can someone please guide me about how to create Google cloud instance with Golang using pulumi. I can’t figure out how to specify boot disk in go code. I am new to pulumi and Golang. Thanks
    l
    • 2
    • 3
  • s

    sticky-lighter-73941

    04/19/2020, 1:43 PM
    Hi guys , can you point me out on how to implement a Terraform provider in Pulumi . I haven’t found documentation about this . Thanks !
    a
    • 2
    • 1
  • b

    brave-glass-88708

    04/19/2020, 9:05 PM
    I am currently evaluating if Pulumi is something that we make use of for managing and bootstrapping our fleet of kubernetes cluster. idea is to bootstrap in common services (efk stack, ingress, namespaces, service account, etc...) i am doing something relatively simple in TypeScript because it has the kubernetes extension SDK, i wrote the same thing in Go and that's fine.
    import * as pulumi from "@pulumi/pulumi";
    import * as k8s from "@pulumi/kubernetes";
    
    const config = new pulumi.Config();
    const provider = new k8s.Provider("kubernetes", { kubeconfig: config.require("cluster-config") });
    
    const ta = new k8s.core.v1.ServiceAccount("test-account", {
        metadata: {
            name: "test-account",
            namespace: "default"
        }
    }, { provider });
    
    
    export const tokenName = pulumi.interpolate `${ta.metadata.namespace}/${ta.secrets[0].name}`
    
    type KubernetesData = { [key: string]: string }
    
    export const token = k8s.core.v1.Secret.get(tokenName, tokenName).data.apply(v => {
        return (<KubernetesData>v)["token"]
    });
    
    // export const token = k8s.core.v1.Secret.get("default/test-account-token-7rz8w", "default/test-account-token-7rz8w").data.apply(v => {
    //     return (<KubernetesData>v)["token"]
    // });
    1. Argument of type 'Output<string>' is not assignable to parameter of type 'string'.ts(2345) 2. Parameter 'v' implicitly has an 'any' type. however, if i use the call that is commented or this
    export const token = k8s.core.v1.Secret.get("harcoded-works", tokenName).data.apply(v => {
        return (<KubernetesData>v)["token"]
    });
    is this here a less verbose method to getting values from one resource and feed it into another?
    g
    • 2
    • 3
  • f

    faint-oil-7535

    04/19/2020, 11:09 PM
    Here's an easy one: I demoed Pulumi to my architecture guild. They loved it, but raised a few questions I couldn't answer. The biggest one was around user security of stacks. Let's say I have 4 stacks: 1. the personal dev stack of a devops who wants to test code on his/her own 2. the shared dev stack for a team, which gets updated once code goes to develop 3. the uat stack 4. the prod stack How can I protect stacks so that the dev can create / destroy 1, but our CICD pipeline manages the other 3? So the dev has rights to stack 1, but no rights to muss with stacks 2, 3, and 4?
    g
    • 2
    • 4
  • h

    high-morning-17948

    04/20/2020, 1:07 AM
    How can I specify in
    .pulumi/ci.json
    to use production stack on release tag instead of master branch for Github Actions?
    g
    • 2
    • 7
  • c

    clean-autumn-55516

    04/20/2020, 2:09 AM
    Hi! First off, loving Pulumi, coming from using Terraform and Serverless Framework, I absolutely love the approach. I seem to have run into a use case that I can't seem to find a solution for and have searched quite a bit. I am deploying a Cloud Function to GCP. My Cloud function has a dependency on Prisma Client. The main issue is that I need to run/add a post install script for my cloud function that generates the prisma client. I have tried adding the following to my main package.json file. This doesnt work because when I look at the source being generated for the Cloud function, the package.json is only a few dependency for the function itself and no scripts section.
    "scripts": {
        "postinstall": "npx prisma generate"
      }
    Am I running into a limitation here? Is there a way to have pulumi deploy a function with a custom package.json to achieve a post install script?
    t
    • 2
    • 5
  • q

    quick-greece-34196

    04/20/2020, 2:32 AM
    Hi there šŸ™‚. I need help concerning a k8s provider and component resource in a child stack. I am importing resources from a parent stack and creating a provider like so:
    const k8sProvider = new k8s.Provider(`${prefix}-k8s-provider`, {
      kubeconfig: clusterStack.getOutput("kubeConfig"),
    });
    
    ...
    
    const providers = {
      gcp: gcpProvider,
      kubernetes: k8sProvider,
    }
    and then passing it to a component resource:
    const externalDNS = new ExternalDNS(
      `${prefix}-external-dns`,
      {
        labels,
        domain,
        zonePolicy: "sync",
        nodeSelector: {
          [`${domain}/nodeType`]: "main"
        }
      },
      { providers },
      );
    I am getting an error that seems to indicate the provider is wrong ? Any pointers I can use, I am out of ideas...
    error: Missing required configuration variable 'customer-services:k8sMasterPassword'
            please set a value using the command `pulumi config set customer-services:k8sMasterPassword <value>`
    f
    • 2
    • 2
  • m

    mysterious-australia-14256

    04/20/2020, 10:32 AM
    Hi All. Newbie question here, is there a way to handle shared resources? For example say I have two temporary projects that both need to create resources within the same Azure Resource Group. Is there the concept of having whichever project is called first create the resource group? If so, how does cleanup work once the projects are torn down and their resources deleted i.e. how would I automatically remove the Resource Group? I guess what I would like to happen is 1. Pulumi Up one project (this will create the Resource Group and stick some resources in it) 2. Pulumi Up another project that will add resources to the same Resource Group 3. Tear down one of the projects, deleting its resources. Pulumi would 'know' that another project still has a reference to the Resource Group so wouldn't delete it 4. Tear down the other project, deleting its resources. Pulumi would see there are no more references to the Resource Group and also remove that Is that a supported scenario or would I need to manually manage/delete the Resource Group independent from the two projects?
    t
    • 2
    • 2
  • c

    clean-eve-27532

    04/20/2020, 4:04 PM
    Anyone got some good examples for testing Pulumi deployments in a CI environment?
  • g

    gray-yak-9058

    04/20/2020, 4:19 PM
    Hi all, I'm putting together a proposal to use Pulumi as our IaC tool. I see Pulumi has a tf2pulumi tool. Can that be used to translate a Terraform PROVIDER to a Pulumi PROVIDER? I assume some tool like this exists for Pulumi to have so many providers already.
    c
    b
    • 3
    • 8
  • p

    plain-businessperson-30883

    04/20/2020, 6:07 PM
    Hello. I just noticed that in v2.0.0 the
    getOutputSync
    was removed and the
    getOutputValue
    was introduced. Is there more info on the changes around it? I see that the
    …Value
    behaves differently from the
    …Sync
    , but I can’t find any docs on that. Since it uses Promises, I believe the result will be different, right? Is there more info about it? Thanks in advance!
    f
    a
    • 3
    • 4
  • a

    acceptable-stone-35112

    04/20/2020, 8:01 PM
    Hi, how can I configure project to keep all Pulumi*.yaml files in separate folder?
    w
    • 2
    • 1
  • f

    faint-oil-7535

    04/20/2020, 9:00 PM
    Hey, where can I get deets on the update details to tf2pulumi's support for TF 12? When it will be ready, when it will be in beta, etc?
    w
    • 2
    • 2
  • l

    limited-rainbow-51650

    04/20/2020, 9:04 PM
    I have a custom
    pulumi.ComponentResource
    . In the constructor of this component, I create a
    gcp.compute.Network
    . When unit testing, in the
    setMocks
    function, as in the examples, I do a
    switch(type)
    and I only left the
    default
    clause in there with a
    console.log
    statement. When running the tests, I create an instance of my component. I expect the
    newResource
    callback to be invoked twice but I only see it for my component, not for the inner
    gcp.compute.Network
    . Are my expectations wrong?
    t
    • 2
    • 6
  • o

    orange-policeman-59119

    04/20/2020, 11:29 PM
    What happens if I do a
    pulumi login --gcs
    in two locations at once and try to deploy the same stack?
    w
    • 2
    • 1
  • c

    colossal-room-15708

    04/21/2020, 1:23 AM
    Is
    v2.0.0
    released now?
    pulumi new                                                                                                    
    warning: A new version of Pulumi is available. To upgrade from version '1.14.1' to '2.0.0', run 
       $ curl -sSL <https://get.pulumi.com> | sh
    šŸ™ˆ 1
    šŸ™Š 1
    šŸ™‰ 1
    w
    • 2
    • 3
  • p

    prehistoric-account-60014

    04/21/2020, 1:51 AM
    Pulumi doesn’t seem to be detecting CI properly anymore and is asking for the
    --yes
    option. Is this intentional?
    g
    s
    +3
    • 6
    • 41
  • w

    witty-crayon-40181

    04/21/2020, 9:24 AM
    Hey, i am new to pulumi. can someone share with me what are the best practices for using pulumi with different aws accounts and state buckets, regarding different variables values, using remote state and so on? thanks in advanced.
    w
    • 2
    • 2
Powered by Linen
Title
w

witty-crayon-40181

04/21/2020, 9:24 AM
Hey, i am new to pulumi. can someone share with me what are the best practices for using pulumi with different aws accounts and state buckets, regarding different variables values, using remote state and so on? thanks in advanced.
w

white-balloon-205

04/21/2020, 2:04 PM
Do you have any more details on what specifically you are looking for? For state management, you can just leave that up to the Pulumi service backend if you want - so you shouldn’t have to worry about that up front. For working with multiple AWS accounts, you can easily do that either from a single program (create aws.Provider instanced for each account), or by deploying multiple stacks from a single project, each to a different account. Which of these makes sense for you really depends on your workload, but starting off with a single program is likely the easiest place to get going.
w

witty-crayon-40181

04/21/2020, 7:55 PM
Hey Luke, thanks for your response. the goal is to be able to create different stacks in different environment and to be able to deliver different values for each one of them. for example create an ecs cluster with autoscaling group on one account and without autoscaling group in second account. until now i was using terraform with a structure of module and live for parameters passed to the module for each account and environment, and i wonder what are the best practices for that in pulumi. any relevant documentation would be great. i have started from that one: https://www.pulumi.com/blog/controlling-aws-costs-with-lambda-and-pulumi/
View count: 1