aws-cdk-github-actions icon indicating copy to clipboard operation
aws-cdk-github-actions copied to clipboard

implement cdk deploy/synth context

Open sgucciardi opened this issue 2 years ago • 1 comments

Hi, looking at the input you provide for the action, there is one that would be really nice to have:

-c, --context Add contextual string parameter (KEY=VALUE) [array] When running a synth or a deploy or a destroy subcommand it would be nice to specify a context variable like:

cdk synth -c stage=production MyStack

Is it something easy to implement as a feature?

Thank you.

sgucciardi avatar Feb 15 '23 09:02 sgucciardi

@sgucciardi I think this is already supported via cdk_args?

      - name: CDK diff Github Actions
        uses: youyo/aws-cdk-github-actions@v2
        with:
          working_dir: 'cdk'
          cdk_subcommand: 'diff'
          cdk_stack: 'MyStack'
          cdk_args: --context=env=dev

jordangarrison avatar Feb 17 '23 20:02 jordangarrison