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
getting-started
  • i

    important-sandwich-62391

    07/07/2021, 9:03 PM
    and… maybe i just suck at yaml.
    😂 1
  • f

    flaky-school-82490

    07/08/2021, 7:27 AM
    Looking into the
    pulumi import
    command, where can I find the
    type-token
    for a given resource? https://www.pulumi.com/docs/reference/cli/pulumi_import/ Also is it possible to import a resource that the provider does not fully cover?
    t
    • 2
    • 9
  • a

    adventurous-camera-87788

    07/08/2021, 6:48 PM
    Hey guys, I have another interpolation question. I have an instance of
    cache.Redis (v20201201)
    & I am trying to get the following statement to produce a string:
    const REDIS_CONNECTION_STRING = pulumi.interpolate `rediss://:${redis.accessKeys.primaryKey}@${redis.hostName}${redis.sslPort}`;
    I am getting the following error:
    "Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string> consider either:\n1: o.apply(v => `prefix${v}suffix`)\n2: pulumi.interpolate `prefix${v}suffix`\n\nSee <https://pulumi.io/help/outputs> for more details.\nThis function may throw in a future version of @pulumi/pulumi."
    I’ve tried doing this with
    pulumi.apply
    as well & had no luck. Can someone please point me in the right direction?
    b
    c
    • 3
    • 15
  • m

    magnificent-jordan-5838

    07/08/2021, 7:54 PM
    Does anyone know how to associate a static-ip to aws fargate tasks?
    b
    m
    • 3
    • 9
  • g

    green-intern-27665

    07/08/2021, 8:38 PM
    Hi!!! A newbie over here!! I have an issue with outputs in python. I have all my env vars in a common stack so from any service I can query my common vars which is nice. I want to use those variables in a ECS task but... To define them I have to "unwrap" all my outputs (envars) chaining
    apply
    calls any idea how to solve this? My goal is to have a key/value array of strings with all my vars
    b
    • 2
    • 10
  • n

    numerous-portugal-47563

    07/08/2021, 11:30 PM
    Just getting started with Pulumi (Python) and I'm a seasoned AWS CDK IaC user. I'm using PyCharm as my IDE and I can't get the quick documentation working at all. Are there any other PyCharm IDE users out there?
    b
    • 2
    • 4
  • m

    melodic-family-23496

    07/09/2021, 3:23 AM
    I figured I could try pulumi on some raspberry pi's I have laying around running ESXi, but all I can find is pulumi vsphere not just ESXi. I tried it anyway but https//192.168.2.19/sdk doesn't exist. Is there a way to provision things on ESXi? What about proxmox?
  • b

    bumpy-room-43904

    07/09/2021, 3:27 AM
    howdy all
  • b

    bumpy-room-43904

    07/09/2021, 3:33 AM
    Just started with pulumi (v3.6.1) on the 'hello world / s3 bucket project'... Getting an error while making the bucket public https://www.pulumi.com/docs/get-started/aws/deploy-changes/: I think i've got the code right:
    """An AWS Python Pulumi program"""
    import pulumi
    from pulumi_aws import s3
    
    # Create an AWS resource (S3 Bucket)
    bucket = s3.Bucket('my-bucket')
    
    # Export the name of the bucket
    pulumi.export('bucket_name', bucket.id)
    bucketObject = s3.BucketObject(
        'index.html',
        acl='public-read',
        content_type='text/html',
        bucket=bucket,
        source=pulumi.FileAsset('index.html'),
    )
    pulumi.export('bucket_endpoint', pulumi.Output.concat('http://', bucket.website_endpoint))
    It must be me...pulumi seems great thus far despite my error. Any hints for this?
    h
    • 2
    • 6
  • m

    many-yak-61188

    07/09/2021, 1:21 PM
    hello, looking for some samples of using an ASG on AWS with a load balancer (I'm using TS) is there an example I can look at?
    b
    • 2
    • 14
  • g

    gray-belgium-81846

    07/09/2021, 4:17 PM
    I’ve been experimenting with the
    aws-ts-hello-fargate
    example on an M1 mac. When running
    pulumi up
    it never completes — the ECS service never gets healthy and is stuck in a death loop. This is due to building the docker container by default for arm64 arch instead of linux/amd64. I was able to modify the sample to specify the architecture in the docker build options and make progress. However, I’m concerned about the behavior when attempting to deploy a bad container. I had to break out out of
    pulumi up
    run
    pulumi stack export
    and clean up the ECS service from pending operations, then re-import using
    pulumi stack import
    . Even then when I ran
    pulumi destroy
    I had to manually cleanup the ECS cluster using the console. Is this expected behavior when a bad image is deployed?
    b
    l
    • 3
    • 4
  • r

    rough-hydrogen-27449

    07/09/2021, 8:28 PM
    Hi, I'm trying to build a project on Confluent Cloud using the
    pulumi_confluent
    and
    pulumi_kafka
    providers. My initial structure was to have two separate projects, one for the Confluent Cloud infrastructure
    confluent-cloud-infra
    and one for the main application
    main-infra
    . My plan is to manage the Confluent Cloud resources for each of my stacks in the
    confluent-cloud-infra
    project and
    pulumi.export
    data like this:
    def main() -> None:
        confluent = Confluent(name=f"{pulumi.get_stack()}_Confluent")
        pulumi.export(
            "confluent",
            {
                "bootstrap_servers": confluent.kafka_cluster.bootstrap_servers,
                "pulumi_api_key": confluent.pulumi_api_key,
                "service_credentials": confluent.service_credentials,
            }
       )
    Then, I plan to consume these data via a
    StackReference
    in my
    main-infra
    project and create all my application-specifc resources (topics, ACLs) with the
    pulumi_kafka
    provider. The issue I've run into, and the reason for my question, is that the
    pulumi_kafka
    provider expects e.g. the
    bootstrap_servers
    to be passed in as a configuration parameter (https://github.com/pulumi/pulumi-kafka/blob/master/README.md#configuration), and as far as I can tell I can't mutate the
    pulumi.Config
    object. Is there a way to dynamically update my configuration at runtime? Or is it a hard constraint that I must set these values in my configuration file?
  • r

    rough-hydrogen-27449

    07/09/2021, 9:20 PM
    Is the answer to create an instance of
    pulumi_kafka.Provider
    and pass that in? I see a similar approach in the example here: https://www.pulumi.com/docs/intro/concepts/stack/#stackreferences
    b
    • 2
    • 1
  • r

    red-scooter-62880

    07/10/2021, 12:13 AM
    How can I export variables in pulumi to azure devops, so I can use it to deploy a function app with the name in the variable?
  • t

    tall-apartment-87556

    07/10/2021, 3:17 AM
    Hi, i am trying to migrate the pulumi state from pulumi cloud to azure blob. Successfully export and import to the azure blob. But when i try to invoke the pulumi state from another terminal, i could not find the stack even when i use the pulumi log in with the azure blob, and i tried to init a stack with the same name exported before, there would be a blank state json for the new init stack, the previous state can not be invoked. Anyone has any idea how to solve this?
  • m

    millions-ability-32682

    07/10/2021, 9:41 AM
    I would like to make a project with two stacks: one for a VM, and one for the stuff that runs on the said VM. I have come up with the following project structure after reading the Pulumi documentation:
    $ tree -I node_modules $(pwd)
    /workspaces/tmnf-do
    ├── package.json
    ├── package-lock.json
    ├── Pulumi.tmnf-server.yaml
    ├── Pulumi.vm.yaml
    ├── Pulumi.yaml
    ├── stacks
    │   ├── tmnf-server
    │   │   └── index.ts
    │   └── vm
    │       ├── index.ts
    │       └── userdata.sh
    └── tsconfig.json
    Then I changed the
    main
    setting of the two stacks to point to the stack directory:
    $ tail -n +1 Pulumi.*.yaml
    ==> Pulumi.tmnf-server.yaml <==
    main: stacks/tmnf-server
    
    ==> Pulumi.vm.yaml <==
    main: stacks/vm
    
    config:
      digitalocean:token:
        secure: [redacted]
    But when I run
    pulumi up --stack vm
    I get the following warning:
    Diagnostics:
      pulumi:pulumi:Stack (tmnf-do-vm):
        We failed to locate the entry point for your program: /workspaces/tmnf-do
        Here's what we think went wrong:
          * Your program's 'main' file (/workspaces/tmnf-do/index.js) does not exist.
    Which leads me to think that pulumi is still looking for the program in the project directory, disregarding the
    main
    setting from stack config files. My question is: should a setup like this be possible, and should it even be possible to override
    main
    per stack like I am trying to do?
    m
    • 2
    • 1
  • r

    red-scooter-62880

    07/10/2021, 12:46 PM
    Hi can someone help me with creating stacks?
    b
    • 2
    • 6
  • s

    shy-beach-41444

    07/12/2021, 7:58 AM
    Hi, I am trying to import lambda-function but it is throwing different error’s. also per the error i am doing the changes. but still unable to solve it. and this is the resource file i am using.
    {
      "resources": [
        {
          "type": "aws:lambda/function:Function",
          "name": "lambda-slack-notifier",
          "id": "lambda-notifier",
          "handler": "index.handler",
          "runtime": "nodejs"
        }
      ]
    }
  • f

    fresh-restaurant-12335

    07/12/2021, 5:14 PM
    Hey all, so I'm looking at Pulumi as a tool to perhaps settle this interesting edge case described in the Terraform Kubernetes provider: https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#stacking-with-managed-kubernetes-cluster-resources - "Stacking with managed Kubernetes cluster resources". Now it appears to me the the underlying problem in Terraform is that providers are not lifecycled in a similar manner to the resources they control. Question is, is this behaviour different in Pulumi?
    b
    • 2
    • 3
  • h

    happy-angle-19851

    07/12/2021, 6:43 PM
    Does pulumi support --max-pods-per-node in eks nodegroup ?
    b
    b
    • 3
    • 9
  • a

    aloof-jelly-80665

    07/12/2021, 7:51 PM
    I’m currently logged in as my personal username. How do I switch the pulumi CLI to use the new organization I created?
    b
    m
    • 3
    • 4
  • g

    gray-belgium-81846

    07/12/2021, 9:18 PM
    Is it bad form to read env vars from pulumi programs? I’m calling a pulumi program from my CI system, and I’d like to be able to pass the build #. I debated setting it as Configuration, but I don’t want to update the stack’s yaml file as part of CI.
    b
    • 2
    • 3
  • p

    prehistoric-london-9917

    07/12/2021, 11:45 PM
    G’day. I have a stack that outputs an array of subnet IDs:
    export const privateSubnetIds = vpc.privateSubnetIds;
    I have another stack that reads the first stack’s outputs:
    const privateSubnetIds = vpcStack.requireOutput("privateSubnetIds");
    The
    requireOutput
    function returns an
    Output<any>
    type. What’s the proper way to cast this back to something like a
    string[]
    ? I searched Slack and found someone else who asked a similar question, but it remained unanswered. Any thoughts?
    h
    • 2
    • 3
  • m

    many-yak-61188

    07/13/2021, 2:13 PM
    Hello. I've been using / experimenting with pulumi using an s3 bucket as the login
    url
    . I decided to switch to using the service. My current state is as below
    ➜  p-gar git:(main) pulumi stack
    Current stack is accrue-money/ci-cd:
        Owner: accrue-money
        Last update time unknown
        Pulumi version: ?
    Current stack resources (0):
        No resources currently in this stack
    
    More information at: <https://app.pulumi.com/accrue-money/p-gar/ci-cd>
    
    Use `pulumi stack select` to change stack; `pulumi stack ls` lists known ones
    when I set config settings using
    pulumi config
    as below
    pulumi config set GITHUB_ACTIONS_RUNNER_CONTEXT  "<https://github.com/orgs/accrue-money/>"
    I expected the config to show up in the service instead of a file
    Pulumi.ci-cd.yaml
    being present in the repository. My expectation being incorrect, what is the correct way to distribute configuration setting to other devs? Does each developer need to run the
    pulumi config
    commands after a
    git clone
    ? Should I commit the file
    Pulumi.ci-cd.yaml
    ? Over all a little confused about the purpose of stack specific configuration and the need to distribute it to others, what is the best way to do this?
    b
    • 2
    • 2
  • c

    calm-gpu-56173

    07/13/2021, 11:50 PM
    Hello There i was trying to create ECS using pulumi.. but its failing with error: Error: ' docker build ./app -t 12fda807-container' failed with exit code 1.. Any idea / help appreciated..
    b
    • 2
    • 18
  • m

    millions-ability-32682

    07/14/2021, 6:52 AM
    I would like to make a project with two stacks: one for a VM, and one for the stuff that runs on the said VM. I have come up with the following project structure after reading the Pulumi documentation:
    $ tree -I node_modules $(pwd)
    /workspaces/tmnf-do
    ├── package.json
    ├── package-lock.json
    ├── Pulumi.tmnf-server.yaml
    ├── Pulumi.vm.yaml
    ├── Pulumi.yaml
    ├── stacks
    │   ├── tmnf-server
    │   │   └── index.ts
    │   └── vm
    │       ├── index.ts
    │       └── userdata.sh
    └── tsconfig.json
    Then I changed the
    main
    setting of the two stacks to point to the stack directory:
    $ tail -n +1 Pulumi.*.yaml
    ==> Pulumi.tmnf-server.yaml <==
    main: stacks/tmnf-server
    
    ==> Pulumi.vm.yaml <==
    main: stacks/vm
    
    config:
      digitalocean:token:
        secure: [redacted]
    But when I run
    pulumi up --stack vm
    I get the following warning:
    Diagnostics:
      pulumi:pulumi:Stack (tmnf-do-vm):
        We failed to locate the entry point for your program: /workspaces/tmnf-do
        Here's what we think went wrong:
          * Your program's 'main' file (/workspaces/tmnf-do/index.js) does not exist.
    Which leads me to think that pulumi is still looking for the program in the project directory, disregarding the
    main
    setting from stack config files. My question is: should a setup like this be possible, and should it even be possible to override
    main
    per stack like I am trying to do?
    w
    • 2
    • 6
  • h

    hallowed-ice-8403

    07/14/2021, 8:03 AM
    Hello everyone, am trying to find an example for stack reference using self managed backend (Python).. Please let me know if u have come across anything similar.. Thanks in advance !
  • c

    calm-gpu-56173

    07/14/2021, 1:50 PM
    Hello i use concourse ci/cd to run pulumi.. recently got issue while trying to create ECR. because container i was using did not have prebuilt docker image. are there any containers available which has pre build docker image with pulumi & nodejs ? Container i used was --- /******platform: linux image_resource:   type: docker-image   source:     repository: pulumi/pulumi-nodejs     tag: "3.6.1"*******/
  • m

    many-yak-61188

    07/14/2021, 5:10 PM
    hello 👋 more of a pulumi/actions + github workflow question. I set up github self hosted runners on AWS, the EC2 instances have IAM role based permissions. However when I set up github workflows pulumi insists on configuration of
    AWS_ACCESS_KEY_ID
    &
    AWS_SECRET_ACCESS_KEY
    . On the machine I tried some aws cli commands and they work perfectly. QQ: Is there a way use pulumi/actions without configuring credentials, because the host that is the runner has role based permissions assigned to it?
    b
    • 2
    • 21
  • c

    crooked-parrot-53351

    07/14/2021, 5:39 PM
    Afternoon, I'm working on creating a notification hub in Azure using the TypeScript Azure-Native SDK from pulumi. In setting up our APNS information (using certificate authentication mode), I see that the input
    ApnsCredential
    (https://www.pulumi.com/docs/reference/pkg/azure-native/notificationhubs/notificationhub/#apnscredential) with prop
    apnsCertificate
    is of type
    string
    . The p12 file provided by Apple is a binary file; is there a text encoding that Pulumi is expecting when setting the value?
    • 1
    • 1
Powered by Linen
Title
c

crooked-parrot-53351

07/14/2021, 5:39 PM
Afternoon, I'm working on creating a notification hub in Azure using the TypeScript Azure-Native SDK from pulumi. In setting up our APNS information (using certificate authentication mode), I see that the input
ApnsCredential
(https://www.pulumi.com/docs/reference/pkg/azure-native/notificationhubs/notificationhub/#apnscredential) with prop
apnsCertificate
is of type
string
. The p12 file provided by Apple is a binary file; is there a text encoding that Pulumi is expecting when setting the value?
I found https://docs.microsoft.com/en-us/rest/api/notificationhubs/create-notification-hub which seems to indicate
base64
encoding. Does this seem right?
View count: 3