Skip to content

Cannot retrieve value from context provider vpc-provider since account/region are not specified at the stack level #3130

@mrcustard

Description

@mrcustard

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    When trying to use ec2.Vpc.fromLookup, and passing { env: { region: "your-region", account: "your-account-id"} } I get and error when doing cdk list: Cannot retrieve value from context provider vpc-provider since account/region are not specified at the stack level
    Link to code: https://gist.github.com/mrcustard/828242e3e5b8786776fd0c78d1e74e63

  • What is the expected behavior (or behavior of feature suggested)?
    I would expect to be able to lookup the vpc and get ec2.IVPc returned

  • Please tell us about your environment:

    • CDK CLI Version: 0.36.0 (build 6d38487)
    • Module Version: 0.36.0
    • OS: OSX Mojave
    • Language: TypeScript
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions