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

    famous-rain-47417

    09/01/2021, 12:14 PM
    Does anybody point me the correct way to set this kind of variable to be used with Python Pulumi code?
  • f

    famous-rain-47417

    09/01/2021, 12:14 PM
    Thanks
    m
    • 2
    • 10
  • m

    modern-belgium-42936

    09/01/2021, 12:25 PM
    I am trying to install the aws and docker resource plugins on a machine that does not have internet access to pulumi (very tight firewall rules). The documentation says that there is a way to install a plugin from a tarball file. Is there a URL I can download the aws and docker plugins from (in tar.gz form) directly?
    b
    • 2
    • 7
  • a

    ancient-night-64850

    09/01/2021, 2:48 PM
    Azure SQL Server created with typescript. Anyone know how to enable this firewall rule?
    b
    • 2
    • 3
  • a

    ancient-night-64850

    09/01/2021, 5:54 PM
    Azure SQL Server created with typescript. Does anyone know how to enable auditing with log analytics?
  • p

    proud-pizza-80589

    09/02/2021, 6:42 AM
    I’m coming back to some multistack management questions, it keeps biting me in the ass so I think i’m doing something wrong: Stack 1: deploys a k8s cluster (gke/eks/aks) -> exports kubeconfig Stack 2: imports the kubeconfig from stack 1 -> makes a provider -> deploys stuff If i change anything in stack 1 that causes the cluster to be recreated (exact case this time, changed a gke clusters amount of nodes)and pressed yes too quickly because it was part of a large changeset) the cluster redeploys, the old one is deleted and the kubeconfig is updated. Any actions in stack 2 fail horribly. Because even though the kubeconfig is replaced, all the deployed k8s resources are trying to work on the old clusters ip address. It is like they store that in their state and not use a refreshed value. Or is it the provider that holds that link, and would exporting the provider be better? As the stacks are quite large on their own, manually the state file is next to impossible to get right, even with scripts. At this point the only way I know I can recover, is delete the stack completely and clean up on the cloud provider myself. Feels like a common thing to happen, so I assume I’m doing it wrong. Any pointers?
    b
    s
    b
    • 4
    • 17
  • n

    numerous-teacher-98063

    09/02/2021, 1:16 PM
    Hey, does anyone know how to install Pulumictl for windows? if there is one?
    b
    b
    • 3
    • 8
  • b

    bumpy-grass-54508

    09/02/2021, 4:11 PM
    Is there a built in function in pulumi that is equivalent to this terraform
    cidrhost
    ? https://www.terraform.io/docs/language/functions/cidrhost.html
    b
    • 2
    • 6
  • b

    bumpy-summer-9075

    09/02/2021, 4:28 PM
    Has anyone ever used
    docker.Image
    with
    digitalocean.ContainerRegistry
    ? The only credentials that registry provides is in docker's format, not username/password :/
  • b

    breezy-piano-61073

    09/02/2021, 6:32 PM
    https://www.pulumi.com/docs/intro/concepts/inputs-outputs/
  • p

    purple-train-14007

    09/02/2021, 7:28 PM
    Anyone here using Github Actions to deploy their code in azure?
  • p

    purple-train-14007

    09/02/2021, 7:29 PM
    I seem to be running into an issue passing secrets to Pulumi to get into the blob storage where my state file is
  • p

    purple-train-14007

    09/02/2021, 7:30 PM
    I get a very convoluted error from Pulumi
    b
    • 2
    • 3
  • f

    future-refrigerator-88869

    09/02/2021, 8:32 PM
    Hi everyone 🙂 I have a question about the EKS, more specifically about deploying an application and its respective ingress. I am using the
    aws load balancer controller
    ,create the
    IngressClass
    and create the ingress itself using
    k8s.networking.v1.Ingress
    . Everything works fine, the load balancer is created, traffic is getting to the instance. However, when I try to expose the ingress URL as a pulumi output, it seems that pulumi doesn't know that it has to wait for the load balancer to be created and it seems like it finishes execution before having access to that load balancer. This is how I am trying to expose it and still doesn't work. The value is empty when exposing it. Anyone has any ideas here ?
    export const ingressUrl = ingress.status.apply(
      (status) => status.loadBalancer.ingress[0].hostname
    );
    b
    c
    • 3
    • 23
  • c

    calm-quill-21760

    09/02/2021, 8:49 PM
    We want to access the AdditionalInstanceConfiguration available in the EC2 Image Builder. It looks like the AWS API supports this, but I’m not seeing any methods in Pulumi to set
    userDataOverride
    . Am I missing something?
    l
    • 2
    • 6
  • b

    breezy-piano-61073

    09/02/2021, 9:50 PM
    alert_policy=newrelic.AlertPolicy("DAI-SHARED-DEV-OPERATIONS-WORKFLOW-CREATED", 
        incident_preference="PER_POLICY",
        name="DAI-SHARED-DEV-OPERATIONS-WORKFLOW-CREATED")
    
    print("alert_policy.id=" + alert_policy.id)
    anyone have any idea why this code snippit gives the following error?
    TypeError: can only concatenate str (not "Output") to str
        error: an unhandled error occurred: Program exited with non-zero exit code: 1
    The AlertPolicy is created, but I cannot access the alert_policy.id in python.
    b
    • 2
    • 12
  • m

    modern-belgium-42936

    09/02/2021, 11:04 PM
    Trying to import infrastructure that we already deployed prior to adopting pulumi and I am having trouble importing a few ec2's. Here is the command I am running that should generate the ts file to do the final import:
    pulumi import aws:ec2/instance:Instance github-runner-1 <instance-id>
    I am met with the error:
    Previewing import (dev)
    
    View Live: <https://app.pulumi.com/lwooden/github-runners/dev/previews/d953777e-c02b-4d34-8718-8382479da9e1>
    
         Type                 Name                Plan       Info
     +   pulumi:pulumi:Stack  github-runners-dev  create     1 error
     =   └─ aws:ec2:Instance  github-runner-1     import     4 errors
     
    Diagnostics:
      pulumi:pulumi:Stack (github-runners-dev):
        error: preview failed
     
      aws:ec2:Instance (github-runner-1):
        error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "launch_template": one of `ami,instance_type,launch_template` must be specified. Examine values at 'Instance.LaunchTemplate'.
        error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "ami": one of `ami,launch_template` must be specified. Examine values at 'Instance.Ami'.
        error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "instance_type": one of `instance_type,launch_template` must be specified. Examine values at 'Instance.InstanceType'.
        error: Preview failed: one or more inputs failed to validate
    Doing a describe instance via the aws cli clearly shows that all of the above fields (ami, instance_type, etc) exists for this resources so I am at a lost as to why pulumi is having issue picking them up 😞 Any pointers would be great. I've exhausted the documentation and have spent hours on this
    l
    n
    g
    • 4
    • 10
  • g

    green-london-75893

    09/03/2021, 7:17 AM
    Hi, Guys, I find it is a bit difficult to use terraform-bridge, may be we can create a new channel to discuss issues about terraform-bridge.
    l
    • 2
    • 3
  • g

    green-london-75893

    09/03/2021, 7:18 AM
    https://github.com/pulumi/pulumi-tf-provider-boilerplate#rea
  • g

    green-london-75893

    09/03/2021, 7:21 AM
    I tried to migrate
    tencentcloudstack/terraform-provider-tencentcloud
    to pulumi according to the documentation, but I got an error in the build phase, can't find what the problem is and don't know how to deal with it. https://github.com/tencentcloudstack/terraform-provider-tencentcloud
  • g

    green-london-75893

    09/03/2021, 7:22 AM
    ➜  pulumi-tencentcloud git:(master) ✗ make build_sdks            
    [ -x /Users/arron/works/tools/homebrew/bin/pulumi ] || curl -fsSL <https://get.pulumi.com> | sh
    pulumi plugin install resource random 2.2.0
    (cd provider && go build -a -o /Users/arron/works/codes/go/src/github.com/pulumi/pulumi-tencentcloud/bin/pulumi-tfgen-tencentcloud -ldflags "-X <http://github.com/pulumi/pulumi-tencentcloud/provider/pkg/version.Version=0.0.1-alpha.1623235147+2e15515f.dirty|github.com/pulumi/pulumi-tencentcloud/provider/pkg/version.Version=0.0.1-alpha.1623235147+2e15515f.dirty>" <http://github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud)|github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud)>
    resources.go:24:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>
    cmd/pulumi-tfgen-tencentcloud/main.go:18:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud|github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud|github.com/pulumi/pulumi-tencentcloud/provider/cmd/pulumi-tfgen-tencentcloud>
    resources.go:25:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>
    resources.go:26:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v1|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v1> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>
    resources.go:27:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource|github.com/pulumi/pulumi/sdk/v3/go/common/resource> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>
    resources.go:28:2: missing go.sum entry for module providing package <http://github.com/pulumi/pulumi/sdk/v3/go/common/tokens|github.com/pulumi/pulumi/sdk/v3/go/common/tokens> (imported by <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>); to add:
            go get <http://github.com/pulumi/pulumi-tencentcloud/provider|github.com/pulumi/pulumi-tencentcloud/provider>
    make: *** [tfgen] Error 1
    b
    • 2
    • 2
  • b

    big-potato-91793

    09/03/2021, 2:46 PM
    Quick question, I still have on stack that try to delete something and recreate it. I can’t delete using pulumi state delete or pulumi refresh. Pulumi always saying me that he try to delete something from the previous deployment
    l
    • 2
    • 4
  • h

    hallowed-teacher-48474

    09/03/2021, 3:16 PM
    Good Morning/Afternoon everyone!, 👋 quick question have anyone created united tests for Python using pytest, that is open to kindly share how that was done. When we use it we get a lot of warnings and also we like to disable sockets during tests executions (to play safe), but apparently the Pulumi sdk needs to connect to the net to perform some validations so test fails when we disable sockets 😞.
  • c

    calm-printer-30863

    09/03/2021, 4:50 PM
    Hello everyone.. Quick question. I am using Pulumi to setup New Relic Alert Conditions. and I am facing the following issue:
    error: newrelic:index/nrqlAlertCondition:NrqlAlertCondition resource '[P2][TESTCOND][PULUMI]' has a problem: Attribute must be a whole number, got 1511617. Examine values at 'NrqlAlertCondition.PolicyId'.
    b
    • 2
    • 1
  • c

    calm-printer-30863

    09/03/2021, 4:51 PM
    seems its returning the policy id with an "." appended. Seems like a bug..
  • b

    brave-afternoon-91593

    09/03/2021, 8:29 PM
    👋 I’m trying to use the tf-provider-boilerplate to implement a Pulumi TF Package. My TF Provider uses the terraform-sdk v2, whereas the boilerplate uses v1. Is there a way to bridge a Terraform SDK v2 provider?
    b
    • 2
    • 8
  • b

    bulky-policeman-29913

    09/04/2021, 12:30 AM
    Is anyone aware of a way to make pulumi always replace a given resource in your stack. In my case a Digital Ocean droplet, I don't ever want an update in place.
    s
    b
    • 3
    • 10
  • m

    miniature-shoe-76615

    09/05/2021, 8:57 AM
    Hi, it's possible to use different docker implementations like
    podman
    or
    kanilo
    ? It's really annoying to have pulumi ran in containized environment without DIND privilidege Hi, is it possible to specify
    l
    • 2
    • 5
  • e

    echoing-vase-56822

    09/05/2021, 8:05 PM
    hey, I have a stack with over 100 ressources (mostly k8s stuff) .
    pulumi up --yes
    without any changes takes around 2-5min, which is not acceptable. Im trying to debug the performance with
    pulumi up --tracing=file:./trace --yes
    . The resulting file is 170mb in size. When using
    PULUMI_DEBUG_COMMANDS=1 pulumi view-trace trace
    the UI is very bugy displaying all the traces. Then I tried
    docker run -d --name jaeger -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 -p 16686:16686 -p 9411:9411 jaegertracing/all-in-one:1.22
    and
    pulumi up --yes --tracing=<http://localhost:9411/api/v1/spans>
    but according to
    sudo tcpdump -i any port  9411
    pulumi is not sending any traffic to port 9411 (
    curl localhost:9411
    shows traffic). 1.) Whats wrong with http tracing? 2.) Is this performance expected?
    b
    h
    +2
    • 5
    • 14
  • b

    boundless-angle-56560

    09/06/2021, 3:34 PM
    Hi, I am trying to apply some Kubernetes CRDs via Pulumi but it seems Pulumi doesnt like my CRD definition, I am getting following error
    p
    b
    • 3
    • 49
