Skip to content

Improve UX when adding a module without an explicit name #396

@VenelinMartinov

Description

@VenelinMartinov

What happened?

When adding a module like so:

PULUMI_ENABLE_VIEWS_PREVIEW=true pulumi package add terraform-module terraform-google-modules/network/google//modules/vpc

A user is faced with the following error:

error: failed to get schema: parameterize: rpc error: code = Unknown desc = terraform-module failed to parse parameters: expected 2 or 3 arguments, got 1

It is not obvious that they need to provide a name for the module. We should consider improving the experience here:

  1. Either infer the name when we can (@Zaid-Ajaj said this is not always possible and not always consistent)
  2. Or provide a clearer error message about how to fix the issue "Please provide a name for the generate module, for example: pulumi package add blah blahName"

Example

.

Output of pulumi about

.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSome behavior is incorrect or out of spec

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions