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
python
  • s

    stale-hamburger-8953

    04/28/2021, 3:26 PM
    hey everyone
  • s

    stale-hamburger-8953

    04/28/2021, 3:27 PM
    is there any solid plan for aws crosswalk on python
    b
    • 2
    • 1
  • s

    stale-hamburger-8953

    04/28/2021, 3:28 PM
    the existing python tooling on pulumi made our company talking about "second platform effect" for last two weeks 🙂 it seems a bit forgotten/broken vs its typescript counterpart
    e
    • 2
    • 13
  • s

    shy-author-33795

    04/28/2021, 5:42 PM
    I'm having a hard time getting my pulumi program to recognized that I have
    pulumi_docker
    installed on my system. I have the following in my programs requirements.txt:
    pulumi>=3.0.0,<4.0.0
    pulumi_docker>=3.0.0,<4.0.0
    pulumi-aws>=4.0.0,<5.0.0
    pylint>=2.7.4
    And at the top of my program's main.py I have:
    from pulumi_aws import ecr
    from pulumi_docker import Image, DockerBuild
    I'm not sure why
    pulumi_aws
    works, but
    pulumi_docker
    does not. Any chance you all could help resolve this error:
    ModuleNotFoundError: No module named 'pulumi_docker'
    b
    • 2
    • 13
  • s

    shy-author-33795

    04/28/2021, 11:38 PM
    I'm following along with these instructions and have a few questions...
    r
    • 2
    • 9
  • b

    better-actor-92669

    04/29/2021, 9:08 AM
    Hello guys! Due to this issue https://github.com/pulumi/pulumi-kubernetes/issues/800 I have to use a transformation below to install helm charts' CRDS
    def remove_crds_status(obj):
        if obj["kind"] == "CustomResourceDefinition" and "status" in obj:
            del obj["status"]
    or TypeError is raised
    TypeError: _internal_init() got an unexpected keyword argument 'status'
    However, after I upgraded to Pulumi 3.0, remove_crds_status() transformation raises an exception
    AssertionError: Unexpected type. Expected 'dict' got 'typing.Union[pulumi_kubernetes.apiextensions.v1._inputs.JSONSchemaPropsArgs, bool, typing.Awaitable[typing.Union[pulumi_kubernetes.apiextensions.v1._inputs.JSONSchemaPropsArgs, bool]], pulumi.output.Output[~T], NoneType]'
    Can you please help me find a workaround?
    m
    • 2
    • 3
  • b

    boundless-angle-56560

    04/29/2021, 1:39 PM
    Hi, is it possible to to provision k8s EKS cluster and deploy some config in a single pulumi run? It seems it is possible in typescript according to the following example, I am wondering if it is possible to achieve it in python
    b
    b
    • 3
    • 27
  • b

    broad-hairdresser-1495

    04/30/2021, 3:57 PM
    Hi, When using
    pulumi.export()
    is it possible to use that output to a variable and use this data later in the code?
    my_volumeID = pulumi.export('volume_ID', volume.id)
    or is it just for output?
    b
    r
    • 3
    • 7
  • g

    gorgeous-minister-41131

    04/30/2021, 11:27 PM
    Been using Pulumi w/ Python for awhile. Finally decided to join the community here on the Slack chan. I’m trying to figure out how to use an Output.concat as a key for a dictionary that is passed in as the
    tags
    attr for a resource Input.
    s
    r
    • 3
    • 29
  • g

    gorgeous-minister-41131

    04/30/2021, 11:33 PM
    Also, been using pulumi w/ Python since last October and I have to say… the entire asyncio stuff is god awful, unwieldly and difficult to wrap ones head around. Pretty sure this is due to python’s syntax not lending itself to async being a 1st class citizen, but lambda hell is a thing… 😂
  • g

    gorgeous-minister-41131

    05/01/2021, 12:40 AM
    ^ I gave up and wrapped the entire resource creation in a callback by running
    pulumi.Output.all().apply
    against all the needed things. It’s probably the right way to do it anyway, but kinda sucks that you can’t use an Output as a key in a dict. Ah well
  • g

    gorgeous-minister-41131

    05/01/2021, 12:41 AM
  • g

    gorgeous-minister-41131

    05/01/2021, 12:41 AM
    goes against this recommendation, but I’ve been doing this all over in pulumi and it’s seemed to work thusfar
  • g

    gorgeous-minister-41131

    05/01/2021, 12:42 AM
    🤷
  • g

    gorgeous-minister-41131

    05/01/2021, 12:44 AM
    Untitled
  • g

    gorgeous-minister-41131

    05/01/2021, 12:44 AM
    gets me the result I need..
  • g

    gorgeous-minister-41131

    05/01/2021, 12:45 AM
    [provider=urn:pulumi:ci::aws-eks-py::pulumi:providers:aws::default_3_29_1::2776aba7-a0b0-49a2-819d-f85a5bc29e7a]
          ~ tags: {
              + <http://kubernetes.io/cluster/eks-model-mink|kubernetes.io/cluster/eks-model-mink>: "owned"
            }
        ~ aws:ec2/subnet:Subnet: (update)
  • g

    gorgeous-minister-41131

    05/01/2021, 12:45 AM
    🙂
  • m

    modern-animal-54928

    05/02/2021, 4:13 AM
    Hello everybody. I am fairly new to Pulumi and like many before I have some issues with Output... I understand the need to have something that will be replaced by the real value at runtime but I am facing some issue in my code to.... I have tried many stuffs using apply but I thing I am just using them badly.... Here is a snippet of what I am trying to acheive (in GCP)
    userProject = organizations.Project("Foo",                                      
                                         billing_account="XXXXXXX",                    
                                         folder_id="YYYYYYY",                          
                                         project_id="Foo",                             
                                         auto_create_network="false")                  
    projects.Service(userProject.project_id,                                           
                       disable_dependent_services=True,                                
                       project=userProject.project_id                                  
                       service=i"<http://cloudapis.googleapis.com|cloudapis.googleapis.com>")
    As you can see I am trying to get te project_id of the project that I have just created... Can you explain me how acheive that ? My code is a bit more complicated with some concatenations between Outputs and str but I think I am clearly missing the point how to extract the value from Output Thanks
    r
    s
    • 3
    • 8
  • m

    modern-animal-54928

    05/03/2021, 1:35 PM
    I guess there is something in the Pulumi flow that I don't get : I am trying to create some file on the computer that is running Pulumi. But I have the feeling that the file is created at the preview and again during the real execution
  • m

    modern-animal-54928

    05/03/2021, 1:35 PM
    is it the case ?
    b
    • 2
    • 1
  • e

    early-rose-86563

    05/03/2021, 8:18 PM
    Hello, all! Is this an appropriate channel for a major `pulumi up`/Python/AWS problem I’m having after having upgraded
    pulumi-aws
    from 2.13.0 to 4.1.0 ? My stacks will no longer update, even if I destroy/delete them first, and I get a long list of generic exceptions with “IndexError: list index out of range” at the end. Problem is regardless of which resource(s) are in a stack,
    r
    m
    • 3
    • 9
  • g

    gorgeous-minister-41131

    05/03/2021, 9:14 PM
    ^ In re : I think this is what I was going for https://github.com/pulumi/pulumi/issues/4834 @red-match-15116 just to clarify 🙂
  • g

    gorgeous-minister-41131

    05/03/2021, 9:15 PM
    haha, same thing I was asking
  • f

    fresh-hospital-81544

    05/04/2021, 12:17 AM
    https://www.pulumi.com/docs/reference/pkg/aws/acm/certificatevalidation/ this line makes my head hurt 😅
    for range in [{"key": k, "value": v} for [k, v] in enumerate({dvo.domainName: {
        name: dvo.resourceRecordName,
        record: dvo.resourceRecordValue,
        type: dvo.resourceRecordType,
    } for dvo in example_certificate.domainValidationOptions})]:
    g
    • 2
    • 2
  • c

    cuddly-pharmacist-11587

    05/04/2021, 6:22 PM
    Hi all - I'm still new to Pulumi, and probably getting over my head a bit. But, I'm looking for a way to use Pulumi to drive my setup of cloud based software such as FiveTran. My approach was to extend ResourceProvider and implement the create method, calling a REST API using the python "requests" library. However, when I do this, I get an exception:
    RuntimeWarning: coroutine 'invoke.<locals>.do_rpc' was never awaited
    Here's the question on stackoverflow, in case anyone has an answer or suggestion as to what I'm doing wrong here: https://stackoverflow.com/questions/67335936/how-do-you-write-a-pulumi-provider-that-makes-a-rest-api-request-in-pytyon
  • a

    aloof-jelly-80665

    05/05/2021, 1:39 AM
    Cross-posting my question to this channel since it could be Python-specific
    p
    • 2
    • 2
  • b

    boundless-angle-56560

    05/05/2021, 3:40 PM
    Hi, I am getting following error, is this a bug or am I missing something ?
    g
    • 2
    • 14
  • g

    gorgeous-minister-41131

    05/06/2021, 9:56 PM
    anyone have any clue what's going on here?
  • g

    gorgeous-minister-41131

    05/06/2021, 9:56 PM
    code says, make
    cluster_name
    tag.
Powered by Linen
Title
g

gorgeous-minister-41131

05/06/2021, 9:56 PM
code says, make
cluster_name
tag.
View count: 1