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

    bitter-application-91815

    03/23/2021, 6:53 PM
    Hey folks, I'm attempting to recycle the username and password on a RDS cluster here, but when it does pulumi is attempting to create the db from scratch and then fails due to the DB already existing
  • b

    bitter-application-91815

    03/23/2021, 6:53 PM
    is there anyway around this
    b
    b
    • 3
    • 6
  • g

    green-musician-49057

    03/23/2021, 7:18 PM
    Hello everyone 👋 New Pulumi customer here. Loving the toolkit so far.
    ❤️ 3
  • w

    white-balloon-205

    03/23/2021, 8:24 PM
    [EDIT: Corrected timing - the link below is also correct] I'll be hosting an office hours today at 4PM PDT / 10 AM AEDT / 11PM GMT. Feel free to stop by! https://pulumi-community.slack.com/archives/C0110AVM89Z/p1616490643005300
    👍 1
  • s

    strong-fall-61174

    03/23/2021, 10:02 PM
    How long does the Pulumi CLI cache new project(s), I was creating a new project - it failed with a permissions error (I'll ask about that separately). After I wiped out the directory, the CLI is still telling me there's already a project created with that name.
    l
    • 2
    • 10
  • a

    average-businessperson-33238

    03/24/2021, 6:22 AM
    Hi! Yesterday I started using Pulumi, followed the workshop. I really like it so far! Planning on migrating all my Terraform plans to Pulumi.
    🙏 2
    👍 2
    ❤️ 2
    🎉 3
  • l

    limited-rainbow-51650

    03/24/2021, 9:30 AM
    Bumping into a problem with
    Promise leak detected
    . I have my subclass of ComponentResource for a certain k8s abstraction, containing 2 resources. I pass the
    args
    unchanged to the second resource. As a bug in my code, I forgot to pass
    args.metadata
    to the first of my contained resources, mainly to have the correct k8s namespace for this resource as well. But after passing the metadata, I get the
    Promise leak detected
    . Below is a summary of my component:
    export class Service extends pulumi.ComponentResource {
    
        constructor(name: string, args: kubernetes.core.v1.ServiceArgs, opts?: pulumi.ComponentResourceOptions) {
          super("ng:kubernetes:core:Service", name, {}, opts);
      
          this.backendcfg = new backendconfig.cloud.v1.BackendConfig(
            `${name}-backendconfig`,
            {
              metadata: args.metadata,
              ...
            },
            {
              parent: this,
            }
          )
      
          this.service = new kubernetes.core.v1.Service(
            name,
            args,
            ...
          );
      
      }
    b
    • 2
    • 2
  • a

    adorable-musician-67025

    03/24/2021, 10:12 AM
    Hey, what about importing resources created with custom resource providers? According to this GH issue: https://github.com/pulumi/pulumi/issues/3550#issuecomment-557216373 it's still a problem?
    🤯 1
  • p

    prehistoric-kite-30979

    03/24/2021, 12:07 PM
    Hi all, I'm seeing issues with 403s while installing plugins (looks like S3 permissions on Pulumi's end). I've opened up an issue https://github.com/pulumi/pulumi/issues/6610.
    b
    p
    • 3
    • 24
  • b

    bumpy-agent-19616

    03/24/2021, 3:04 PM
    Hi, we use Pulumi a lot at our organisation and feel quite useful and interesting. Now that we thought we could take advantage of Pulumi Kubernetes Operator and drive stacks backed by Pulumi self-managed backend hosted on Azure Blob storage. When we try to update an existing stack from a repo, we get *unable to open bucket azblob://*****: azureblob.OpenBucket: accountName is required* as we couldn't get AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY environment variables during stack update. Does anyone know how to make these env variables available before or when operator tries to select the existing stack and update the stack?
    • 1
    • 2
  • i

    icy-dress-83371

    03/24/2021, 3:31 PM
    Hi all, I have a question, and I think it is an easy one, and that I am just being very dumb. I have tried a few different little projects. I am just using
    pulumi login --local
    . These two projects are in different folders, with different yaml files. Each had their own stack created, but when I say
    pulumi stack ls
    in one of the projects folders, I seem to get both stacks accross multiple projects. I noticed this only because I tried to name the stack in both projects "dev". Am I doing something wrong here, or is this a byproduct of using local login or something?
    m
    b
    • 3
    • 23
  • c

    clever-plumber-29709

    03/24/2021, 4:26 PM
    question, the https://www.pulumi.com/pricing/ plan comparasion, says that starter plan has "Up to 20 Project stacks" Does this means that a single project can have maximum 20 stacks, or that across all projects we can have maximum 20 stacks? Also on the free plan this is not specified, does the same limit applies or another?
    b
    g
    l
    • 4
    • 3
  • f

    few-tent-80031

    03/24/2021, 4:58 PM
    Hello everybody, I have a question about pulumi output. In my project, I am deploying infrastructure on AWS. I want to use "address" output from RDS instance, and use that as environment variable for ecs container definition. However, it seems that I cannot extract string from address output.
    s
    w
    • 3
    • 3
  • f

    few-tent-80031

    03/24/2021, 4:59 PM
    I've tried to do something like this master.address.apply(lambda ad: "{ad}") but it's not working. I'am using Python
  • f

    few-tent-80031

    03/24/2021, 4:59 PM
    Can you guys help me?
  • o

    orange-secretary-87364

    03/24/2021, 6:46 PM
    Hey, I've run in to an issue where I can't see one of my stacks with
    pulumi stack ls
    unless
    PULUMI_CONFIG_PASSPHRASE
    is set, I'm using the s3 backend and the passphrase secrets provider. Output of
    pulumi --logtostderr -v5 stack ls
    below:
    I0324 18:37:18.745036   38931 backend.go:859] error reading stack: staging (decrypting secret value: failed to decrypt: incorrect passphrase, please set PULUMI_CONFIG_PASSPHRASE to the correct passphrase) skipping
    NAME         LAST UPDATE  RESOURCE COUNT
    management*  3 weeks ago  32
    Does anyone have any ideas? I can't
    pulumi up
    right now because there's a reference to the staging stack and the passphrase is different 😅
  • w

    worried-knife-31967

    03/24/2021, 7:08 PM
    yeah, I came across this... your passphrases need to be the same for the stack references to work.
    o
    • 2
    • 2
  • t

    tall-shoe-66375

    03/24/2021, 7:33 PM
    Helllo I have an error with GCP
    error: gcp:container/cluster:Cluster resource 'cluster_infratotal' has a problem: Computed attribute cannot be set
  • b

    brave-planet-10645

    03/25/2021, 9:51 AM
    https://pulumi-community.slack.com/archives/C0110AVM89Z/p1616665891007800
  • s

    steep-beard-51215

    03/25/2021, 10:27 AM
    Hello, I am really puzzled by the kubernetes provider. I am trying to deploy Traefik using the helm chart in Go. The namespace is not created automatically, so I am creating it and throwing a DependsOn ResourceOption. What I have noticed is that not all resources are created in the namespace: the Service isn’t. Could it be because they are using the new List kind?
    # Source: traefik/templates/service.yaml
    apiVersion: v1
    kind: List
    items:
      - apiVersion: v1
        kind: Service
        metadata:
          name: traefik
          labels:
            <http://app.kubernetes.io/name|app.kubernetes.io/name>: traefik
            <http://helm.sh/chart|helm.sh/chart>: traefik-9.18.0
            <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
            <http://app.kubernetes.io/instance|app.kubernetes.io/instance>: traefik
          annotations:
        spec:
          type: LoadBalancer
          selector:
            <http://app.kubernetes.io/name|app.kubernetes.io/name>: traefik
            <http://app.kubernetes.io/instance|app.kubernetes.io/instance>: traefik
          ports:
          - port: 80
            name: web
            targetPort: "web"
            protocol: "TCP"
          - port: 443
            name: websecure
            targetPort: "websecure"
            protocol: "TCP"
    w
    • 2
    • 2
  • d

    damp-school-17708

    03/25/2021, 12:03 PM
    Hello, I am not sure what happened but one of our stacks is gone. I was wondering if there's a way to recover it from the backups (We use S3 as backend for state) I've downloaded the file but the import command doesn't work
    error: could not deserialize deployment: unexpected end of JSON input
    a
    o
    • 3
    • 7
  • a

    adorable-musician-67025

    03/25/2021, 1:27 PM
    Yet another interesting case 🙂
  • a

    adorable-musician-67025

    03/25/2021, 1:28 PM
    trying to remove resource which does have child one, it says remove child at first, but when trying to do that it says it doesn't exist 🙂
  • a

    adorable-musician-67025

    03/25/2021, 1:37 PM
  • b

    bumpy-laptop-30846

    03/25/2021, 1:48 PM
    Hi, My token expired during a pulumi up and it failed. Then my eks cluster got created but pulumi did not see it. I did a refresh, which complains so I remove the eks creating from stack export. And do a stack import. Now the stack does not have knowledge of the eks cluster. So when I do a pulumi up, this fails because the cluster has already been created. What can I do from there to have a successful pulumi up? And did I do something wrong when removing the ongoing operation in the export. Should I have changed it to ‘created’?
    👀 1
  • l

    loud-helicopter-75345

    03/25/2021, 2:02 PM
    Hi so switching to a local backend seems quite simple:
    pulumi login --local
    However I'm unclear on how to switch back again as this doesn't seem as simple. I'm currently at:
    pulumi logout; pulumi login
    Manage your Pulumi stacks by logging in.
    Run `pulumi login --help` for alternative login options.
    Enter your access token from <https://app.pulumi.com/account/tokens>
        or hit <ENTER> to log in using your browser                   :
    Open the browser, login to pulumi.com, create a new token, paste it into the terminal. I already have a login and token so why is this needed? Is there something as simple as switching to a local backend? e.g.
    pulumi login --standard
    👀 1
    b
    a
    • 3
    • 9
  • t

    tall-shoe-66375

    03/25/2021, 2:17 PM
    Hello, has pulumi the management for ClusterIssuer on Kubernetes ?
    b
    l
    • 3
    • 47
  • h

    hundreds-mouse-62204

    03/25/2021, 2:25 PM
    Hello guys! I am new to Pulumi, and I want to understand the best approach to tackle my use case, Currently I have an IAM project with 10 stacks, and there is an automation for applying the changes that are made there. each change in the project leads to 7 minutes that the cloud build runs because it going over each stack by order. - Which is a lot of time for updating permissions A suggestion came up in my team to merge all the stacks to 1 file, so the "pulumi up" will supposedly run only once, and by that the apply time will shorten Is that possible? And is there a better approach to that?
    m
    • 2
    • 2
  • t

    tall-shoe-66375

    03/25/2021, 2:53 PM
    Hello, I have an issue trying to import a DB Instance from GCP
    pulumi import gcp:sql/databaseInstance:DatabaseInstance db_instance projects/mystical-moon-307818/instances/prod-mysql
    Error
    gcp:sql:DatabaseInstance (db_instance):
        error: gcp:sql/databaseInstance:DatabaseInstance resource 'db_instance' has a problem: AtLeastOne: "settings": one of `clone,settings` must be specified
        error: gcp:sql/databaseInstance:DatabaseInstance resource 'db_instance' has a problem: AtLeastOne: "clone": one of `clone,settings` must be specified
        error: Preview failed: one or more inputs failed to validate
    b
    • 2
    • 4
  • a

    agreeable-ram-97887

    03/25/2021, 5:12 PM
    Has anyone used
    pulumi up
    /
    pulumi preview
    in a gitlab CICD script with docker resources? If so would you mind sharing how you've configured your pipeline? Or at least giving some hint about the "right" way to do it. When I try this myself, I unfortunately keep getting the error
    FileNotFoundError: [Errno 2] No such file or directory: 'docker': 'docker'
    , and I'm not sure what to make of that 🤔
    b
    w
    • 3
    • 11
