4. INTRODUCTION
01
What is CDK for
Terraform?
demonstration
02
How CDK for Terraform
Work?
analysis
03
Dive Into CDK for
Terraform
conclusion
04
IaC Day 2
6. What is Terraform? (1/2)
Terraform is an open source
provisioning tool.
It ships as a single binary
which is written in Go.
Terraform is cross platform
and can run on Linux,
Windows, or MacOS.
Installing terraform is easy.
You simply download a zip
file, unzip it, and run it.
7. What is Terraform? (2/2)
● Executable Documentation
● Human and Machine readable
● Easy to Learn
● Test, Share, Re-Use, Automate
● Works on all Major Cloud Providers
resource aws_instance "catapp" {
ami = data.aws_ami.ubuntu.id
instance_type = var.instance_type
tags = {
Name = "${var.prefix}-meow"
}
}
9. What is Terraform Weaknesses ?
● Require User to Learn a New Custom Language, The
HCL (HashiCorp Configuration Language) DSL
● No Loops, Functions, and Classes Concept Like
General Programing Language
10. CDK for Terraform
● Although HCL has been One of The Fastest Growing
Languages at GitHub
● Officials have Often Heard The Desire to Provision
Infrastructure W/ Familiar Programming Languages
● With the CDK for Terraform Project You Can Define
Infrastructure Resources Using TypeScript, Python...
19. Other Mappings
● Escape Hatch:Passing Meta-Arguments to Resources
not Natively Supported or Implemented
● Terraform Remote Backend:Store Terraform State to
Remote Backend, Instead of Local Storage
● Terraform Remote State:Extract Value from Exist
Terraform State, Avoid Write Fixed Value in
Configuration File
21. What Benefits for CDK
● Manage Multi-Cloud & Hybrid Infrastructure Through
Terraform Provider
● Manage Third-Party SaaS Through Terraform Provider
● Increase Provisioning Speed
● Avoid from Open Source to Close Source/Vendor
Locking
22. What Benefits for Terraform
Define Infrastructure Resources Using TypeScript,
Python...Whatever Program Language You Like
25. Eco System Not Exist Yet
● Define, Import Terraform Provider, Module…
● Then Download Them from Internet…
● Finally JSII Could Help to Transfer Them...
26. Exhausted Transfer Process
● Poor Performance During ~$ cdk sync
● No Useful Debug Message When
Transfer Fail
● Documentation is Still Few
27. Module Chaos
If You Want to Develop a IaC Module…
● Leverage HCL to Develop then Import from CDK?
● Leverage CDK to Develop Directly?
30. What is Infrastructure as Code?
Infrastructure as Code (IaC) is the process of
managing and provisioning cloud infrastructure
with machine-readable definition files.
Think of it as executable documentation.
31. Infrastructure as Code Allows Us to...
● Provide a codified workflow to create infrastructure
● Change and update existing infrastructure
● Safely test changes using terraform plan in dry run
mode
● Integrate with application code workflows (Git, CI/CD
tools)
● Provide reusable modules for easy sharing and
collaboration
● Enforce security policy and organizational standards
● Enable collaboration between different teams
32. IaC Day 2
● Develop IaC Along
● Develop IaC W/O Limition
● Develop IaC W/ Service Downtime
● Develop IaC Together
● Develop IaC W/ Org Policy
● Develop IaC W/O Service Downtime
33. Test Your IaC Module/Construct
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#1
#2
#3
#4
#5
#6
Unit Test
37. CREDITS: This presentation template was created by
Slidesgo, including icons by Flaticon, infographics &
images by Freepik and illustrations by Stories
THANKS!
If You Have Any Questions...
38. ● MaiCoin
○ Backend Engineer
○ Microservice Engineer
○ Site Reliability Engineer
We Are Hiring!
● AMIS
○ Backend Engineer
○ Frontend Engineer
○ Full Stack Engineer
○ Researcher
39. IaC Day 2 Workshop!
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#1
#2
#3
#4
#5
#6
PaC Tool
#1
Unit Test
Integration
Test
#2
#3
#5
#4
GitOps
GitOps
#1
#2
#3
#4