Powered by Linen
Title
b

boundless-angle-56560

09/06/2021, 3:34 PM
Hi, I am trying to apply some Kubernetes CRDs via Pulumi but it seems Pulumi doesnt like my CRD definition, I am getting following error
Is this some known Pulumi issue ? It seems that the CRD itself looks fine
p

prehistoric-activity-61023

09/06/2021, 5:02 PM
Can you share some code? As far as I remember I didn’t have any issues with CRDs in pulumi but it was some time ago.
b

billowy-army-68599

09/06/2021, 5:10 PM
@boundless-angle-56560 does your crd have an Empty status map at the end of it ?
p

prehistoric-activity-61023

09/06/2021, 5:22 PM
@billowy-army-68599 I guess you’re thinking about:
# Workaround: <https://github.com/pulumi/pulumi-kubernetes/issues/800>
def remove_status(obj, _):
    if obj["kind"] == "CustomResourceDefinition":
        del obj["status"]
(that’s a copy&paste from one of my projects) If so, I was thinking about it but the message doesn’t seem to fit that case.
b

billowy-army-68599

09/06/2021, 5:25 PM
Yes that’s the one
b

boundless-angle-56560

09/06/2021, 8:35 PM
the CRD looks like this:
apiVersion: <http://apiextensions.k8s.io/v1|apiextensions.k8s.io/v1>
kind: CustomResourceDefinition
metadata:
name: manifests.akash.network
spec:
group: akash.network
scope: Namespaced
names:
plural: manifests
singular: manifest
kind: Manifest
shortNames:
- mani
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
lease_id:
type: object
properties:
owner:
type: string
dseq:
type: string
format: uint64
gseq:
type: integer
oseq:
type: integer
provider:
type: string
group:
type: object
properties:
name:
type: string
services:
type: array
items:
type: object
properties:
name:
type: string
image:
type: string
args:
type: array
items:
type: string
env:
type: array
items:
type: string
unit:
type: object
properties:
cpu:
type: number
format: uint32
memory:
type: string
format: uint64
storage:
type: string
format: uint64
count:
type: number
format: uint64
expose:
type: array
items:
type: object
properties:
port:
type: integer
format: uint16
external_port:
type: integer
format: uint16
proto:
type: string
service:
type: string
global:
type: boolean
hosts:
type: array
items:
type: string
@billowy-army-68599 @prehistoric-activity-61023 ^
b

