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

    agreeable-notebook-99278

    06/22/2022, 8:30 AM
    Hey all, is it possible to rename a stack? Made the mistake calling mine
    azure
    which is hella confusing having
    azure:config1
    azure:config2
    etc… in the Pulumi.yml file
    l
    • 2
    • 2
  • k

    kind-keyboard-17263

    06/22/2022, 11:02 AM
    Hi ! I have a weird behaviour here. If I login by
    pulumi login
    the procedure happens correctly; but if I try to provide a cloud bucket (
    pulumi login gs://<bucket name>
    ) the authentication goes somehow wrong, with a different result, and when I try to run whatever command (eg:
    pulumi preview
    ) I receive a 403 because it thinkgs I am logged in (gcp) with the wrong identity (while it's not true, because I have tested this while also anonymous). I don't understand how the login procedure can be different when passing the bucket (which has already been used with success). Also, when I login without bucket info, the message such that I recognize the proper username, while if I login with gs info, I obtain:
    Logged in to DESKTOP-UOHVP03 as bruno (gs://<bucket name>)
    This is the non working setup (the bruno usernema is totally wrong), while:
    Logged in to <http://pulumi.com|pulumi.com> as xxxx (address)
    is the working one. It looks like the gs option triggers a local version of the authentication. Thanks for help !
    e
    • 2
    • 4
  • l

    little-belgium-31679

    06/22/2022, 11:57 AM
    Pulumi T-shirt Thank you very much. I wear it at least once a week to work. 😀
    🔥 1
    🙌 1
  • c

    cuddly-application-90445

    06/22/2022, 12:05 PM
    I’ve been building my docker image and pushing to an ecr repo using github actions. Is it better to use pulumi for this considering pulumi creates the repo in ecr?
    l
    • 2
    • 3
  • a

    astonishing-dentist-11149

    06/22/2022, 1:33 PM
    Has anyone found good work arounds for pulumi 2 not working on M1 macs? or do I just need to work no getting my stuff updated to 3?
    b
    • 2
    • 1
  • a

    astonishing-dentist-11149

    06/22/2022, 3:13 PM
    I am very new to pulumi. I came from terraform. How do you handle someone deleting a lambda function and your pulumi command now says
    m
    b
    • 3
    • 21
  • m

    microscopic-postman-4756

    06/22/2022, 7:28 PM
    This may be interesting to the community here: Deep dive into control plane architecture - when do you need a separate control plane, what capabilities belong in the control plane vs. the data plane, and critical considerations for the control plane architecture itself: https://docs.thenile.dev/blog/infrastructure-saas
  • a

    able-train-72108

    06/22/2022, 7:47 PM
    Is there a known issue with pulumi cli '3.34.1'? I was with 3.28.0 and I was able to get the Status of my crd RabbitMQCluster, but it is not working anymore since the update. Moreover, I have new warnings: warning: Could not find property 'data' listed in additional secret outputs. warning: Could not find property 'stringData' listed in additional secret outputs. warning: Could not find property 'stringData' listed in additional secret outputs. Why these warnings?
    b
    • 2
    • 3
  • l

    lemon-morning-98620

    06/22/2022, 7:47 PM
    Hi All, I have a requirement to setup AWS EC2 with Pulumi YAML, how can we find available options for YAML? In terraform we get this document https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_host
    b
    • 2
    • 2
  • g

    gentle-piano-13039

    06/22/2022, 8:29 PM
    Hi folks, I'm running into an issue where pulumi is throwing the following error when the default Kubernetes provider isn't used:
    TypeError: Cannot read properties of undefined (reading 'map')
    It seems like other folks are also running into the problem: https://github.com/pulumi/pulumi-kubernetes/issues/2038 Seems recent, any ideas what might be happening?
  • b

    big-magazine-43532

    06/22/2022, 10:24 PM
    Hi everyone! I encrypted a secret using
    pulumi config -s uat --config-file target-accounts/Pulumi.uat.yaml set project:dbPassword value --secret
    . When I run
    pulumi config -s uat --config-file target-accounts/Pulumi.uat.yaml --show-secrets
    the secret is successfully decrypted. However, when someone else (another human and our pipeline) runs the second command they get this error:
    error: failed to decrypt encrypted configuration value 'project:dbPassword': [400] Message authentication failed
    This can occur when a secret is copied from one stack to another. Encryption of secrets is done per-stack and
    it is not possible to share an encrypted configuration value across stacks
    Can anyone suggest what may be wrong?
    b
    • 2
    • 11
  • b

    bored-vase-40478

    06/22/2022, 10:25 PM
    Hi guys! Do you have published Pulumi policies using Github actions or with an automated process? The current Github action is only for stack deployments, not for policies. :thinking-taco: 😛ulumipus-dancing-music:
    b
    • 2
    • 10
  • c

    cuddly-magician-97620

    06/22/2022, 10:25 PM
    Hi All, Trying to use
    retainOnDelete
    as described here., but it gives me
    error TS2345: Argument of type '{ retainOnDelete: boolean; }' is not assignable to parameter of type 'CustomResourceOptions'.
          Object literal may only specify known properties, and 'retainOnDelete' does not exist in type 'CustomResourceOptions'.
    Pulumi v3.34.1 Any idea why?
    b
    • 2
    • 10
  • l

    late-nest-59850

    06/23/2022, 9:39 AM
    Is there any place to watch pulumi webinars afterwords?
  • b

    big-psychiatrist-43588

    06/23/2022, 11:52 AM
    Hello everyone! Do we have an option to remove the stack's project
    l
    • 2
    • 2
  • m

    most-mouse-38002

    06/23/2022, 12:10 PM
    In the event that anyone needs this, I decided to start playing with bridging the Flux terraform provider. The repository is here, if this is a duplicate, let me know and I will remove it. https://github.com/scav/pulumi-flux
    👀 1
    e
    b
    • 3
    • 5
  • a

    ancient-solstice-53934

    06/23/2022, 12:23 PM
    Is there any way to enable Synapse Link in Azure Cosmos DB containers using Pulumi?
  • s

    sparse-intern-71089

    06/23/2022, 12:35 PM
    This message was deleted.
    r
    • 2
    • 1
  • g

    gentle-toddler-99412

    06/23/2022, 12:56 PM
    at work, we want to share some common code across several projects. So we’re interested into knowing if some code modification on some libs has some impacts on some projets using those libs. Is there a generic way to detect such changes in isolation? (testing the output changes (JSON?) of a stack without running it against a real infrastructure - a golden test)? What’s the recommended strategy here? (working on AWS)
  • b

    brainy-ocean-38960

    06/23/2022, 1:16 PM
    Azure Native (c#) - running into odd error while trying to import Machine Learning workspace - {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'eastus' and API version '2016-04-01' for type 'workspaces'. The supported api-versions are '2018-03-01-preview, 2018-11-19, 2019-05-01, 2019-06-01, 2019-10-01, 2019-11-01, 2020-01-01, 2020-02-02, 2020-02-18-preview, 2020-03-01, 2020-04-01, 2020-04-01-preview, 2020-05-01-previe w, 2020-05-15-preview, 2020-06-01, 2020-08-01, 2020-09-01-preview, 2021-01-01, 2021-04-01, 2021-07-01, 2021-10-01, 2021-03-01-preview, 2022-01-01-preview, 2022-02-01-preview, 2022-05-01'. The supported locations are 'canadacentral, centralindia, northcentralus, uksouth, westus, centralus, eastasia, japaneast, japanwest, westus3, jioindiawest, germanywestcentral, switzerlandnorth, uaenor th, southafricanorth, norwayeast, eastus, northeurope, koreacentral, brazilsouth, francecentral, australiaeast, eastus2, westus2, westcentralus, southeastasia, westeurope, southcentralus'."}} - and here is my import command, already updated to latest cli and pulumi nugets - appreciate any suggestions
  • b

    brainy-ocean-38960

    06/23/2022, 1:16 PM
    pulumi import azure-native:machinelearning:Workspace aps-ml-dev /subscriptions/1b63e365-e508-41b2-ab3b-ab9684f04c2e/resourceGroups/aps-ml-dev/providers/Microsoft.MachineLearningServices/workspaces/aps-ml-dev --logtostderr --logflow -v=9 2> out.txt
  • s

    swift-intern-18856

    06/23/2022, 3:33 PM
    Hi all, I’m working on migrating our K8s manifests from being managed by Helm to Pulumi, everything is working great, except I’m having trouble importing the service objects into pulumi without requiring a recreate strategy on the first up. These are just normal cluster ip services, and the only difference that I can tell from the state file is that pulumi wants to remove the actual
    clusterIP
    state. Obviously, this isn’t usually tracked in an IaC template as it’s dynamically set, and so I’m confused why the recreate strategy keeps getting chosen. I’d really like to make this switch over zero downtime, so looking for a solution here, or wondering if anyone else has run into this before. Thanks!
    b
    • 2
    • 13
  • m

    most-mouse-38002

    06/23/2022, 4:24 PM
    I want to access my KUBE_CONFIG while running (AKS created before this method is called). Will this achieve what I want? I need to make sure the env variable is set before I get to the next step where the Kubernetes provider is attempting to talk to the cluster. (Code in comment to avoid spamming).
    b
    • 2
    • 19
  • m

    mysterious-glass-98830

    06/23/2022, 5:27 PM
    Hi community, I am trying to activate Amazon EventBridge notifications to a s3 cube with pulumi, but it does not activate this property, has anyone already faced this problem?
    b
    • 2
    • 13
  • a

    acoustic-spring-42110

    06/23/2022, 6:06 PM
    I'm probably just missing something.. but I have an
    aws.appautoscaling.Target
    , an
    aws.appautoscaling.Policy
    that's set to
    StepScaling
    and a
    aws.cloudwatch.MetricAlarm
    that has its
    alarmActions
    set to the ARN of the policy... pulumi compiles just fine, I see the resources in the stack.. but like.. I DONT see the autoscaling policy attached to the cluster in the AWS console and I'm not totally sure why. I've been staring at this for a couple hours, so I'm just kinda stepping away to clear my head before I jump back to it.
    b
    • 2
    • 9
  • l

    little-book-13693

    06/23/2022, 6:56 PM
    👋 Hi everyone! Could I get some suggestions on this issue? I would like to do:
  • l

    little-book-13693

    06/23/2022, 6:56 PM
    if "my_output_value" in stack_reference.outputs:
  • l

    little-book-13693

    06/23/2022, 6:56 PM
    to determine if i can use the output value , in the case of if a resource has been deployed or not yet.
  • l

    little-book-13693

    06/23/2022, 6:58 PM
    However I get fun, this is an output no dice errors. how do i make that work ? I've already tried : stack_reference.outputs.apply(lambda outputs: [output for output in outputs]) Which works to export the values as an array, but then if i try to match against it, its an output again
  • l

    little-book-13693

    06/23/2022, 7:01 PM
    if "foo" in outputs:
        TypeError: argument of type 'Output' is not iterable
    b
    • 2
    • 12
Powered by Linen
Title
l

little-book-13693

06/23/2022, 7:01 PM
if "foo" in outputs:
    TypeError: argument of type 'Output' is not iterable
b

billowy-army-68599

06/23/2022, 7:10 PM
you are running into the async nature of outputs. Outputs aren't iterable because they haven't resolved yet. You need to do the check inside an `apply`:
stack_reference.output.apply(lambda: i if i // do something
l

little-book-13693

06/23/2022, 7:11 PM
Ok thanks, can i not extract the list of outputs that are currently there ?
b

billowy-army-68599

06/23/2022, 7:12 PM
can you elaborate what you mean by extract?
l

little-book-13693

06/23/2022, 7:13 PM
sure, so this works:
outputs = stack_reference.outputs.apply(lambda outputs: [output for output in outputs])
pulumi.export("outputs", outputs)
it displays the list of output keys
I would now like to check, if a key exists in this list.
like would this work ?
def stack_contains_output(stack_reference, output_name):
    return outputs.apply(lambda outputs: True if output_name in outputs else False)
b

billowy-army-68599

06/23/2022, 7:16 PM
yes basically, if you're inside the
apply
you can treat the object like a standard object because it's now resolved, so you can check however you'd like
l

little-book-13693

06/23/2022, 7:17 PM
Oh nice, yeh it works! thank you!
b

billowy-army-68599

06/23/2022, 7:18 PM
this might help with some additional context: https://leebriggs.co.uk/blog/2021/05/09/pulumi-apply
l

little-book-13693

06/23/2022, 7:19 PM
thanks!
View count: 3