Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

Run aws-cdk

v1.2

Run aws-cdk

upload-cloud

Run aws-cdk

Run aws-cdk commands

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run aws-cdk

uses: tj-actions/aws-cdk@v1.2

Learn more about this action in tj-actions/aws-cdk

Choose a version

CI Update release version. Public workflows that use this action.

aws-cdk

Run AWS CDK commands

...
    steps:
      - uses: actions/checkout@v2
      ...
     
      - name: Install dependencies
        ...

      - name: cdk bootstrap
        uses: tj-actions/aws-cdk@v1.1
        with:
          cdk_subcommand: "bootstrap"
          cdk_stack: "stack1"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: "us-east-1"

      - name: cdk diff
        uses: tj-actions/aws-cdk@v1.1
        with:
          cdk_subcommand: "diff"
          cdk_stack: "stack1"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: "us-east-1"

      - name: cdk synth
        uses: tj-actions/aws-cdk@v1.1
        with:
          cdk_subcommand: "synth"
          cdk_stack: "stack1"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: "us-east-1"

      - name: cdk deploy
        uses: tj-actions/aws-cdk@v1.1
        with:
          cdk_subcommand: "deploy"
          cdk_stack: "stack1"
          cdk_extra_args: "--require-approval never"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_DEFAULT_REGION: "us-east-1"

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
cdk_extra_args string false AWS CDK subcommand arguments.
cdk_pre_installed string true "false" Use the pre installed aws-cdk
cdk_stack string false "*" AWS CDK stack name to
execute.
cdk_subcommand string true AWS CDK subcommand to execute.
cdk_version string false "latest" AWS CDK version to install.
working_dir string false "." AWS CDK working directory.

If you feel generous and want to show some extra appreciation:

Buy me a coffee

Credits

This package was created with Cookiecutter using cookiecutter-action

Report Bugs

Report bugs at https://github.com/tj-actions/aws-cdk/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.