Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Extension cannot index newly generated project in an existing workspace #24

Copy link
Copy link
Open
@hugorut

Description

@hugorut
Issue body actions

Consider the following VSCode workspace:

prod/ # terraform project
dev/ # terraform project

If a user adds a further project to this workspace, e.g. stag, then the Infracost extension will not show price code lenses on resources within this project. This occurs because this stag project does not exist in the initial init run. To fix this, we could run a init on every file we cannot associate with a project. However, this would be very slow for a user.

Some initial ideas about how we could handle this without impacting speed:

  1. A naive approach would be to check if the stag folder is at the same level as other detected projects, e.g. dev. We would have to somehow exclude module calls from this.
  2. We could expose a shallow project detection method in the Infracost CLI. Which uses the same method as breakdown but avoids all the block computation and price lookup. This could then be safely called for every unassociated file, as it would be quick to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.