https://pulumi.com logo
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
  • h

    hallowed-teacher-48474

    10/08/2021, 7:04 PM
    Hello everyone!, quick question, when creating a VPC Route Table, how can I define the the route for local vpc traffic, in the console that target shows up as
    local
    and in the documentation there is no option for setting that (or at least haven't found one 🙂 )
  • f

    full-artist-27215

    10/08/2021, 7:06 PM
    I believe the local route is created for you automatically.
  • h

    hallowed-teacher-48474

    10/08/2021, 7:07 PM
    So its just matter of defining the routes that go outside (through nat or igw), makes sense, will try that, thanks @full-artist-27215!
  • f

    full-artist-27215

    10/08/2021, 7:07 PM
    Yup
  • f

    full-artist-27215

    10/08/2021, 7:08 PM
    I just checked my code... I just create the Route Table, then add a route for an IGW... the local route is there automatically
  • h

    hallowed-teacher-48474

    10/08/2021, 7:08 PM
    Awesome, thanks! @full-artist-27215
  • f

    full-artist-27215

    10/08/2021, 7:08 PM
    👍
  • f

    full-artist-27215

    10/08/2021, 7:08 PM
    good luck!
    🙌 1
  • s

    sparse-state-34229

    10/08/2021, 11:15 PM
    anyone have issues building a container image w/Pulumi? am recently getting an error wrt grpc / protobufs:
    #16 59.67 Install protobuf 3.18.1 failed
    #16 59.67
    #16 59.67 ERRORS:
    #16 59.67 add protobuf failed:
    #16 59.67 Traceback (most recent call last):
    #16 59.67   File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    #16 59.67     result = self.fn(*self.args, **self.kwargs)
    #16 59.67   File "/opt/python/lib/python3.9/site-packages/pdm/installers/synchronizers.py", line 190, in install_candidate
    #16 59.67     self.manager.install(can)
    #16 59.67   File "/opt/python/lib/python3.9/site-packages/pdm/installers/manager.py", line 38, in install
    #16 59.67     installer(candidate.build(), self.environment, candidate.direct_url())
    #16 59.67   File "/opt/python/lib/python3.9/site-packages/pdm/installers/installers.py", line 74, in install_wheel
    #16 59.67     _install_wheel(
    #16 59.67   File "/opt/python/lib/python3.9/site-packages/pdm/installers/installers.py", line 176, in _install_wheel
    #16 59.67     for record_elements, stream in source.get_contents():
    #16 59.67   File "/opt/python/lib/python3.9/site-packages/installer/sources.py", line 165, in get_contents
    #16 59.67     record = record_mapping.pop(item.filename)
    #16 59.67 KeyError: 'protobuf.libs/'
    #16 59.67
  • s

    sparse-state-34229

    10/08/2021, 11:28 PM
    seems to build fine with
    3.18.0
  • b

    brainy-window-77332

    10/14/2021, 1:12 PM
    I'm having issues running unittests, see https://github.com/pulumi/pulumi/issues/8217
  • a

    astonishing-quill-88807

    10/15/2021, 7:02 PM
    Does anyone know if there's a method to determine whether a module is executing in the context of a Pulumi run? My use case is that I'm writing a library that will be used both by Pulumi, as well as other non-Pulumi code. If it's being called from Pulumi I want to automatically wrap the output in an
    Output.secret
    f
    • 2
    • 1
  • c

    crooked-pillow-11944

    10/15/2021, 10:45 PM
    Cross posting for my python peeps: https://pulumi-community.slack.com/archives/C01F5GS6G3X/p1634337792026900
  • g

    great-sunset-355

    10/18/2021, 12:48 PM
    Is there any plan to introduce custom exceptions for pulumi? I just noticed that
    runtime.invoke
    raises
    Exception
    which is not a good practice in python and one should use custom exceptions, so at least raising
    PulumiError
    or something would be great. https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/pulumi/runtime/invoke.py#L121 @red-match-15116 Is there any chance that there is an existing issue about this? (I could not find any) I bumped into this trying to get an existing RDS instance when I found out that the
    classic
    AWS provider differentiates between 2 types and I'm only interested in arguments that they have in common.
    try:
        db = rds.get_cluster(
            cluster_identifier=db_params.apply(lambda x: x["db"]["identifier"]),
            opts=pulumi.InvokeOptions(provider=ec1_provider),
        )
    except Exception as exc:
        print(type(exc))
        db = rds.get_instance(
            db_instance_identifier=db_params.apply(lambda x: x["db"]["identifier"]),
            opts=pulumi.InvokeOptions(provider=ec1_provider),
        )
    AWS SDK in this case raises
    DBClusterNotFoundFault
    but I guess that
    pulumi.runtime.invoke
    is not smart enough to raise this exception.
    r
    • 2
    • 1
  • s

    steep-toddler-88913

    10/19/2021, 9:30 AM
    Hi all! I am trying to construct a database connection string and then store it as a secret. I have everything working apart from actually constructing the string correctly. I create databases, users, etc. and then try to construct this string:
    db_conn_etl = f"postgresql://{db_user_etl.name}:{db_user_etl.password}@{db_cluster.private_host}:{db_cluster.port}/{db_etl.name}"
    In the secret, it shows up as
    postgresql://<pulumi.output.Output object at 0x7f3a0956c278>:<pulumi.output.Output object at 0x7f3a0956c128>@<pulumi.output.Output object at 0x7f3a095d2710>:<pulumi.output.Output object at 0x7f3a095d26a0>/<pulumi.output.Output object at 0x7f3a0956c390>
    so obviously I'm missing something. How do I get the string value of each of those pulumi.output.Output objects? Going to keep digging but if anyone can help shorten my search, I'd greatly appreciate it 🙂
    p
    • 2
    • 4
  • b

    boundless-exabyte-29150

    10/19/2021, 5:37 PM
    Hello All, I am getting following error when try to run pulumi up, could someone help me regarding below error.
    error: failed to load language plugin python: no language plugin 'python' found in the workspace or on your $PATH
    b
    • 2
    • 2
  • v

    victorious-exabyte-70545

    10/19/2021, 8:27 PM
    Question about the automation module. Can someone tell me how to list existing resources of a stack? These are the methods I see for the stack object
    'cancel', 'create', 'create_or_select', 'destroy', 'export_stack', 'get_all_config', 'get_config', 'history', 'import_stack', 'info', 'name', 'outputs', 'preview', 'refresh', 'refresh_config', 'remove_all_config', 'remove_config', 'select', 'set_all_config', 'set_config', 'up', 'workspace'
    b
    • 2
    • 5
  • l

    little-journalist-4778

    10/22/2021, 2:00 PM
    I need to unit test a ComponentResource, it creates some resources but are not exposed, there's some way to get them from the test?
    h
    f
    • 3
    • 5
  • f

    full-artist-27215

    10/25/2021, 5:28 PM
    Has anyone managed to get async calls working inside a dynamic resource provider? I need to make a few HTTP calls, but can't quite sort out the magic to get Pulumi to work with them.
    r
    • 2
    • 6
  • g

    green-park-28305

    10/26/2021, 10:18 AM
    Hi all, I am trying to add EC2 root volume encryption for EKS nodes created by eks.ManagedNodeGroup. The below does not work. Perhaps someone here knows the trick? https://www.pulumi.com/registry/packages/eks/api-doc Thanks for your help.
    cluster:eks.Cluster = eks.Cluster(f"{cluster_name}-cluster",
            name=cluster_name,
            ....
            node_group_options=eks.ClusterNodeGroupOptionsArgs(
                cloud_formation_tags={
                    "Name": "EKS Worker Node"
                },
                encrypt_root_block_device=True,
            ),
            ...
        )   
    
        eks.ManagedNodeGroup(f"{cluster_name}-node-group-" + str(i),
                cluster=cluster.core,
                node_group_name=f"{cluster_name}-managed-node-group-" + str(i),
                ....
            ))
  • w

    worried-helmet-23171

    10/27/2021, 3:08 AM
    question - is there a programmatic way to provide pulumi GCP credentials as opposed to setting the env. export GOOGLE_CREDENTIALS ect ? Additionally is it possible to use a service account token with pulumi ?
    f
    • 2
    • 4
  • b

    boundless-exabyte-29150

    10/27/2021, 7:30 AM
    Hi, I am looking for some help related creating secrets in aws secretmanager using pulumi. I am able to create a secret but how to tie it back to RDS and make entry of username and password.
    p
    • 2
    • 3
  • b

    busy-house-95123

    10/27/2021, 8:49 AM
    hey everyone, is there a way to specify the path to a virtualenv in Pulumi.yaml ?
    p
    • 2
    • 3
  • f

    fast-arm-63150

    10/27/2021, 11:51 AM
    Hi all! Crawling through the pulumi documentation on creating service accounts but would anyone know how to add additional roles to a service account on GCP?
    p
    • 2
    • 9
  • n

    nutritious-shampoo-16116

    10/27/2021, 1:59 PM
    any idea why
    self.register_outputs({'foo', 'bar'})
    isn't working at all? I see the method being called, but nor the preview neither the UI shows my output there
  • n

    nutritious-shampoo-16116

    10/27/2021, 2:19 PM
    sorry, I think I misunderstood the goal of register_outputs 🤔
    g
    • 2
    • 4
  • s

    sparse-state-34229

    10/27/2021, 11:28 PM
    any suggestions for how to use
    filter()
    with an Output?
  • s

    sparse-state-34229

    10/27/2021, 11:29 PM
    for example, with this code:
    next(filter(lambda z: name.endswith(z["name"]), things))
    things
    is a list of Outputs, each with a key named
    name
  • s

    sparse-state-34229

    10/27/2021, 11:29 PM
    raises
    TypeError: endswith first arg must be str or a tuple of str, not Output
    w
    • 2
    • 7
  • f

    fast-arm-63150

    10/28/2021, 6:13 PM
    Hi again all (including @prehistoric-activity-61023) - is there a way for pulumi to read a config file to populate its configuration instead of this being command line? Or is this just a matter of editing the pulumi.*.yaml file?
    p
    • 2
    • 12
Powered by Linen
Title
f

fast-arm-63150

10/28/2021, 6:13 PM
Hi again all (including @prehistoric-activity-61023) - is there a way for pulumi to read a config file to populate its configuration instead of this being command line? Or is this just a matter of editing the pulumi.*.yaml file?
p

prehistoric-activity-61023

10/28/2021, 6:28 PM
what did I do to get a special mention here? 😄
I’d like to answer but I don’t really get your question. Are you talking about setting config values without using CLI?
If so, you can simply edit the stack YAML file. This is what I do. You have to use CLI in order to save secrets though.
f

fast-arm-63150

10/29/2021, 1:48 PM
Thanks @prehistoric-activity-61023!
Is there any way to avoid that error 'resourceInUseByAnotherResource' when you try to update a resource that has dependencies?
p

prehistoric-activity-61023

10/29/2021, 2:24 PM
I’ve never seen this error myself 😐
Can you share some more details how you can reproduce that error?
f

fast-arm-63150

11/01/2021, 4:59 PM
@prehistoric-activity-61023 will share momentarily, thanks for bearing with me!
I do get an error trying to delete the postgres user from a database instance when I try to pulumi destroy
p

prehistoric-activity-61023

11/01/2021, 5:36 PM
quick search told me it might be related to GCP
Can we provide the version of pulumi as well as version of providers you’re using? (
pulumi version
+
pip freeze
from the venv should be enough) Can you confirm we’re talking about CloudSQL from GCP? I think you didn’t mention the cloud provider. Did you create and manage the db server using pulumi as well?
resourceInUseByAnotherResource
seems to be returned by GCP API itself so… it’s probably correct 😄. The question is: how did you manage to get that? (it might be your fault or you manage to find a bug in a provider). If you are able to reproduce the issue consistently and can share the full code, it could help us debug it further. Anyway, I’ll wait until you answer the questions above 🙂.
View count: 1