Is there a way to unwrap and import the Inputs and...
# python
k
Is there a way to unwrap and import the Inputs and Properties of a resource from an external schema.json into your own? I’m building a ComponentResource that’s a wrapper over a pulumi-aws resource. I’d like the Component to accept the same inputs, and return the same outputs as the pulumi-aws resource - but I also don’t want to add each input and output to the schema.json manually. Is there a way to import a resource directly into my schema.json?
d
following this as I'm doing a very similar thing
b
@kind-jelly-61624 you can reference the entire object schema like so: https://github.com/pulumi/pulumi-component-provider-py-boilerplate/blob/main/schema.json#L17 That'll also work for an output
💯 1
k
Thanks! I can get the properties and outputs working by referencing that entire object since i’m returning the entire bucket. But i’m not sure how to configure the inputs since it should accept the same S3 bucket args as the pulumi-aws resource
b
ohhhhh sorry I see now, perhaps try doing the reverse, I've using the
$ref
as an input in the input properties
I've never tried this, so not sure how it works
k
Copy code
"inputProperties": {
        "parameters": {
          "$ref": "/aws/v4.0.0/schema.json#/resources/aws:s3%2Fbucket:Bucket",
          "description": "parameters to create an s3 bucket"
        }
      },
like that you mean?
so the problem with that is there’s the “parameters” input that encapsulates all the actual s3 inputs, i was hoping to have this exploded somehow - where the sdk can accept the same list of inputs as an external resource
b
that's not possible, but please open an issue - its a good feature request
k
will do thanks!