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

    loud-midnight-95614

    02/13/2020, 12:35 AM
    I'm new here, so apologies if this question is in the wrong channel or has been asked before. Does Pulumi support Oracle Cloud Infrastructure as a provider? As I understand it, Pulumi is supposed to support a superset of the providers that Terraform offers. However, I couldn't find the associated GitHub repo. I'm asking in this channel, because I'm hoping to use Python with Pulumi.
  • l

    loud-midnight-95614

    02/13/2020, 12:39 AM
    Or, am I expected to use the Pulumi Terrafrom Bridge (https://github.com/pulumi/pulumi-terraform) to add providers that haven't been ported from Terrafrom into Pulumi? If that is the case, I think I might need some help because the readme is very basic and I didn't really find a tutorial on how to port a provider using the bridge.
    w
    • 2
    • 2
  • l

    loud-midnight-95614

    02/14/2020, 10:40 PM
    When I use
    pulumi.debug()
    where do those messages go? I tried to use
    --verbose 5
    on the command line, but I still didn't see the messages.
  • c

    clever-nest-47198

    02/17/2020, 5:44 PM
    @mysterious-egg-7415 hey noticed you archived https://github.com/bincyber/pitfall are you no longer using it?
    w
    a
    m
    • 4
    • 3
  • a

    agreeable-angle-1483

    02/20/2020, 2:31 PM
    Hi guys, I’m trying to use
    StackReference
    and print in the following example the
    other_output
    variable, can anyone share an example?
    other = StackReference("stg")
    other_output = other.get_output("regions")
    l
    • 2
    • 6
  • g

    great-manchester-70568

    02/20/2020, 7:40 PM
    hi all, trying out pulumi/python/azure and it doesn't work 😮 probably a stupid beginner mistake. pulumi installed, logged into azure, created a pulumi project, created a virtualenv and installed requirements. pulumi up fails to import pulumi according the output. But if i start python i can import the module.
    n
    l
    • 3
    • 13
  • a

    aloof-psychiatrist-4562

    02/21/2020, 8:15 PM
    xpost due to wrong channnel. Friends. If I wanted to play around with Pulumi in Localstack with the Pulumi Python SDK, where should I begin looking? I’m not finding the relevant args for
    endpoint_url
    .
    helps to look at the right libraries.
  • a

    aloof-psychiatrist-4562

    02/21/2020, 9:09 PM
    hmm. undiscoverable creds. i’ve even attempted using: https://github.com/pulumi/pulumi-aws/blob/master/sdk/python/pulumi_aws/provider.py#L13 skip credentials validation
    Previewing update (development):
    
         Type                     Name                    Plan       Info
         pulumi:pulumi:Stack      aws-pulumi-development             
     +   ├─ pulumi:providers:aws  localstack              create     
         └─ aws:s3:Bucket         my-bucket                          1 error
     
    Diagnostics:
      aws:s3:Bucket (my-bucket):
        error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
    g
    • 2
    • 5
  • l

    loud-midnight-95614

    02/21/2020, 11:54 PM
    Any hints on where the
    pulumi.debug()
    output goes and how it can be used? I tried increasing the verbosity (I believe 9 is the highest), but none of my statements were printed to the screen. I tried finding a log file, but I'm probably not looking in the right place. Basically, as I incrementally built my infrastructure "blueprint" with Pulumi, I used a lot of
    <http://pulumi.info|pulumi.info>()
    statements to eye-ball verify different things. Now, as I prepare to share this work with a larger audience, it will be nice to reduce the noise on the screen by converting most of those to debug statements. But, I want to know how to access that information when a teammate asks me for help.
    g
    w
    • 3
    • 6
  • b

    better-actor-92669

    02/24/2020, 9:15 AM
    @here, hey guys. I need to access an Output object's value as type
    str
    and not
    Output
    . I know that it is asynchronous operation and the value may not be available right away, so I wrap it in a function as @white-balloon-205 recommended. For instance, I need to set up environmental variables to connect to a CloudSQL Postge Instance. I created a function, that does that, and then I want to pass an Output object as a string, not as an Output type:
    import os
    from pulumi_gcp.sql import DatabaseInstance, SslCert, User
    from pulumi import Config, export, get_project, ResourceOptions, Output
    
    def set_env_vars(env_var_name, env_var_value):
        os.environ[env_var_name] = env_var_value
    
    service_user_certificate = SslCert(
            'service_user_certificate',
            common_name=service_user_name,
            opts=ResourceOptions(
                depends_on=[cloud_pgsql_main_1, service_user],
                protect=False,
            ),
            instance=cloud_pgsql_main_1.name,
        )
    
        # Creating a Database Provider
        Output.all(['PGSSLCERT', service_user_certificate.cert]).apply(set_env_vars)
        Output.all(['PGSSLKEY', service_user_certificate.private_key]).\
            apply(set_env_vars)
        Output.all(['PGSSLROOTCERT', service_user_certificate.server_ca_cert]).\
            apply(set_env_vars)
    
        # set_env_vars('PGSSLCERT', Output.all([service_user_certificate.cert]).apply(lambda l: f"{l}"))
        # set_env_vars('PGSSLKEY', str(service_user_certificate.private_key))
        # set_env_vars('PGSSLROOTCERT', str(service_user_certificate.server_ca_cert))
    
        print(os.environ['PGSSLCERT'])
        print(os.environ['PGSSLKEY'])
        print(os.environ['PGSSLROOTCERT'])
    I tried different methods, however, environmental variables are not set up, because
    os.environ
    can't find a key as it is not set up. Nevertheless, I can obviously check output of
    service_user_certificate.cert
    via
    pulumi.export()
    . Can you please help me figure out how to get a string value of an Output object?
    g
    m
    • 3
    • 12
  • g

    gifted-beach-2614

    02/24/2020, 8:18 PM
    are there any plans for a 1.11.1 release to pull in https://github.com/pulumi/pulumi/pull/3964?
    w
    • 2
    • 2
  • e

    echoing-breakfast-73834

    02/25/2020, 11:21 PM
    Hello all. Can anybody tell me why a ResourceOptions custom timeout on a dynamic provider would be being ignored? Is it expected that the provider will implement that functionality?
    w
    • 2
    • 4
  • e

    echoing-breakfast-73834

    03/01/2020, 4:50 PM
    Not sure if this is Python specific or core specific but does anybody know if there's a way to have log methods only show up when a debug log level is set? Right now I'm using log.debug and messages are showing up even while just doing the normal
    pulumi up
    .
    w
    • 2
    • 2
  • l

    loud-midnight-95614

    03/05/2020, 12:12 AM
    When we use
    pulumi.error()
    is the expected behavior that it will only communicate an error to the user, but it will not disrupt the execution flow or terminate the program early? I just noticed that I could continue provisioning resources even after encountering an error message; which functionally makes it equivalent to a warning (at least to me). Just wanted to double check before I implement my own logic for "fatal errors".
    w
    • 2
    • 2
  • f

    famous-salesmen-28835

    03/05/2020, 6:18 AM
    class pulumi_aws.s3.Bucket(resource_name, opts=None, acceleration_status=None, acl=None, arn=None, bucket=None, bucket_prefix=None, cors_rules=None, force_destroy=None, hosted_zone_id=None, lifecycle_rules=None, loggings=None, object_lock_configuration=None, policy=None, region=None, replication_configuration=None, request_payer=None, server_side_encryption_configuration=None, tags=None, versioning=None, website=None, website_domain=None, website_endpoint=None, __props__=None, __name__=None, __opts__=None)
    In this if I pass resource_name as "mybucket" then it create s3 bucket with name "mybucket-677282" is it any way to create bucket with my bucket only. Or any one can suggest me this have policy field so if I pass policy in that "resource" needs the ARN of bucket which is not created with a single call how I can create bucket with attached policy
    g
    • 2
    • 9
  • c

    colossal-room-15708

    03/09/2020, 3:52 AM
    Is CrossGuard not available for python yet?
    m
    • 2
    • 2
  • b

    bright-refrigerator-27211

    03/10/2020, 8:13 AM
    I would love to see a real github repo to implement this : https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/#inter-stack-dependencies
    f
    • 2
    • 2
  • p

    polite-iron-99873

    03/10/2020, 7:46 PM
    Is there a way to get an attribute from a resource using its resource name? For example, I create a bucket after a reference to that bucket.
    some_other_resource = foo.resource("foores", s3_bucket_id = bucket1.id, ...)
    ...
    bucket1 = s3.bucket("bucket1", ...args)
    This would be likened to Interpolation in terraform. Or tropospheres ability to use Ref('<resource_name>').
    f
    • 2
    • 12
  • e

    elegant-crayon-4967

    03/11/2020, 12:04 AM
    anyone here know the best way to do a test in TS for if a resource exists? eg
    password = pulumi.output(aws.secretsmanager.getSecret({
              name: `testSecret`,
            },
    spits out a unhandled exception. I’d like to capture this nicely and exit and not explode the program. First attempt using try/catch didn’t stop it from exploding
    g
    • 2
    • 3
  • t

    tall-stone-8237

    03/11/2020, 6:24 AM
    Hi everyone! Currently building out some dynamic providers that will “depend on each other” Could someone point me in the right direction with regards to exporting the resource ID? How do I access the resource ID outside the provider class?
    • 1
    • 1
  • w

    wide-cat-87818

    03/11/2020, 7:29 AM
    Hi everyone, I am trying to connect to a Postgres database on AWS in a private subnet via jump host. I’ve started Pulumi with debugger and can see, that the tunnel is established. However after my code in the main.py is executed, it seems to me, that Pulumi do some stuff afterwards, where my tunnel is closed. Can somebody help me? Thanks in advance.
    Unbenannt
  • n

    nutritious-shampoo-16116

    03/11/2020, 1:28 PM
    does anybody knows what should be
    policy
    here https://www.pulumi.com/docs/reference/pkg/python/pulumi_aws/iam/#pulumi_aws.iam.Policy ? is it a str? dict?
  • n

    nutritious-shampoo-16116

    03/11/2020, 1:28 PM
    it is the only undocumented param
  • b

    bright-refrigerator-27211

    03/11/2020, 1:50 PM
    @nutritious-shampoo-16116 from a AWS view its a ARN
  • n

    nutritious-shampoo-16116

    03/11/2020, 1:51 PM
    the policy body for the policy itself is an ARN?
  • b

    bright-refrigerator-27211

    03/11/2020, 1:51 PM
    okay
  • b

    bright-refrigerator-27211

    03/11/2020, 1:51 PM
    i see
  • b

    bright-refrigerator-27211

    03/11/2020, 1:52 PM
    json string
  • n

    nutritious-shampoo-16116

    03/11/2020, 1:52 PM
    so str, thanks @bright-refrigerator-27211
  • b

    bright-refrigerator-27211

    03/11/2020, 1:53 PM
    Yeah, click on the terraform documentation when you have doubts.
Powered by Linen
Title
b

bright-refrigerator-27211

03/11/2020, 1:53 PM
Yeah, click on the terraform documentation when you have doubts.
View count: 1