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
general
  • i

    incalculable-quill-13895

    01/30/2020, 6:30 PM
    Anyone know if there’s any way to add a scaling policy to aws fargate services like you would through their UI?
    w
    • 2
    • 1
  • g

    gray-city-50684

    01/30/2020, 7:08 PM
    Hi, I’m experiencing a crash with “pulumi preview” when I try to install the CRD definition for cert-manager (using Pulumi’s k8s.yaml.ConfigGroup). Did anybody see this kind of error before?
    g
    n
    • 3
    • 13
  • c

    cuddly-australia-15715

    01/30/2020, 7:35 PM
    I’m trying to create an application load balancer but I get this error saying I cannot attach an application lb to multiple subnets in the same AZ. I’m using default ages for the Application load balancer class from awsx.
  • c

    cold-author-10079

    01/31/2020, 9:36 AM
    Hi, I’m looking to deploy the same set of resources in a number (say 25, but might grow to 100s) of AWS accounts. In CloudFormation I would use a StackSet for this, what is the best way to do this with Pulumi?
    b
    w
    • 3
    • 3
  • r

    red-football-97286

    01/31/2020, 11:55 AM
    Wanted to get some feed back on some code I wrote to loop through different conditions on creating an alarm for route53. Could I have done this in a better way?
    environments = {
        'HealthChecks': [health_check_1.id, health_check_2.id],
        'Names': ['Primary', 'Secondary']
    }
    
    # Metric alarm for both primary and secondary sites
    for index in range(0, (len(environments))):
        cloudwatch.MetricAlarm(
            f"{environments['Names'][index]}_site_alarm",
            __opts__=ResourceOptions(
                depends_on=[sns_topic, sns_email]),
            alarm_actions=[sns_topic.arn],
            alarm_description=f"{environments['Names'][index]} alarm for website",
            name=f"{environments['Names'][index]}_site",
            comparison_operator="LessThanThreshold",
            statistic="Minimum", evaluation_periods=3,
            metric_name="HealthCheckStatus",
            namespace="AWS/Route53",
            period=60, threshold=1,
            dimensions={
                'HealthCheckId': environments['HealthChecks'][index]
            }
        )
    w
    m
    • 3
    • 2
  • b

    broad-helmet-79436

    01/31/2020, 1:42 PM
    What name would you give to the things that Pulumi uses a provider to talk to? For example: • The Kubernetes provider lets you manage resources in Kubernetes. Kubernetes is a _____. • The GCP provider lets you manage resources in GCP. GCP is a _____. “Clouds” makes sense when talking about GCP, AWS, or Linode, but not when talking about Kubernetes – and definitely not tools like Kafka or MySQL, or the Random provider. Some of the docs (and especially the Terraform docs) talks about them as if they are the providers, but also talk about the client libraries as providers, so it’s easy to get them confused. Which term would you use to describe these things?
    s
    c
    • 3
    • 6
  • c

    colossal-room-15708

    01/31/2020, 6:13 PM
    is this known?
    w
    • 2
    • 3
  • a

    able-crayon-21563

    01/31/2020, 6:29 PM
    Is it possible for me to use the terraform generator to generate a new Pulumi provider, e.g. for Auth0? https://www.terraform.io/docs/providers/auth0/index.html
    w
    s
    +3
    • 6
    • 9
  • c

    careful-market-30508

    01/31/2020, 7:55 PM
    Is there a way to convert a kubernetes manifest yaml to pulumi python SDK code ?
    a
    l
    • 3
    • 2
  • b

    bored-river-53178

    02/02/2020, 6:33 PM
    Is there any way to cleanup pulumi history for a stack?
    w
    • 2
    • 2
  • b

    bored-river-53178

    02/02/2020, 10:11 PM
    I need to write a referenced stack output value to a file as a string, but functions like apply(), all() etc only produce other Output values, while I need a plain string. Previously I just used getOutputSync but it hangs with newer nodejs versions. Referenced stack outputs are known before I run 'pulumi up', so it's not clear to me, why it is so hard to get the underlying values.
  • m

    many-garden-84306

    02/02/2020, 10:21 PM
    @bored-river-53178 I've only used the python implementation but I've found I can do anything I like inside an Output.apply() callback, including opening and writing files. Just pass the referenced output as an "apply" input and you will be called with it resolved to its final value, and then you can do the file write inside the apply callback. The reason the underlying values are not available synchronously is that they are implemented as futures so the time required to fetch them from the other stack takes place concurrently with the rest of your stack.
    b
    • 2
    • 3
  • b

    bored-river-53178

    02/02/2020, 11:13 PM
    yes, it works, but it made the code somewhat ugly, there are many places where the referenced stack outputs are used and I had to wrap each of them in apply(). Is there any way to get all referenced stack outputs synchronously before using them (besides getOutputSync() which just hangs with NodeJS 13)?
  • m

    many-garden-84306

    02/02/2020, 11:19 PM
    @bored-river-53178 Its an async programming model so that is kind of a builtin tax. you don't want to stall the pipeline waiting for something when you could be starting other stuff. However, the thing I've done is use Output.all with a list of things I need resolved, so I only need one apply and I can do a bunch of work. e.g., in python:
    def get_auth_container_definition_obj():
      def gen_result(
          db_password_secret_arn,
          image_url,
          region,
          log_group_name,
          db_dns_name,
          db_database_name):
        # do a bunch of stuff with these sync values passed as args
      return Output.all(
          db_password_secret.arn,
          latest_image_url,
          region,
          cloudwatch_log_group.name,
          db_dns_name,
          db_database_name,
        ).apply(lambda args: gen_result(*args))
  • b

    bored-river-53178

    02/02/2020, 11:23 PM
    That's actually exactly what I want to do: I want to stall the pipeline waiting for values from the referenced stack, if it's somehow possible without getOutputSync. I understand the advantages of async way, but in my case I want to fallback to the sync way. 🙂 Unfortunately, Output.all won't improve the situation in my case (I will need to wrap the whole program, basically)
  • m

    many-garden-84306

    02/02/2020, 11:34 PM
    In python I think the solution would be to block the synchronous thread waiting for a signal, and then send the signal inside the apply(). But javascript is single threaded so that is not possible. so when you call getOutputSync it just sits in a loop running tasks that have already been started, until the output is satisfied. The reason it hangs is that the single javascript thread is blocked waiting for outputs to complete that can't complete until future stuff in your program is processed. that may include actions that are initiated by pulumi after the end of your program. I guess its a bug but I'm a little surprised getOutputSync was provided since it is an antipattern.
    b
    • 2
    • 1
  • b

    bored-river-53178

    02/03/2020, 12:23 AM
    ok. I've found the solution: value = await output.promise()
    w
    m
    • 3
    • 8
  • m

    mammoth-elephant-55302

    02/03/2020, 12:21 PM
    when I run it I get this error:
    error: Running program '/home/xk/dp/github-testing' failed with an unhandled exception:
        /home/xk/dp/github-testing/node_modules/@ibrasho/pulumi-github/index.ts:5
        export * from "./branchProtection";
        ^^^^^^
        
        SyntaxError: Unexpected token export
    l
    w
    • 3
    • 33
  • d

    dry-raincoat-51244

    02/03/2020, 1:24 PM
    Where is the access into the tenants stored? locally or at pulumi ?
    b
    t
    • 3
    • 5
  • c

    clever-egg-2543

    02/03/2020, 2:27 PM
    I’ve followed the [docs](https://www.pulumi.com/docs/guides/continuous-delivery/gitlab-ci/) for a GitLab pipeline and
    pulumi
    is not found. Yes, I’m updating my path:
    === Pulumi is now installed! 🍹 ===
    + Please add /root/.pulumi/bin to your $PATH
    + Get started with Pulumi: <https://www.pulumi.com/docs/quickstart>
    $ export PATH=$PATH:$HOME/.pulumi/bin
    $ which pulumi
    /root/.pulumi/bin/pulumi
    $ cd pulumi
    $ pulumi login
    /bin/sh: eval: line 96: pulumi: not found
    m
    w
    c
    • 4
    • 25
  • d

    delightful-truck-1268

    02/03/2020, 3:45 PM
    I recently logged in locally but have since logged out and logged into the remote service, however the cli is still asking me to unlock the local config/secrets. How do I go back to cloud only?
    w
    • 2
    • 1
  • m

    mammoth-elephant-55302

    02/03/2020, 6:13 PM
    Also is there a null resource plugin for pulumi? I'm trying to run tf2pulumi on some Terraform modules. Maybe I can go into the .Terraform folder
    w
    • 2
    • 5
  • c

    cool-egg-852

    02/03/2020, 7:12 PM
    Anyone ever experience
    Error: invocation of kubernetes:yaml:decode returned an error: Unknown Invoke type 'kubernetes:yaml:decode'
            at /Users/harrison/code/linio/infrastructure/node_modules/@pulumi/pulumi/runtime/invoke.js:172:33
            at Object.onReceiveStatus (/Users/harrison/code/linio/infrastructure/node_modules/grpc/src/client_interceptors.js:1210:9)
            at InterceptingListener._callNext (/Users/harrison/code/linio/infrastructure/node_modules/grpc/src/client_interceptors.js:568:42)
            at InterceptingListener.onReceiveStatus (/Users/harrison/code/linio/infrastructure/node_modules/grpc/src/client_interceptors.js:618:8)
            at callback (/Users/harrison/code/linio/infrastructure/node_modules/grpc/src/client_interceptors.js:847:24)
    It keeps occurring in one project and I can’t figure out the cause. There are only 2 resources, a namespace and a helm chart.
    g
    • 2
    • 27
  • m

    millions-judge-24978

    02/03/2020, 8:57 PM
    Is there any way to tell the difference between a
    pulumi preview
    failure due to
    --expect-no-changes
    vs other reasons? It seems the exit code is 255 either way.
  • m

    many-garden-84306

    02/03/2020, 11:50 PM
    Question: is there a way to specify the pulumi project name for the cli, or do cli-like operations from python, so I can get the outputs of a known but external stack when I know the project name and the stack name but I don't have a Pulumi.yaml file?
    • 1
    • 1
  • c

    calm-greece-42329

    02/04/2020, 12:40 AM
    is there an example of using kubernetesx and setting annotations/custom labels?
    g
    • 2
    • 5
  • c

    calm-greece-42329

    02/04/2020, 12:44 AM
    for instance i am tryign to use the podbuilder with a deployment, but i dont see where i can set an annotation (for prometheus scraping)
  • c

    calm-greece-42329

    02/04/2020, 12:44 AM
    i also need to set some custom labels
  • d

    dazzling-area-7593

    02/04/2020, 3:24 AM
    Hi! I was wondering if it is possible to use the SDK to deploy changes instead of using the CLI (e.g. pulumi up)?
    w
    c
    • 3
    • 3
  • c

    careful-market-30508

    02/04/2020, 4:12 AM
    Debugging tip : How do I know which param is causing the issue ?
    error: Program failed with an unhandled exception:
        error: Traceback (most recent call last):
          File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
            loop.run_until_complete(coro)
          File "/usr/local/anaconda3/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete
            return future.result()
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 73, in run_in_stack
            raise RPC_MANAGER.unhandled_exception.with_traceback(RPC_MANAGER.exception_traceback)
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc_manager.py", line 67, in rpc_wrapper
            result = await rpc_function(*args, **kwargs)
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/resource.py", line 325, in do_register
            resolver = await prepare_resource(res, ty, custom, props, opts)
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/resource.py", line 88, in prepare_resource
            serialized_props = await rpc.serialize_properties(props, property_dependencies_resources, res.translate_input_property)
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc.py", line 68, in serialize_properties
            result = await serialize_property(v, deps, input_transformer)
          File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc.py", line 198, in serialize_property
            raise ValueError(f"unexpected input of type {type(value).__name__}")
        ValueError: unexpected input of type tuple
        error: an unhandled error occurred: Program exited with non-zero exit code: 1
    w
    • 2
    • 1
Powered by Linen
Title
c

careful-market-30508

02/04/2020, 4:12 AM
Debugging tip : How do I know which param is causing the issue ?
error: Program failed with an unhandled exception:
    error: Traceback (most recent call last):
      File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
        loop.run_until_complete(coro)
      File "/usr/local/anaconda3/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete
        return future.result()
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 73, in run_in_stack
        raise RPC_MANAGER.unhandled_exception.with_traceback(RPC_MANAGER.exception_traceback)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc_manager.py", line 67, in rpc_wrapper
        result = await rpc_function(*args, **kwargs)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/resource.py", line 325, in do_register
        resolver = await prepare_resource(res, ty, custom, props, opts)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/resource.py", line 88, in prepare_resource
        serialized_props = await rpc.serialize_properties(props, property_dependencies_resources, res.translate_input_property)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc.py", line 68, in serialize_properties
        result = await serialize_property(v, deps, input_transformer)
      File "/usr/local/anaconda3/lib/python3.7/site-packages/pulumi/runtime/rpc.py", line 198, in serialize_property
        raise ValueError(f"unexpected input of type {type(value).__name__}")
    ValueError: unexpected input of type tuple
    error: an unhandled error occurred: Program exited with non-zero exit code: 1
w

white-balloon-205

02/04/2020, 7:01 AM
Unfortunately I don’t this there is currently any good way to diagnose where this came from. The error message here should be updated to have more context. Also - I believe we are already tracking a suggestion to do this type checking earlier so that it can be reported synchronously with the real call stack. Since the error mentions a tuple - I suspect the issue is an errant comma somewhere.
👍 1
View count: 2