Powered by Linen
Title
a

agreeable-ram-97887

03/25/2021, 5:12 PM
Has anyone used
pulumi up
/
pulumi preview
in a gitlab CICD script with docker resources? If so would you mind sharing how you've configured your pipeline? Or at least giving some hint about the "right" way to do it. When I try this myself, I unfortunately keep getting the error
FileNotFoundError: [Errno 2] No such file or directory: 'docker': 'docker'
, and I'm not sure what to make of that 🤔
b

billowy-army-68599

03/25/2021, 5:14 PM
can you share what you have?
a

agreeable-ram-97887

03/25/2021, 5:35 PM
after cleaning it up a little bit, this is basically what I'm working with:
image: python:3.7.9-buster
before_script:
  - apt-get update -y
  - apt-get install sudo -y
  - python3 -m venv infra/venv
  - infra/venv/bin/python -m pip install --upgrade pip setuptools wheel
  - infra/venv/bin/python -m pip install -r infra/requirements.txt
  - bash ./pulumiSetup/setup.sh

stages:
  - preview
  - deploy

pulumi-preview:
  stage: preview
  services:
    - docker:dind
  script:
    - bash ./pulumiSetup/pulumi-preview.sh

pulumi-deploy:
  stage: deploy
  services:
    - docker:dind
  script:
    - bash ./pulumiSetup/pulumi-up.sh
  only:
    - master
