An example of how to manage complex DNS structures using CDK for Terraform.
- Install nodejs via nvm
- Run
nvm install 12 - Install Terraform via tfenv
- Run
tfenv install 1.0.4 - Run
npm install
npm run get - Import/update Terraform providers and modules (you should check-in this directory)
npm run compile - Compile typescript code to javascript (or "npm run watch")
npm run watch - Watch for changes and compile typescript in the background
npm run build - Compile typescript
cdktf synth [stack] - Synthesize Terraform resources from stacks to cdktf.out/ (ready for 'terraform apply')
cdktf diff [stack] - Perform a diff (terraform plan) for the given stack
cdktf deploy [stack] - Deploy the given stack
cdktf destroy [stack] - Destroy the stack
npm run upgrade - Upgrade cdktf modules to latest version
npm run upgrade:next - Upgrade cdktf modules to latest "@next" version (last commit)
You can add one or multiple of the prebuilt providers listed below:
npm install @cdktf/provider-aws
npm install @cdktf/provider-google
npm install @cdktf/provider-azurerm
npm install @cdktf/provider-docker
npm install @cdktf/provider-github
npm install @cdktf/provider-null
You can also build any module or provider locally. Learn more https://cdk.tf/modules-and-providers