Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python/DynamicProvider]: Exception calling application: No positional arguments allowed #5138

Closed
lukehoban opened this issue Aug 10, 2020 · 0 comments · Fixed by #5139
Closed
Assignees
Milestone

Comments

@lukehoban
Copy link
Member

lukehoban commented Aug 10, 2020

Running pulumi up with this program`:

import pulumi
from pulumi_aws import s3
from pulumi import ResourceOptions
from pulumi.dynamic import Resource
from typing import Any, Optional
from pulumi.dynamic import ResourceProvider, CreateResult

class MyProvider(ResourceProvider):
    def create(self, inputs):
        return CreateResult(id_="foo", outs={})
    def check(self, _olds: Any, news: Any) -> pulumi.dynamic.CheckResult:
        failures = []
        failures.append(
                pulumi.dynamic.CheckFailure("my_cool_prop", "game over, man"))
        return pulumi.dynamic.CheckResult(inputs=news, failures=failures)

class MyResource(Resource):
    def __init__(self, name: str, props: Any, opts: Optional[ResourceOptions] = None):
         super().__init__(MyProvider(), name, props, opts)

r = MyResource("name", {})

Leads to:

Diagnostics:
  pulumi-python:dynamic:Resource (name):
    error: Exception calling application: No positional arguments allowed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants