Does anyone use terraform alongside CDK? I'm think...
# help
t
Does anyone use terraform alongside CDK? I'm thinking about how best to organize everything. I've been using terraform to provision global resources (vpc, multiple aws accounts per env, etc) but wondering if I should just do everything in cdk
r
Unless you're multicloud, personally I don't really see the benefit of terraform over CDK
t
Do you know if it's possible to create an AWS Account (subaccount in an org) inside cdk
r
I actually don't know. We use control tower for that
t
Didn't know about control tower
every day another aws service 😅
Curious about organization with CDK only as well. Do you have a git repo per service and that contains a cdk project to deploy itself? What about cross service dependencies like a VPC?
r
Indeed. We have a git repo per product. That contains all services needed for that product. Then when a customer buys that product they get a deployment of those services into a dedicated account that was created with Control Tower
t
That's pretty sweet
r
It's not quite as joined up as I'd like it to be yet. The frontends (Vue js apps) are deployed separate to this process. Some use Netlify and some CloudFront
t
Do you avoid the shared resources problem by sharing nothing between products?
r
Yeah, nothing is shared across products. However we do have shared code across products, that code is mostly just currently documented and maintained in each repository but we're in the process of building some private npm packages
t
Gotcha. I'm thinking about how I organize a non b2b product where there's only one instance of the infra. I'm leaning towards a monorepo with a single cdk stack that contains everything
r
Yeah, I think that makes sense