Application is written in TypeScript to provision an EKS cluster with three Availability Zones
.
The Cloud Development Kit for Terraform (CDKTF) enables the utilization of programming languages for defining and provisioning infrastructure.
Install project dependencies
npm install
And then, get the providers and modules used in the project running:
npm run get
Terraform Cloud
Create an account in Terraform cloud, with an organization, with the given workspace:
tdc-cdktf-k8s-app
.
Create environment variables:
export TF_CLOUD_ORGANIZATION=YOUR_TERRAFORM_ORG
export TF_CLOUD_WORKSPACE=YOUR_CLOUD_WORKSPACE
Generate Terraform JSON config. Creates an auto-generated directory cdktf.out
npm run synth
Deploy in Dev:
npm run dev
Deploy in Staging:
npm run staging
Deploy in Production:
npm run prod