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

    polite-pillow-78450

    09/30/2020, 6:44 PM
    No, this is literally just the call to
    get_cluster
  • p

    polite-pillow-78450

    09/30/2020, 6:44 PM
    I am not accessing anything from the result.
  • p

    polite-pillow-78450

    09/30/2020, 6:44 PM
    import pulumi_aws as aws
    cluster = aws.ecs.get_cluster(cluster_name=‘fargate’)
  • p

    polite-pillow-78450

    09/30/2020, 6:44 PM
    Everything else is commented out.
  • p

    polite-pillow-78450

    09/30/2020, 6:46 PM
    $ aws ecs list-clusters
    {
    “clusterArns”: [
    “arn:aws:ecs:us-east-1:XXXXXX:cluster/fargate”,
    ]
    }
  • p

    polite-pillow-78450

    09/30/2020, 6:47 PM
    describe-clusters
  • p

    polite-pillow-78450

    09/30/2020, 6:50 PM
    updated to latest pulumi library (not CLI) fixed the issue.
  • g

    gifted-vase-28337

    10/01/2020, 2:45 AM
    I'm experiencing an issue creating an
    aws:cloudtrail:Trail
    .
    Error creating CloudTrail: TrailAlreadyExistsException: Trail {trail name} already exists for customer: {account id}
    I delete the trail and run
    pulumi up
    again. The trail appears in the AWS console -- it was created by
    pulumi up
    , yet pulumi thinks the trail was there already. Is this a known issue?
    • 1
    • 1
  • a

    agreeable-toddler-25853

    10/05/2020, 6:57 AM
    Hi Guys, I have written a ComponentResource that creates a ec2 instance setting certain default props as required for our use case, the problem i face is that when expose certain properties using the python self.register_outputs function and try provisioning an instance i get an " RuntimeError: Event loop is closed exception calling callback for <Future at 0x1102af700 state=finished returned RegisterResourceResponse>" if i don't expose properties everything works fine. Any assistance and pointers would be great
  • s

    strong-musician-98782

    10/05/2020, 10:39 AM
    Hey guys, I have two classes (one for backend one for frontend) that i run one after the other in my main, how can i pass a string between the two? for instance i'm trying to pass the backend's private ip (from the variable used during the instance creation) to the frontend's class. when i tried using pulumi output my string value ended up being some kind of pulumi.output object which probably means perhaps i did not convert it properly, if pulumi output is the solution for my case can someone give me a quick code example for it being used between two classes? Thanks alot 🙂
    n
    • 2
    • 9
  • c

    clever-plumber-29709

    10/05/2020, 7:57 PM
    Is there a way to serialize a pulumi resource? I'm creating an api gateway, and for the api deployment to work correctly i need to define a trigger, which will be a sha of the serialized resources it depends on. Something similar to what is done on terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_deployment#redeployment-triggers or if someone has an example on another way to do it, i'll appreciate it.
    f
    • 2
    • 2
  • g

    gorgeous-hospital-30611

    10/07/2020, 5:22 PM
    Good morning! I have been encountering an error, and after a reinstall of both Pulumi v 2.11.2 and Python 3.9, it is still occurring. Any help would be appreciated: It looks like the Pulumi SDK has not been installed. Have you run pip install?   If you are running in a virtualenv, you must run pip install -r requirements.txt from inside the virtualenv. _ _   error: an unhandled error occurred: Program exited with non-zero exit code: 1
    c
    f
    • 3
    • 6
  • g

    gifted-vase-28337

    10/08/2020, 12:41 AM
    The
    identifiers
    argument to
    aws.iam.GetPolicyDocumentStatementPrincipalArgs
    expects
    Sequence[str]
    type, rejecting
    Sequence[Output[str]]
    . How can I use a resource output in generating an input to `aws.iam.GetPolicyDocumentStatementPrincipalArgs`'s
    identifiers
    argument?
    pulumi.Output.concat
    and
    pulumi.Output.apply
    both return
    Output[str]
    , an incompatible type to
    str
    (per mypy) that causes
    panic: fatal: A failure has occurred: Unrecognized structpb value kind in RPC...
    .
    l
    • 2
    • 4
  • q

    quaint-electrician-41503

    10/09/2020, 7:00 AM
    I am trying to load templated helm charts like
    LocalChartOpts(... values = my_s3_bucket.id.apply(lambda id: renderHelmChart(id)),...).
    where
    def renderHelmChart( uri ) : 
      loader = FileSystemLoader(/root/path/to/)
      values = Env(loader=loader).get_template(file.yaml).render(uri)
      return yaml.load(values)
  • q

    quaint-electrician-41503

    10/09/2020, 7:04 AM
    Previously I had no problem rendering the helm charts via templates, but was not trying to use an s3 resource or .apply method against the charts. When I execute above I get a stackTrace that ends in
    TypeError: 'NoneType' object is not callable
  • n

    nutritious-shampoo-16116

    10/09/2020, 10:28 AM
    hello everybpdy, is there a clean way to catch an exception when calling a Pulumi resource (like aws.rds.Snapshot) and deal with it instead of having Pulumi raising it?
  • n

    nutritious-shampoo-16116

    10/09/2020, 10:29 AM
    I fail to see a method for that, especially since that is wrapped into a future like
    resource.apply(....do stuf...)
  • p

    polite-pillow-78450

    10/09/2020, 2:43 PM
    I am struggling with using Output in a string used as an input for another resource. I have an Account, whose id I need when creating an IAM policy document:
    aws.iam.GroupPolicy(f'assume-{self.nickname.lower()}-{role}-role',
                                        name=f'assume{role}role',
                                        group=group,
                                        policy=account.id.apply(lambda account_id: f'''
    {{
      "Version": "2012-10-17",
      "Statement": [
        {{
          "Action": [
            "sts:*"
          ],
          "Resource": "arn:aws:iam::{account_id}:role/{role}",
          "Effect": "Allow"
        }}
      ]
    }}'''),
                                        opts=ResourceOptions(depends_on=[account]))
    role
    is a regular string.
    group
    is another resource. Thanks in advance!
    c
    • 2
    • 2
  • w

    worried-queen-62794

    10/11/2020, 10:14 PM
    Any idea why I might be getting this error?
    pulumi-python:dynamic:Resource (GeneratedTemporaryPlatformSSHKey):
        error: Exception calling application: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
    • 1
    • 1
  • w

    worried-plastic-45846

    10/12/2020, 3:03 PM
    Hello, I'm trying to get a Cloudwatch Event to trigger a lambda function. After creating my Lambda, Event and Event target, all with Pulumi, I create a Lambda Permission: https://www.pulumi.com/docs/reference/pkg/aws/lambda/permission/
    # Allow cloudwatch to invoke lambda
            lambda_permission = lambda_.Permission(
                resource_name=f"{project}-{env}-status-lambda-permissions",
                action="lambda:InvokeFunction",
                function=status_lambda.name,
                principal="<http://events.amazonaws.com|events.amazonaws.com>",
                source_arn=event_target.arn
            )
    A resource is created in the stack, but if I go to the Management Console and check my lambda, there is no trigger configured. All invocations from Cloudwatch fail. If I proceed to manually create a trigger from the Management Console, everything works as expected. Do any of you know what's wrong ? Am I maybe using the wrong Pulumi resource type ?
  • s

    strong-musician-98782

    10/14/2020, 10:12 AM
    Hey, i'm currently working on converting a Terraform flow that is using DYN provider to a pulumi flow but there is no DYN provider available for pulumi. I saw that it is possible to use terraform providers in pulumi but i cannot find any proper documentation for that, if its not possible should i make a dynamic provider to access DYN's api? if so did anyone already do something similar to that? Thanks 🙂
    j
    c
    • 3
    • 3
  • q

    quaint-electrician-41503

    10/14/2020, 4:50 PM
    I think my pulumi program isn't rendering the job graph correctly. Is there a way I can mark "actions" to change the order of the job graph?
  • a

    agreeable-toddler-25853

    10/15/2020, 4:24 PM
    Hi All, I am trying to install certain packages passing in script to user_data_base64 param while creating an ec2 instance but it does'nt seem to get triggered Any help & pointers would be great
    g
    • 2
    • 2
  • h

    handsome-optician-50551

    10/16/2020, 10:22 AM
    message has been deleted
  • b

    bumpy-byte-21437

    10/16/2020, 11:21 AM
    hi guys, some basic quesion.. whats the best way in pulumi to iterate through some values using variable in config
  • b

    brash-scientist-65555

    10/16/2020, 3:51 PM
    Hello. I've tried a lot of searches and cannot find why this is failing. Anyone have ideas? Code: sample_image = docker.Image(     "sample-dockerimage",     image_name=sample_ecr_repo.repository_url,     build="../projects/hello_world",     skip_push=False,     registry=sample_registry, ) Failure: File "C:\Program Files\Python38\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified error: an unhandled error occurred: Program exited with non-zero exit code: 1
    s
    • 2
    • 3
  • w

    worried-queen-62794

    10/21/2020, 5:35 AM
    I'm pretty new to Pulumi and Python. What is the best way to split a module up? If I define everything at the top level and import all the modules into the main module is that sufficient?
    🙌 1
    e
    • 2
    • 2
  • j

    jolly-camera-35709

    10/22/2020, 6:29 AM
    I'm trying to format a string with the output of another resource, but it doesn't work, help please
  • j

    jolly-camera-35709

    10/22/2020, 6:29 AM
    container = containerservice.Group('SpartanBuildContainer',
                                       name='{}-build'.format(project_name),
                                       location=resource_group.location,
                                       resource_group_name=resource_group.name,
                                       ip_address_type="public",
                                       dns_name_label="{}-build".format(project_name),
                                       os_type="Linux",
                                       containers=[
                                         containerservice.GroupContainerArgs(
                                           name='{}-build'.format(project_name),
                                           image='{}/{}-build:{}'.format(container_registry.login_server,
                                                                          project_name,
                                                                          get_image_tag_stdout),
                                           cpu=1,
                                           memory=1.5,
  • j

    jolly-camera-35709

    10/22/2020, 6:30 AM
    The image came out like this
Powered by Linen
Title
j

jolly-camera-35709

10/22/2020, 6:30 AM
The image came out like this
View count: 1