the scripts
pulumiSetup/setup.sh
is like this:
#!/bin/bash

# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x

# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y

curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN

# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login

curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
and the script 
pulumiSetup/pulumi-preview.sh
 is like this:
#!/bin/bash

# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x

# Add the pulumi CLI to the PATH
export PATH=$PATH:$HOME/.pulumi/bin

# AWS creds here - variables with $ to be set on gitlab var env
aws configure set default.region '$AWS_DEFAULT_REGION'
aws configure set aws_access_key_id '$AWS_ACCESS_KEY_ID'
aws configure set aws_secret_access_key '$AWS_SECRET_ACCESS_KEY'

echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY

pulumi stack select accure1/dev --cwd "/builds/accure1/code/el/corvus/infra/"

# preview configuration before deployment
pulumi preview --cwd "/builds/accure1/code/el/corvus/infra/"
b

billowy-army-68599

03/25/2021, 5:41 PM
are you provisioning docker containers, I can't see where you're referencing docker anywhere so no idea where that file not found is coming from
w

white-secretary-18260

03/25/2021, 5:42 PM
If your pulumi script is building docker container, you will need to make sure your build containers have docker installed.
docker in docker,
yes.
in our build container we install it in our
Dockerfile
with:
# SETUP DOCKER
RUN curl -fsSL <https://get.docker.com> -o get-docker.sh
RUN sudo sh get-docker.sh
RUN sudo service docker start
depending on the base image your build container uses you may have to install
sudo
RUN apt-get install sudo -y
a

agreeable-ram-97887

03/25/2021, 6:37 PM
thanks @white-secretary-18260 for that suggestion (in hindsight it was pretty obvious 🤦), it seems to have gotten me past the previous error. But now the pipelines hangs in the
pulumi preview
call 🤔 . Any ideas? Btw, the new
pulumiSetup/setup.sh
script that im using is (note the additional install docker lines):
#!/bin/bash

# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x

# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y

# SETUP DOCKER
curl -fsSL <https://get.docker.com> -o get-docker.sh
sudo sh get-docker.sh
sudo service docker start

# INSTALL PULUMI
curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN

# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login

curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
w

white-secretary-18260

03/25/2021, 6:49 PM
I’d throw
--verbose 999
on there and see what it brings.
a

agreeable-ram-97887

03/25/2021, 7:27 PM
apparently it wasn't hanging, but just took over 30 minutes to do the
pulumi preview
. I'm running it again now with the increased verbosity, so hopefully will have some more info soon. But anyway I guess I'll need to implement some sort of caching of the image getting built
👍 1
View count: 1