How to deploy aws cdk

So we are transitioning some of our applications from terraform to aws cdk and I was wondering if anyone has had any experience executing aws cdk commands from octopus?

Currently we build using Jenkins and push the package to octopus, and we would like to have a flow similar to the built in terraform steps for deploying the IaC changes.

I was thinking we could create a worker(s) with the aws cdk cli installed and then set those worker(s) to a worker pool. We could then create a custom aws cdk step template similar to the terraform templates and set the worker pool on the custom cdk template. Passing in any parameters we need for the command line.

Is this the right approach? Is there something easier? Should we synthesize the cdk and use the built cloud formation templates?

Thanks for any help.

Hey @hpets3526 , welcome to the forum!

You’re right on with your approach - I’m not well versed in CDK deployments, but your general plan to use a worker with your installed tools and calling the commands in the script is totally valid. And you’re absolutely right that you can then parameterize that working process into a step template.

Let me know how it goes, happy to help answer/discuss any questions or pain points you run into on the way!

Thanks that is what I thought was correct, but I wasn’t sure. Seems like CDK is something new that Octopus doesn’t yet have built in support for and that’s ok I just didn’t want to go out on my own if there is something I missed or if there is a better approach.

Thanks for replying