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
Support generic Pulumi resource types in schema #6346
Comments
Does the distinction between |
For my specific use case I targeting |
This commit exists to enable the Java SDK to update and use it, which then unblocks the next commit passing tests. Part of #6346
A new built-in type, `pulumi.json#/Resource` is added to the schema to refer to any resource. This unblocks schematizing resources like `kubernetes.yaml/v2.ConfigFile`, which ideally would declare an output like so: ```json "properties": { "resources": { "type": "array", "items": { "$ref": "pulumi.json#/Resource" }, "description": "Resources created by the ConfigFile." } }, ``` This is a small ergonomic improvement over `pulumi.json#/Any`, and fixes #6346.
A new built-in type, `pulumi.json#/Resource` is added to the schema to refer to any resource. This unblocks schematizing resources like `kubernetes.yaml/v2.ConfigFile`, which ideally would declare an output like so: ```json "properties": { "resources": { "type": "array", "items": { "$ref": "pulumi.json#/Resource" }, "description": "Resources created by the ConfigFile." } }, ``` This is a small ergonomic improvement over `pulumi.json#/Any`, and fixes #6346.
This commit exists to enable the Java SDK to update and use it, which then unblocks the next commit passing tests. Part of #6346 --------- Co-authored-by: Eron Wright <eron@pulumi.com>
Part of pulumi/pulumi#6346. Depends on commit in pulumi/pulumi#15793.
A new built-in type, `pulumi.json#/Resource` is added to the schema to refer to any resource. This unblocks schematizing resources like `kubernetes.yaml/v2.ConfigFile`, which ideally would declare an output like so: ```json "properties": { "resources": { "type": "array", "items": { "$ref": "pulumi.json#/Resource" }, "description": "Resources created by the ConfigFile." } }, ``` This is a small ergonomic improvement over `pulumi.json#/Any`, and fixes #6346.
A new built-in type, `pulumi.json#/Resource` is added to the schema to refer to any resource. This unblocks schematizing resources like `kubernetes.yaml/v2.ConfigFile`, which ideally would declare an output like so: ```json "properties": { "resources": { "type": "array", "items": { "$ref": "pulumi.json#/Resource" }, "description": "Resources created by the ConfigFile." } }, ``` This is a small ergonomic improvement over `pulumi.json#/Any`, and fixes #6346.
Our schema (and SDK generators) doesn't currently support specifying property types as generic pulumi resource types (
pulumi.Resource
,pulumi.CustomResource
, etc). The schema only appears to support references to specific resource types defined in schema.I'm able to work around this by using
"pulumi.json#/Any"
but it would be nice to generate the correct type in the SDKs.The text was updated successfully, but these errors were encountered: