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

    chilly-hairdresser-56259

    06/11/2020, 8:03 PM
    yea found that out too 🙂, but I actually was getting output I expected now. So I must have screwed up the way I was doing it
  • s

    sparse-state-34229

    06/11/2020, 8:07 PM
    these things are always cleared up so quickly once the ninja @gentle-diamond-70147 swoops in lol
    🙂 1
    🙇‍♂️ 1
  • g

    gentle-diamond-70147

    06/11/2020, 8:13 PM
    Once outputs "click" for you, they're pretty easy, but it is something that trips up people new to Pulumi.
  • g

    gentle-diamond-70147

    06/11/2020, 8:18 PM
    @chilly-hairdresser-56259 So it's working for you now?
    c
    • 2
    • 1
  • c

    chilly-hairdresser-56259

    06/11/2020, 8:30 PM
    thank you @sparse-state-34229 @gentle-diamond-70147 .
  • s

    sparse-state-34229

    06/11/2020, 8:42 PM
    yay!
  • i

    incalculable-dream-27508

    06/12/2020, 11:46 AM
    Ha, let's see if I manage to massage the above discussion into figuring out my similar question ;)
  • i

    incalculable-dream-27508

    06/12/2020, 11:52 AM
    Mmm, no, I'm completely lost
  • i

    incalculable-dream-27508

    06/12/2020, 11:55 AM
    I'm trying to create a rule that would allow members of all of those security groups to connect to a port. AFAIK it needs separate rule for each group. But, each group requires a unique name, and I'd like for them to be telling what they're allowing access from. So this is my naive attempt so far.
    __main__.py
    • 1
    • 3
  • l

    little-garage-43399

    06/14/2020, 10:05 AM
    I think there is a import bug in Pulumi.
    from pxglb import *
    pxglb is a file with classes I have built. This import is worked fine, until I have added to pxflb file a new class, a "ResourceProvider" class
    b
    • 2
    • 1
  • l

    little-garage-43399

    06/14/2020, 10:05 AM
    class PXNS1RecordProvider(ResourceProvider):
    In this case I get the following error:
    error: Exception calling application: No module named 'pxglb'
    If I copy paste the classes code into the "main" file (instead of the import), it works fine. Pulumi version: 2.4.0 Python version: 3.7.7
  • s

    sparse-state-34229

    06/14/2020, 8:06 PM
    can you gist/paste any actual code?
  • f

    fast-whale-9064

    06/15/2020, 5:46 PM
    Is there any documentation on using FileArchive? I’ve got a python lambda function with dependencies, and it looks like if you provide FileArchive a path it would include all files, but that doesn’t seem to be the case.
    e
    • 2
    • 5
  • a

    astonishing-quill-88807

    06/16/2020, 3:37 PM
    So, continuing on the trend of difficulties with Output objects, I'm trying to generate IPv6 subnets from the CIDR block of the created VPC using the vpc.ipv6_cidr_block output attribute and passing that into an
    ipaddress.IPv6Network
    call which is throwing errors about the type being invalid. I've tried using the
    .apply
    approach which doesn't seem to be working since the return value of an apply is still an Output object. How do I just access the underlying string to create the network object?
    e
    • 2
    • 2
  • a

    astonishing-quill-88807

    06/16/2020, 3:37 PM
    v6net = IPv6Network(olvpc.ipv6_cidr_block.apply(lambda cidr: f'{cidr}'))
    where
    olvpc
    is the return value of a call to
    pulumi_aws.ec2.Vpc
    s
    • 2
    • 3
  • a

    astonishing-quill-88807

    06/16/2020, 4:56 PM
    So, when I try to use a call to
    get_vpc
    that doesn't match an existing resource, it throws an exception which still causes execution to fail even if I catch it. What's the option for handling that situation?
    e
    • 2
    • 2
  • p

    powerful-pharmacist-31524

    06/18/2020, 1:02 PM
    Having an issue with pulumi_docker and environment variables. This works fine:
    mock_image = docker.Image('mock-server-image',
                              build=docker.DockerBuild(context='../',
                                                       dockerfile=f'../Dockerfile'),
                              image_name=f'{repo.repository_url}',
                              registry=registry)
    But as soon as I add an environment variable …
    mock_image = docker.Image('mock-server-image',
                              build=docker.DockerBuild(context='../',
                                                       dockerfile=f'../Dockerfile',
                                                       env={'MOCK_PORT': '80'}),
                              image_name=f'{repo.repository_url}',
                              registry=registry)
    I get an error:
    FileNotFoundError: [Errno 2] No such file or directory: 'docker': 'docker'
    l
    s
    • 3
    • 9
  • c

    chilly-hairdresser-56259

    06/18/2020, 3:40 PM
    Within Pulumi is there a graceful way to stop Pulumi from processing? I thought
    quit()
    would work, but that caused all my resources to be destroyed. Luckily that is a sandbox environment for testing before it gets released to any account which has running resources. I see pulumi has
    pulumi.Error()
    but havent found the docs for it yet.
    f
    • 2
    • 2
  • s

    stocky-lion-56153

    06/19/2020, 11:00 AM
    Hi. I’m new to pulumi and I’m trying to get the python aws quickstart (https://www.pulumi.com/docs/get-started/aws/) example working using the github actions docs (https://www.pulumi.com/docs/guides/continuous-delivery/github-actions/) but I’m getting an error
    error: "/github/workspace/venv" doesn't appear to be a virtual environment
    . Can anyone here tell me how to activate my venv in the
    uses:
    block please? Thanks!
    m
    • 2
    • 1
  • s

    stocky-lion-56153

    06/19/2020, 11:01 AM
    name: Pulumi
    on:
      push:
        branches:
          - master
    jobs:
      up:
        name: Update
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
            with:
              fetch-depth: 1 
          - uses: <docker://pulumi/actions>
            with:
              args: up --yes
            env:
              AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
              AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
              PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
              PULUMI_CI: up
  • s

    stocky-lion-56153

    06/19/2020, 11:02 AM
    My push action ^^^
  • a

    astonishing-quill-88807

    06/19/2020, 3:19 PM
    For the
    register_outputs
    function in a component, does anyone have a detailed example of passing specific outputs? Most of the Python examples in the Pulumi examples repo call it with an empty dict literal. Will that actually set any outputs to be registered? From the docs it seems that I should be doing something like https://github.com/mitodl/ol-infrastructure/blob/rds_component/src/ol_infrastructure/components/aws/olvpc.py#L202-L207
    s
    • 2
    • 3
  • a

    astonishing-quill-88807

    06/19/2020, 3:20 PM
    Or can I only register specific attributes of a created resource as outputs?
  • w

    worried-plastic-45846

    06/23/2020, 3:39 PM
    Hello, When provisioning a lambda from a zip file located in S3, and without a hash provided, pulumi will never update the layer. How can I force pulumi do delete and recreate a specific resource every time
    pulumi up
    runs?
    f
    • 2
    • 2
  • f

    flat-australia-79845

    06/24/2020, 7:44 AM
    Hi y'all! How do I set up a fake GCP provider for unit testing? I am already setting up mocks as in the documentation, however I need to
    gcp.config.region
    to have a value during testing. Any idea?
    g
    d
    s
    • 4
    • 22
  • d

    damp-elephant-82829

    06/28/2020, 1:33 PM
    @flat-australia-79845 did you find an answer? I am stucked trying to read the gcp.config.region in python, I am trying to import pulumi_gcp.config but it does not exists
    g
    f
    • 3
    • 13
  • m

    melodic-alarm-79754

    06/28/2020, 9:15 PM
    Hi, I get" error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions" , using the pulumi docker cli .
    w
    • 2
    • 1
  • q

    quick-cricket-80200

    06/28/2020, 9:38 PM
    Hello! How do I specify auto scaling for fargate?
    s
    • 2
    • 3
  • q

    quiet-painter-30539

    06/30/2020, 9:21 AM
    I'm creating a bucket and a bucket policy using Pulumi / Python. How to get the bucket arn from a bucket resource for creating the bucket policy? If I try to get the bucket arn in the same pulumi up run (i.e. creating the bucket and bucket policy) I get required field is not set. If I try to get the id from the bucket I just get the Output object - how to convert that to string?
    f
    s
    g
    • 4
    • 5
  • e

    early-window-97394

    07/02/2020, 7:05 AM
    Hello all, I am playing with pulumi and I would like to know if there is a way to dump yaml for Openshift? all I see it this beta way (for K8) https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/kubernetes/#ProviderArgs-renderYamlToDirectory Can you help me? (I changed the yaml.dump to jinja2 template)
Powered by Linen
Title
e

early-window-97394

07/02/2020, 7:05 AM
Hello all, I am playing with pulumi and I would like to know if there is a way to dump yaml for Openshift? all I see it this beta way (for K8) https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/kubernetes/#ProviderArgs-renderYamlToDirectory Can you help me? (I changed the yaml.dump to jinja2 template)
View count: 1