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

    astonishing-quill-88807

    09/04/2020, 6:37 PM
    Has anyone gone down the road of writing a config module to be used across their different projects to avoid having to duplicate values across projects and stacks?
  • e

    enough-oil-63049

    09/05/2020, 2:51 AM
    Closest I have gone is separated out within one project: https://github.com/pulumi/examples/blob/master/azure-py-virtual-data-center/config.py
  • d

    damp-elephant-82829

    09/05/2020, 9:26 AM
    @astonishing-quill-88807 what about using github submodules?
  • d

    damp-elephant-82829

    09/06/2020, 8:58 AM
    Is the Pulumi Mock object documented in the python sdk?
  • h

    helpful-country-51833

    09/09/2020, 4:11 PM
    Hi, has anyone here got experience with using dynamic resource provisioners, ref https://github.com/pulumi/examples/tree/master/aws-py-ec2-provisioners ? I've faced following issues: • RemoteExec runs commands every time I run
    pulumi up
    command. I would like it run it only when command is changed in pulumi code or dependent resource is changed. Any ideas? • CopyFile is able to create a file on a remote system. However it doesn't update it upon local file update. How to update a remote file after the local file change?
    • 1
    • 1
  • d

    damp-elephant-82829

    09/10/2020, 1:01 PM
    Hello guys, anyone has experiencing in using the mock module for pulumi ? https://github.com/pulumi/pulumi/issues/5295
  • i

    incalculable-dream-27508

    09/11/2020, 5:22 PM
    message has been deleted
  • d

    damp-elephant-82829

    09/11/2020, 8:20 PM
    Hello guys, I have a failure when trying to import inside the “main.py” files from modules but if I run python from the same folder where I run pulumi up and I try to import my module it works
  • d

    damp-elephant-82829

    09/11/2020, 8:20 PM
    Untitled
    m
    • 2
    • 2
  • a

    astonishing-quill-88807

    09/14/2020, 2:00 PM
    I'm having some issues with trying to render a stack export that is combining values from multiple resources. I have a composite resource where I was able to export a dictionary of some of its attributes. Now, I'm trying to add information about other resources created in the same stack, but when I preview the output it's showing that a bunch of existing data will be deleted, with some other data being added in a seemingly random fashion. My assumption is that it's due to some indeterminacy of how the async processes resolve. Has anyone dealt with this before or have advice? I tried using the
    Output.all(...).apply(...)
    approach but instead got errors from deep in the Pulumi runtime about dicts not being callable...
  • a

    average-school-38756

    09/16/2020, 7:32 PM
    Anyone have a working VS Code debugging implementation for code run by the CLI? Hoping someone can spot the issue in mine. Inspired by https://github.com/pulumi/pulumi/issues/1372#issuecomment-583086422 i set up a
    .vscode/launch.json
    looking like this:
    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "Python: Attach using Process ID",
          "type": "python",
          "request": "attach",
          "processId": "${command:pickProcess}"
        }
      ]
    }
    i put this code at the beginning of my
    ___main___.py
    , with a breakpoint as a sanity check (and i have a VS Code breakpoint on the same line):
    import debugpy
    debugpy.listen(5678)
    debugpy.wait_for_client()
    debugpy.breakpoint()
    i run
    pulumi up
    which shows this output (appears as though
    wait_for_client
    is indeed working):
    $ pulumi up
    Previewing update (dev):
    And i hit F5 to trigger the process attachment. i choose the process called "pulumi up" in the dialog. After ten seconds or so, i get a prompt in VS Code saying "Timed out waiting for debug server to connect."
    • 1
    • 1
  • c

    curved-waitress-45592

    09/18/2020, 1:12 AM
    hi there, is there a way to Pulumi/Python without the venv mechanism that's built in? we use anaconda a lot and would love to stick to it and not have to juggle multiple environments during our development.
    r
    • 2
    • 1
  • a

    agreeable-toddler-25853

    09/18/2020, 7:34 AM
    HI All, Is there a way to get a list of all the IAM policies
    m
    • 2
    • 4
  • w

    worried-plastic-45846

    09/22/2020, 8:51 AM
    Hello, Since this morning, I'm getting this error, on a project that worked until now:
    aws:codebuild:Project (develop-Codebuild-Project-build):
        error: aws:codebuild/project:Project resource 'develop-Codebuild-Project-build' has a problem: Attribute must be a whole number, got 480
        error: aws:codebuild/project:Project resource 'develop-Codebuild-Project-build' has a problem: Attribute must be a whole number, got 60
    How do I know which attribute is causing an issue? Using -v does not provide a single error message, only debug. In the entirety of the output, the number 60 and 480 do not appear at all.
    m
    • 2
    • 2
  • c

    curved-cartoon-90054

    09/22/2020, 10:16 PM
    hi I am trying pulumi crossguard for first time i am getting below error error: no Pulumi.yaml project file found
    steps:
    mkdir policypack && cd policypack
    pulumi policy new aws-python
    pulumi preview --policy-pack <path-to-policy-pack-directory>
    m
    • 2
    • 4
  • c

    clever-plumber-29709

    09/23/2020, 5:11 AM
    Is there a way to make https://github.com/joeduffy/aws-tags-example/blob/master/autotag-py/taggable.py someting redistributable? I dont like the ide of havinf to copy it on each resource i want to auto tag
    m
    • 2
    • 2
  • h

    helpful-processor-86468

    09/24/2020, 11:13 AM
    error: Exception calling application: code() takes at most 15 arguments (16 given)
     - this is what I'm getting when using dynamic resource when trying to do 
    pulumi destroy
    . It was working fine for some time and now it's broken without any code change. What is happening?
  • c

    curved-cartoon-90054

    09/24/2020, 7:19 PM
    hi can we use pulumi crossguard as general purpose policy/decision making engine similar to opa? Like decisions not related to deployment eg: in opa we can write rules like validating password where user can provide their password as data to opa and get a response if the password is  matching the rules
  • a

    average-school-38756

    09/25/2020, 9:24 PM
    Any reason a policy violation wouldn't be printed to the
    pulumi preview
    output? i ran
    pulumi preview --policy-pack my-pack --policy-pack-config my-config.json
    , i see the pack named under "Policy Packs run", and i know
    report_violation("my message")
    was executed because i stepped through it in the debugger. This is with a custom Python pack i started writing. Running against an AWSGuard TypeScript policy does show policy violations.
    g
    • 2
    • 2
  • s

    shy-football-10348

    09/30/2020, 2:59 AM
    Does anyone have an example of enabling ALB access logs? I have the following code which doesn’t work:
    alb_http_bucket_key = aws.kms.Key(
        "jupyterhub-alb-http-bucket-key",
        deletion_window_in_days=10,
        description="This key is used to encrypt bucket objects",
    )
    
    alb_http_bucket = aws.s3.Bucket(
        "jupyterhub-alb-http-logs",
        server_side_encryption_configuration={
            "rule": {
                "applyServerSideEncryptionByDefault": {
                    "kms_master_key_id": alb_http_bucket_key.arn,
                    "sseAlgorithm": "aws:kms",
                },
            },
        },
    )
    
    alb = aws.lb.LoadBalancer(
        "jupyterhub-alb",
        security_groups=[sgroup.id], 
        subnets=jupyterhub_priv_subnets,
        internal=True,
        access_logs=aws.lb.LoadBalancerAccessLogsArgs(
            bucket=alb_http_bucket.bucket_domain_name,
            enabled=True
        )
    )
    The bit I cannot get right is the
    access_logs=
    field. I directly referenced another function that has an example using the same data type that
    access_logs
    requires and I still cant get it to work 😞
    f
    • 2
    • 10
  • s

    shy-football-10348

    09/30/2020, 2:59 AM
    appreciate any help! thanks in advance.
  • a

    agreeable-toddler-25853

    09/30/2020, 3:00 AM
    Hi, Any ideas on how we can upload a directory instead of a file to a s3 bucket using pulumi
  • n

    nutritious-shampoo-16116

    09/30/2020, 3:41 PM
    anybody has a good way to catch errors that happen in futures? We hit sometimes this problem, having resources deleted cause errors are swallowed silently if any happens using
    .apply
  • n

    nutritious-shampoo-16116

    09/30/2020, 3:42 PM
    it makes also debugging pretty hard
  • p

    polite-pillow-78450

    09/30/2020, 4:26 PM
    In a new stack, I am trying to fetch the Fargate ECS cluster with:
    import pulumi_aws as aws
    cluster = aws.ecs.get_cluster(cluster_name=‘fargate’)
  • p

    polite-pillow-78450

    09/30/2020, 4:26 PM
    I get the following error:
    Exception: invocation of aws:ecs/getCluster:getCluster returned an error: required configuration keys were missing
  • p

    polite-pillow-78450

    09/30/2020, 4:26 PM
    I haven’t managed to find any issues in the Pulumi provider or terraform repos.
  • p

    polite-pillow-78450

    09/30/2020, 4:27 PM
    Latest version of
    pulumi
    and
    pulumi-aws
    .
  • p

    polite-pillow-78450

    09/30/2020, 4:27 PM
    Any ideas?
    f
    • 2
    • 3
  • f

    faint-table-42725

    09/30/2020, 6:43 PM
    This is happening when you try to access
    result.settings
    ? Do you mind sharing a snippet of your code?
Powered by Linen
Title
f

faint-table-42725

09/30/2020, 6:43 PM
This is happening when you try to access
result.settings
? Do you mind sharing a snippet of your code?
View count: 1