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

Typescript resource input types are not discoverable #13481

Open
EvanBoyle opened this issue Nov 19, 2019 · 1 comment
Open

Typescript resource input types are not discoverable #13481

EvanBoyle opened this issue Nov 19, 2019 · 1 comment
Labels
area/codegen SDK-gen, program-gen, convert kind/enhancement Improvements or new features language/javascript

Comments

@EvanBoyle
Copy link
Contributor

I was working on authoring a ComponentResource that required defining and exporting an input interface that used some of the existing AWS resource inputs:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import { input } from "@pulumi/aws/types/index";

export interface DataWarehouseArgs {
    tableName: pulumi.Input<string>
    database?: pulumi.Input<aws.glue.CatalogDatabase>;
    columns: pulumi.Input<pulumi.Input<input.glue.CatalogTableStorageDescriptorColumn>[]>
}

I didn't get any helpful autocomplete or autoimport when adding pulumi.Input<input.glue.CatalogTableStorageDescriptorColumn. It took quite a bit of trail and error to discover that the right incantation for the import was import { input } from "@pulumi/aws/types/index";

And strangely enough, if I try to import via
import { glue } from "@pulumi/aws/types/input";
the type I'm looking for isn't available. I wasn't able to do an autoimport for input.glue.CatalogTableStorageDescriptorColumn either. However the args that the glue table constructer accepts, CatalogTableArgs did do an autoimport for import { CatalogTableArgs } from "@pulumi/aws/glue"; when I referenced it.

I brought this up with @lukehoban and he had the following to say:

This is an area where things are a little less “regular” than in other parts of how our SDKs are life out. In particular, the physical layout on disk diverges a bit from the logical namespace layout we exposed from the root index, which is what breaks importing from the physical path.

@iwahbe iwahbe transferred this issue from pulumi/pulumi-terraform-bridge Jul 13, 2023
@iwahbe iwahbe added language/javascript area/codegen SDK-gen, program-gen, convert labels Jul 13, 2023
@Frassle
Copy link
Member

Frassle commented Jul 13, 2023

I suspect #11565 might help with this?

@justinvp justinvp added the kind/enhancement Improvements or new features label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen SDK-gen, program-gen, convert kind/enhancement Improvements or new features language/javascript
Projects
None yet
Development

No branches or pull requests

4 participants