billowy-army-68599

09/06/2021, 9:02 PM
how are you applying it? can you share your python code
p

prehistoric-activity-61023

09/07/2021, 7:18 AM
python code would be nice; plus attach it as a snippet so it’s more readable and easier to download (shortcuts/lighting icon -> “Create a text snippet”)
b

boundless-angle-56560

09/07/2021, 12:24 PM
Untitled
here, @billowy-army-68599 @prehistoric-activity-61023 sorry for late reply
p

prehistoric-activity-61023

09/07/2021, 12:59 PM
I tried that on my cluster and it worked just fine (and created appropriate CRD).
❯ pip freeze | grep pulumi-
pulumi-cloudflare==3.3.0
pulumi-gcp==5.11.0
pulumi-kubernetes==3.5.0
pulumi-random==4.2.0
just in case it’s an issue with some particular
pulumi-kubernetes
version
tested on pulumi 3.7.0
b

boundless-angle-56560

09/07/2021, 1:10 PM
I'll check my versions
p

prehistoric-activity-61023

09/07/2021, 1:11 PM
same with latest versions (pulumi 3.11.0 and kubernetes 3.7.0)
b

boundless-angle-56560

09/07/2021, 1:13 PM
Untitled
I'll try to update pulumi-kubernete
Untitled
now on 3.7.0 but the issue persist 😕
Untitled
p

prehistoric-activity-61023

09/07/2021, 1:21 PM
how about
pip freeze | grep pulumi
?
I can see you’re using python39 (I tested on python38) but I don’t think that should be the issue
+ can you share the full error stacktrace as a snippet?
b

boundless-angle-56560

09/07/2021, 1:22 PM
Untitled
Untitled
p

prehistoric-activity-61023

09/07/2021, 1:23 PM
pip install --upgrade pulumi
b

boundless-angle-56560

09/07/2021, 1:24 PM
ok issue is gone
🙂
for some reason I though that when I am upgrading pulumi I just run the sh installer and I am done
p

prehistoric-activity-61023

09/07/2021, 1:25 PM
the thing is that, you have an additional python dependency there as well
b

boundless-angle-56560

09/07/2021, 1:25 PM
and the installer is not triggering upgrades of pip dependencies ?
p

prehistoric-activity-61023

09/07/2021, 1:25 PM
I don’t have any pieces of advice yet regarding how to deal with that
It does not. You have to manually upgrade that.
b

boundless-angle-56560

09/07/2021, 1:26 PM
ok, at least I know now for the next time 🙂
p

prehistoric-activity-61023

09/07/2021, 1:26 PM
I assume you’re already using some
requirements.txt
file so just make sure you use pinned versions there.
although now I’m thinking we should ensure that these versions match 🤔
b

boundless-angle-56560

09/07/2021, 1:27 PM
I think this is a common problem in the python world
p

prehistoric-activity-61023

09/07/2021, 1:27 PM
If that assumption is true, it would be nice to compare pulumi version with python lib version while doing
pulumi up
for example
b

boundless-angle-56560

09/07/2021, 1:28 PM
yeah, I mean, any kind of intelligent check that would intelligently point user that he should check his versions would be helpful
p

prehistoric-activity-61023

09/07/2021, 1:28 PM
I think this is a common problem in the python world
I wouldn’t say so. There’s an interesting approach here used in pulumi where you have CLI tool (pulumi binary) as well as some programming lang environment (e.g. python but it might be js as well) and these two pieces must communicate with each other.
in other words: pulumi cli runs python environment that uses pulumi python module
b

boundless-angle-56560

09/07/2021, 1:30 PM
understood
p

prehistoric-activity-61023

09/07/2021, 1:31 PM
I’d need to read more on the low-level pulumi architecture to give you some more details but basically I assume that’s how it must be designed 😉
Pulumi cli can use different languages (python, golang, javascript and c# if I remember well) so there must be some communication-bridge between pulumi-cli and your python project (that’s why you need
pulumi
as python dependency). If it’s possible to have “version conflicts”, we should have some warning/error while trying to run it 🤔 . If you take a look at the traceback, it’s quite hard for an inexperienced person to understand anything from it. @billowy-army-68599 Maybe you can follow up? Did I get it right and if so, are there any plans to add some additional version assertions?
b

billowy-army-68599

09/07/2021, 6:33 PM
No that’s absolutely right!
View count: 2