Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Add test or utility to check all required context variables are present #31

Description

@armenr

Minor nitpick, but I lost a couple of hours until I hunted this down:

In my own project, I ported some of the example code from this repo after scaffolding my own cdk project.

I received no warnings or errors from npm run watch or cdk synth or npm run build during any of my development.

When it came to deploy, I kept getting a VERY cryptic and ambiguous error:

Tag must have a value

For the life of me, I couldn't figure out what was missing, or where (I'm an experienced DevOps engineer and architect, and I know JS/TS). I am, however, new to CDK.

After a few hours of trying to debug/investigate by reading through all of the Construct and Stack code, I started diffing my own ported code to the code in the examples repo. THAT is when I finally thought to compare/diff my own cdk.json file to the one in the example repo, and realized I was missing this line:

    "service_name": "myProj-web"

Would it be worth AT LEAST noting this in README.md, or otherwise maybe writing a smaller utility/helper that can check for all required context variables PRIOR to deploy/build?

I lost a few hours on this, and I'm guessing other newbies might as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions