youyo / aws-cdk-github-actions

MIT License
207 stars 101 forks source link

implement cdk deploy/synth context #62

Open sgucciardi opened 1 year ago

sgucciardi commented 1 year ago

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.

jordangarrison commented 1 year ago

@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