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

    orange-tailor-85423

    06/09/2020, 8:38 PM
    Anybody have a clever workaround for Helm chart updates, specifically for deprecated APIs in 1.16? Issue described here: https://github.com/pulumi/pulumi/issues/2877#issuecomment-641553544
    g
    f
    • 3
    • 7
  • c

    clever-plumber-29709

    06/09/2020, 9:20 PM
    does anyone has an example of creating rest api gateways on aws, I wanna do it in python but an example on any language can suffice. I have looked at https://github.com/pulumi/examples/blob/master/aws-ts-apigateway but it uses awsx which is not available outside ts, so i would like an example without awsx if possible. thanks
    l
    f
    • 3
    • 6
  • a

    average-receptionist-65239

    06/09/2020, 10:33 PM
    Is there a way to share secrets among stacks? I create stacks dynamically for each branch that is pushed to my git repo. We do this to stand up a staging environment for each branch.
    b
    • 2
    • 2
  • a

    average-receptionist-65239

    06/09/2020, 10:42 PM
    Since I create staging stacks dynamically in my build pipeline, I use something like the following in my build script:
    branch=staging-foo
    pulumi --stack=${branch} stack select || pulumi --stack=${branch} stack init
    I couldn't find a better way of doing that. Did I miss something?
    πŸ‘ 1
    l
    • 2
    • 2
  • a

    average-receptionist-65239

    06/10/2020, 6:18 AM
    I'm trying to import an Helm v2 chart https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v2/chart/ using the
    import
    property of the 3rd argument to the constructor (which is a
    CustomResourceOptions
    ). However, I get the TypeScript error:
    : error TS2345: Argument of type '{ import: string; }' is not assignable to parameter of type 'ComponentResourceOptions'.
          Object literal may only specify known properties, and 'import' does not exist in type 'ComponentResourceOptions'.
    Seems that the 3rd argument is a
    ComponentResourceOptions
    which doesn't have the
    import
    property. Any idea what I'm doing wrong here?
    g
    • 2
    • 8
  • b

    boundless-airport-99052

    06/10/2020, 7:36 AM
    Hello everyone, For those who use azure providers, you should be aware that a major version (2.0) of the terraform provider has been released few weeks ago. With this new version, `azurerm_virtual_machine`(= pulumi
    VirtualMachine
    ) is now deprecated in favor of `azurerm_linux_virtual_machine`&Β 
    azurerm_windows_virtual_machine
    (see [pulumi VirtualMachine disclamer](https://www.pulumi.com/docs/reference/pkg/azure/compute/virtualmachine/#disclaimers). The problem is the new
    LinuxVirtualMachine
    or
    WindowsVirtualMachine
    does not support embedded data disk attachement which means that we can not use
    cloud-init
    to initialize a VM and mount/configure its datadisk. I opened an issue on terraform πŸ‘‰ https://github.com/terraform-providers/terraform-provider-azurerm/issues/6074. If you can look at it and vote for it, (if you agree of course), it will be great πŸ‘πŸ‘πŸ‘
    πŸ‘ 1
  • a

    average-receptionist-65239

    06/10/2020, 8:29 AM
    Import trying to import a Kubernetes secret. I get the warning from preview:
    warning: inputs to import do not match the existing resource; importing this resource will fail
    AFAICS, the secret I'm importing is the same as the Kubernetes secret. The difference is listed as
    + data: "[secret]"
    Any ideas?
    c
    a
    • 3
    • 7
  • a

    able-beard-29160

    06/10/2020, 12:46 PM
    Is there a better way to verify whether a stack exists other than via
    pulumi stack ls
    ?
    a
    • 2
    • 14
  • n

    nice-airport-15607

    06/10/2020, 5:46 PM
    is there a good place to get a deeper understanding of properties to know what they’re supposed to be? currently trying to create an aws subscription on a topic and looking at the decorator i see
    /**
         * The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
         */
        readonly endpoint: pulumi.Input<string>;
    but idk what that means ☝️, any ideas?
    w
    • 2
    • 15
  • l

    limited-carpenter-34991

    06/10/2020, 6:40 PM
    Is there a way to execute scripts during a pulumi programm?
    g
    w
    • 3
    • 7
  • i

    icy-jordan-58549

    06/10/2020, 7:54 PM
    Can someone help me understand what’s going on with
    Output (python)
    ,
    azure.storage.Container("container")
    with
    pulumi.export('source', container.name.apply(lambda n: n))
    gives the output
    <pulumi.output.Output object at 0x1094e2a50>
    but for other resources it looks like it helps to use apply lambda.
    w
    • 2
    • 6
  • f

    full-dress-10026

    06/10/2020, 9:23 PM
    If I run a Pulumi
    refresh
    on my stack with an aws profile set in the config,
    config:
      aws:region: us-west-2
      aws:profile: my-profile
    I will get these error messages and preview failure.
    warning: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: the server has asked for the client to provide credentials
    If I run
    pulumi up
    on the same stack, I do not get that error message and the update is successful. Any idea what is going on?
    w
    • 2
    • 2
  • r

    rich-napkin-40911

    06/11/2020, 4:47 AM
    Hello everyone, I have the following code, where I'm trying to create 3 containers in Azure, along with 3 blobs:
    import * as pulumi from '@pulumi/pulumi';
    import * as azure from '@pulumi/azure';
    
    export = async () => {
      const account = await azure.storage.getAccount({
        name: 'myaccount',
      });
    
      const names = ['container1', 'container2', 'container3'];
    
      let counter = 1;
      let containers: azure.storage.Container[] = [];
      names.forEach(n =>
        containers.push(
          new azure.storage.Container(`container-${counter++}`, {
            name: n,
            storageAccountName: account.name,
          }),
        ),
      );
    
      counter = 1;
      let blobs: azure.storage.Blob[] = [];
      containers.forEach(c =>
        blobs.push(
          new azure.storage.Blob(`blob-${counter++}`, {
            name: pulumi.interpolate`${c.name}blob`,
            storageAccountName: account.name,
            storageContainerName: c.name.apply(n => n),
            sourceContent: pulumi.interpolate`This is a blob in ${c.name}`,
            type: 'Block',
          }),
        ),
      );
    };
    First question: I want to be sure of is to make sure, say,
    blob1
    goes into
    container1
    etc. Is there any way to make sure that happens? And also, another thing is let's say for some reason, I want to remove the middle name
    container2
    from
    names
    , then resources will be "replaced" to become 2 (eg.,
    container3
    would be rename In Terraform,
    count
    and
    for_each
    have different behaviors: β€’
    count
    would have the same effect; if you remove something from the middle, it will replace resources β€’
    for_each
    however would only remove that resource and not touch the other ones Is there a way to achieve the same behavior in here? I have a hunch that using
    counter
    here is messing things up, is there a better way to do it?
    f
    • 2
    • 3
  • w

    wet-noon-14291

    06/11/2020, 7:46 AM
    If I want to provide config through the command line when running
    pulumi up
    the doc says I can use the
    -c
    flag, but what is the format of the
    stringArray
    it expects?
    • 1
    • 2
  • f

    famous-jelly-72366

    06/11/2020, 8:45 AM
    how do I import to a stack with different name? Trying to split up resources into multiple stacks. I have exported old stack, edited as needed and want to import into new differently named stakc, but getting errors like:
    resource 'urn:pulumi:main::tms-pulumi::pulumi:pulumi:Stack::tms-pulumi-ci' is from a different stack (main != ci)
    • 1
    • 1
  • w

    wet-noon-14291

    06/11/2020, 10:48 AM
    More questions. It is generally about how to organize in a large organization. If I manage to get acceptance for pulumi I imagine something along these lines: 1. One project that deals with all infrastructure 2. One project per app that can reference the infra stack to get access to container registry I have something basic working along those lines, but have some questions. Let's say that I in step 2 would like to build container image and push it to a container registry defined in step 1, and have that run on the CI server after build. This should not deploy the app, just push it to the registry. Later when deploying the app I want to use the image created. This is still all good, the question is:
    Can I have one project that does the build image and also deploys based on an input flag when running
    pulumi up
    , or should I have one project for package the app and one for deploy?
    l
    • 2
    • 5
  • a

    average-receptionist-65239

    06/11/2020, 11:20 AM
    I have a situation in a TS project where, when I delete an unnecessary import, Pulumi wants to delete 7/8 of my resources. The line is
    -import * as kx from "@pulumi/kubernetesx";
    It's a change to my
    index.ts
    . Has anyone else experienced this kind of thing? Something similar happened a couple of days ago when I reordered my imports but I didn't stop to investigate.
    c
    • 2
    • 14
  • w

    white-airport-48392

    06/11/2020, 2:58 PM
    Hi, I am trying to get an ECS stack up using crosswalk , Is it possible to configure dynamic port Mapping using crosswalk ? Below is the code for creating an Ec2Service
    const service = new awsx.ecs.EC2Service(name, {
        name: `${name}-${utils.resolveStack()}`,
        cluster: cluster,
        subnets: ["xxxxx"],
        taskDefinitionArgs: {
          networkMode: "bridge",
          taskRole: ecsConfig["taskRole"],
          logGroup: null,
          executionRole: ecsConfig["executionRole"],
          containers: {
            test: {
              image: "xxxxx",
              cpu: 1024,
              memory: 1024,
              portMappings: [listener]
            }
          }
        },
        desiredCount: 0
      });
    The above config creates the Service with a loadbalancer/target group that is configured over port 8080 , this forces a new target to be registered to the target group over 8080 only , But in my case I want the targets to register over ephemeral ports If I want multiple docker containers to run on the same container instance , I need dynamic mapping which is configured via
    portMappings:[
    {
    hostPort:0,
    containerPort:8080
    }]
    If I do the above , the Service is created without a load balancer , Is there a way to get this to work per https://aws.amazon.com/premiumsupport/knowledge-center/dynamic-port-mapping-ecs/ Any help is appreciated πŸ™‚
    m
    • 2
    • 1
  • b

    bitter-zebra-93800

    06/11/2020, 7:33 PM
    Are releases announced here in slack?
  • s

    sparse-state-34229

    06/11/2020, 7:41 PM
    #announcements
  • g

    gentle-diamond-70147

    06/11/2020, 7:50 PM
    Only "big" releases generally, like 2.0 or other major feature releases and in #announcements as Scott said.
  • t

    thankful-laptop-55220

    06/11/2020, 10:12 PM
    howdy. been trying pulumi to shift away from terraform, however pulumi's output type handling is quite the challenge to wrap my head around. i've been reviewing months of slack conversations, reading docs, searching the web, yet i'm not sure how to proceed with it. i'm using typescript since that seems to be the best supported language (examples, docs, and crosswalk all either only support TS or favor it by tending to have more information in this language). i'd like to loop over the list of ASG names in this situation, yet it clearly iterates on the promise object because the plan shows
    __pulumiOutput
    and similar as values for
    g
    . preview:
    pulumi:pulumi:Stack        gcso-k8-dev                
     +   β”œβ”€ aws:ec2:LaunchTemplate  __pulumiOutput  create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  promise         create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  toString        create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  toJSON          create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  allResources    create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  resources       create     
     +   β”œβ”€ aws:ec2:LaunchTemplate  isSecret        create     
     +   └─ aws:ec2:LaunchTemplate  isKnown         create
    what am i not grasping?
    Untitled
    l
    g
    • 3
    • 12
  • t

    thankful-laptop-55220

    06/11/2020, 10:17 PM
    is pulumi able to create resources based upon the query results of other resources being created in the same
    up
    operation? granted that leaves preview rather useless at predicting what resources would be CRUD'ed, but is it possible?
    g
    • 2
    • 2
  • m

    millions-judge-24978

    06/11/2020, 10:25 PM
    Any examples out there of using the digital ocean container registry? This seems to be missing the crucial bit: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/digitalocean/#docker-provider-example
    b
    d
    • 3
    • 10
  • g

    gifted-city-99717

    06/11/2020, 11:05 PM
    Hey I’ve got a project organization question. i was hoping to have a single project with a stack per component (there’d actually be three stacks per component: <component>-dev,<component>-stage, <component>-prod. I was hoping to push the Pulumi stack files into each component:
    project_root
    β”œβ”€β”€ Pulumi.yaml
    β”œβ”€β”€ README.md
    β”œβ”€β”€ elasticsearch/
    β”œβ”€β”€ fargate/
    β”œβ”€β”€ go.mod
    β”œβ”€β”€ go.sum
    β”œβ”€β”€ influxdb/
    β”œβ”€β”€ main.go
    β”œβ”€β”€ main_test.go
    └── s3sink/
        β”œβ”€β”€ Pulumi.sink-dev.yaml
        β”œβ”€β”€ Pulumi.sink-stage.yaml
        β”œβ”€β”€ Pulumi.sink-prod.yaml
        β”œβ”€β”€ handler/
        β”œβ”€β”€ handler.zip
        β”œβ”€β”€ policies.go
        β”œβ”€β”€ sink_bucket.go
        └── sink_bucket_test.go
    When I try running
    pulumi up
    I get an error saying config hasn’t been set. I was wondering if anyone has any pointers (aside from moving the stack yaml files to the same level as the project)…
    l
    a
    • 3
    • 12
  • l

    little-dentist-8150

    06/12/2020, 1:59 AM
    Hi, Is someone able to have a look at my message? https://pulumi-community.slack.com/archives/C84L4E3N1/p1591513298487900 Thank you!
  • b

    busy-honey-73811

    06/12/2020, 12:28 PM
    Is there a way to wait for Kubernetes objects (resources) to become available? Let's assume I deploy a Kubernetes Operator using Pulumi and that operator will then register some CustomResourceDefinitions (CRD) for which I want to create a CustomResource instance using Pulumi. From my Pulumi's stack point of view there is currently no way to figure out whether the CRDs do already exists. 1. Deploy an Operator using Pulumi (e.g. as Deployment or via Helm) 2. Wait for the CRDs to be created by the operator 3. Create instances CR instances for that CRD using Pulumi As of today I revert to a dynamic resource which will block (sleep) a certain amount, but that approach is error prone and slow.
    l
    w
    • 3
    • 3
  • m

    millions-furniture-75402

    06/12/2020, 12:57 PM
    congratulations to pulumi on securing the reddit.com/r/pulumi subreddit
    πŸ‘ 2
    πŸŽ‰ 4
  • a

    acoustic-rose-89683

    06/12/2020, 2:07 PM
    Hey folks, is there any way to build Dynamic Provider using .NET Core(c# f#)?
    g
    • 2
    • 3
  • c

    crooked-window-31802

    06/12/2020, 2:13 PM
    hey all! im trying to make a small prototype of a data pipeline using pulumi, aws step functions, and aws lambda where the lambda function also relies on some python dependencies (like pandas). im working off of this example: https://github.com/pulumi/examples/tree/master/aws-py-stepfunctions but it doesn’t involve packaging any 3rd party python libraries. can anyone point me to more documentation or a more detailed example on how to accomplish this? thanks πŸ™
    • 1
    • 1
Powered by Linen
Title
c

crooked-window-31802

06/12/2020, 2:13 PM
hey all! im trying to make a small prototype of a data pipeline using pulumi, aws step functions, and aws lambda where the lambda function also relies on some python dependencies (like pandas). im working off of this example: https://github.com/pulumi/examples/tree/master/aws-py-stepfunctions but it doesn’t involve packaging any 3rd party python libraries. can anyone point me to more documentation or a more detailed example on how to accomplish this? thanks πŸ™
nm, figured it out
View count: 1