In this setup, we'll utilize the /cdktf
directory's Typescript Terraform CDK code to handle creating the resources we need.
-
pnpm install -g cdktf-cli
-
Install dependencies in /cdktf directory
- Run
pnpm i
in the /cdktf directory
- Run
-
Deploy CDKTF resources
-
In the /cdktf directory, run:
pnpm run build:deploy
-
Make note of the API Gateway ID that is output in your terminal after running
pnpm run build:deploy
, you'll need it to query your API Gateway endpoint. Example:aws_api_gateway_rest_api.api: Creation complete after 1s [id=1ltvwqpuju]
-
This convenience function will build the source CDKTF Typescript files and deploy your resources to LocalStack.
-