Wonder why you would want to use Terraform vs it competitors? Why not stick with CFNs, you ask? CDK should do the trick right? Come enjoy an opinionated take on using Terraform, for the betterment of your sanity. Also, includes a light intro to Terraform for those who are new to it.
Gabriel is a Cloud Technologist and accomplished Cyber practitioner who has led & built complex workloads across the IC for 20+ years. He's a native New Yorker from Washington Heights, with a boisterous laugh and calm demeanor. Gabriel has built a strong career starting in Federal service and has evolved into CTO and now VP of IC at Applied Insight. In addition to his technical accolades, he's a social leader that believes in building and growing strong teams
2. 2
Gabe is a Cloud Technologist and accomplished Cyber practitioner
who has led & built complex workloads across the IC for 20+ years.
He's a native New Yorker from Washington Heights, with a
boisterous laugh and calm demeanor. Gabe has built a strong
career starting in Federal service and has evolved into CTO and
now VP of Intel for Applied Insight. In addition to his technical
accolades, he's a social leader that believes in building and growing
strong teams
@gabrielalix
Gabriel Alix
3. At Applied Insight, we deliver pragmatic solutions for federal missions that cannot
wait. We work closely with agencies and industry to overcome technical and
cultural hurdles to innovation, empowering them with the latest cloud, data and
cyber capabilities. Our solutions help people work better, faster and more securely
– no matter where they are. To learn more about us, visit applied-insight.com.
Applied Insight
3
4. Agenda
• Intro/Purpose
• Takeaways
• What is Terraform
• Why should you care?
• Time to feature release
• Lots of neat built-in functions
• Organization/Modules
• Variables and State
4
• Data and Resources
• Circle of Life – Init/Plan/Apply/Destroy
• Module Registry
• HashiCorp Ecosystem
• 0.12 - 0.13 – 0.14
• Other Resources
5. Intro
5
WHAT IS ALL THE HUBBUB WITH
TERRAFORM?!
I’M GOOD WITH
CLOUDFORMATION, SHOULD I
EVEN PAY ATTENTION TO THIS?
6. Takeaways
6
TERRAFORM IS A VERSATILE
CLOUD ORCHESTRATER
REALLY EASY TO PICK UP AND
START WORKING WITH
NOT WITHOUT ITS ISSUES
(COUNT FUNCTION NOT
WORKING IN MODULES,
WEIRD IF/THEN/ELSE
CONDITIONS, ADVANCED HCL
GETS COMPLICATED) PRE –
0.12
AWS CFN IS FIGHTING BACK
7. What is
Terraform?
7
Terraform is a popular Cloud Orchestration tool.
It has become popular due to its ease of use,
some missteps by AWS, and how well organized
complex projects can be, and at the time, some
missing quality of life features in CFN.
Terraform also promises one language to
connect to any cloud provider – think of a multi-
cloud-scenario <Insert snarky Lord of Rings One
Ring Reference ;)>
8. Why Should
You Even
Care?
8
Is common tech used by both
Commercial and Government Customers
Can be used within your DevOps process
Provides features currently missing from
air-gapped region’s version of CFN
Can you be used to prove the state of
infrastructure for Security reviews
9. Feature Parity and Intrinsic functions
• Took 36 days for Aurora Serverless to receive CFN support
• There is the perception that CFN is not a Tier 1 services within AWS
• Reddit Rage
• Limited Intrinsic functions (no looping, counting, random
generation, etc..)
9
10. Installing Terraform
Terraform is a single binary written in Go
wget https://releases.hashicorp.com/terraform/0.13.4/terraform_0.13.4_linux_amd64.zip
sudo unzip terraform_0.13.4_linux_amd64.zip -d /usr/local/bin
10
11. File Structure
11
Root folder contains main files and subfolder (modules)
Every folder contains the following:
• main.tf
• outputs.tf
• variables.tf
#Create directory structure
mkdir -p terraform-aws/{networking,compute,storage}
cd terraform-aws
#Create root files
touch {main.tf,variables.tf,outputs.tf,terraform.tfvars}
#Create Sub-folder files
touch {networking,compute,storage}/{main.tf,variables.tf,outputs.tf}
18. Data and Resource Objects
• Providers (e.g. AWS, Azure, …)
• Each has their own collection of Data and Resource Objects
• Data objects – lookup information for use within Terraform
• Resource Objects – create actual items within a given Provider
18
20. Circle of Life – Init/Plan/Apply/Destroy
• Init – will initialize a given Terraform project. Need to rerun when
adding a new provider or module
• Plan – will show you what changes will be made
• Apply – takes the plan and executes it
• Destroy – self-explanatory
20